Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ gem "tailwindcss-ruby", "~> 4.1"
gem "tailwindcss-rails", "~> 4.3"

gem "active_storage_validations"

gem "inline_svg"
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ GEM
actionpack (>= 6.0.0)
activesupport (>= 6.0.0)
railties (>= 6.0.0)
inline_svg (1.10.0)
activesupport (>= 3.0)
nokogiri (>= 1.6)
io-console (0.8.1)
irb (1.15.2)
pp (>= 0.6.0)
Expand Down Expand Up @@ -533,6 +536,7 @@ DEPENDENCIES
erb_lint
image_processing (~> 1.2)
importmap-rails
inline_svg
jbuilder
kamal
lockbox
Expand Down
3 changes: 3 additions & 0 deletions app/assets/images/clock_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions app/assets/images/devlog_label_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/images/doc_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions app/assets/images/pan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions app/assets/images/time_label_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion app/assets/tailwind/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
@theme {
--color-card-brown: hsl(8, 30%, 36%);
--color-card-brown-border: hsl(23, 34%, 51%);
--color-card-brown-text: #F8E8D1 ;
--color-card-brown-text: #F8E8D1;
--color-card-brown-secondary: #D7B594;
--color-card-brown-text-tertiary: #7A4841;

--font-jua: "Jua", "sans-serif";
}
4 changes: 4 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ class ApplicationController < ActionController::Base
def current_user
@current_user ||= User.find_by(id: session[:user_id]) if session[:user_id]
end

def authenticate_user!
redirect_to root_path, alert: "You must be signed in to access this section" unless current_user
end
end
3 changes: 2 additions & 1 deletion app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
class ProjectsController < ApplicationController
before_action :set_project_minimal, only: [ :edit, :update, :destroy ]
before_action :set_project, only: [ :show ]
before_action :authenticate_user!

def index
@projects = current_user.projects.with_attached_banner

authorize Project
end

Expand Down
Loading