Add tweaks
This commit is contained in:
parent
0b1f7ffe7d
commit
6e74cadb00
9 changed files with 45 additions and 13 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -2,4 +2,6 @@
|
|||
*.sqlite3-shm
|
||||
*.sqlite3-wal
|
||||
certs/
|
||||
.DS_Store
|
||||
.DS_Store
|
||||
|
||||
.byebug_history
|
||||
|
|
@ -86,6 +86,7 @@ GEM
|
|||
activerecord (>= 4.1)
|
||||
sinatra (>= 1.0)
|
||||
sqlite3 (1.6.8-arm64-darwin)
|
||||
sqlite3 (1.6.8-x86_64-linux)
|
||||
tilt (2.3.0)
|
||||
timeout (0.4.1)
|
||||
tzinfo (2.0.6)
|
||||
|
|
@ -94,6 +95,7 @@ GEM
|
|||
|
||||
PLATFORMS
|
||||
arm64-darwin-22
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
bcrypt
|
||||
|
|
|
|||
3
app.rb
3
app.rb
|
|
@ -1,6 +1,7 @@
|
|||
require 'sinatra'
|
||||
require 'sinatra/activerecord'
|
||||
require 'securerandom'
|
||||
require 'byebug'
|
||||
|
||||
require './app/models/user'
|
||||
require './app/models/area'
|
||||
|
|
@ -103,7 +104,7 @@ get '/' do
|
|||
end
|
||||
|
||||
get '/inbox' do
|
||||
@tasks = current_user.tasks.incomplete.where(project_id: nil).where(due_date: nil).order(:name)
|
||||
@tasks = current_user.tasks.incomplete.where(project_id: nil, due_date: nil).order('tasks.created_at DESC')
|
||||
|
||||
erb :inbox
|
||||
end
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ module Sinatra
|
|||
@tasks = @tasks.where(id: tagged_task_ids)
|
||||
end
|
||||
|
||||
@tasks = @tasks.distinct
|
||||
@tasks = @tasks.joins(:tags).distinct
|
||||
|
||||
erb :'tasks/index'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<% end %>
|
||||
<div class="mx-3 mb-2">
|
||||
<% if @project.tasks.incomplete.any? %>
|
||||
<% @project.tasks.incomplete.each do |task| %>
|
||||
<% @project.tasks.incomplete.order('created_at DESC').each do |task| %>
|
||||
<div id="edit_task_form_<%= task.id %>" class="d-none">
|
||||
<%= partial :'tasks/_form', locals: { task: task } %>
|
||||
</div>
|
||||
|
|
@ -48,13 +48,13 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="rounded px-4 py-2 mb-4 bg-secondary-subtle fw-light opacity-50">
|
||||
<div class="rounded px-4 py-2 mb-4 bg-secondary-subtle fw-light blank-slate opacity-50">
|
||||
No tasks have been created yet for this project
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<h4 class="mt-5 ms-4 fw-bold">Notes</h4>
|
||||
<div class="rounded py-2 px-3 mx-3 d-flex align-items-center border border-black"
|
||||
<div class="rounded py-2 px-3 mx-3 d-flex align-items-center note-form-toggler"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#newNoteForm"
|
||||
aria-expanded="false"
|
||||
|
|
@ -77,7 +77,7 @@
|
|||
<%= partial :'notes/_note', locals: {note: note} %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="rounded px-4 py-2 mb-4 bg-secondary-subtle fw-light opacity-50">
|
||||
<div class="rounded px-4 py-2 mb-4 bg-secondary-subtle fw-light blank-slate opacity-50">
|
||||
No notes have been created yet for this project
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/tasks?type=next" class="<%= nav_link('/tasks', 'type' => 'next') %>">
|
||||
<a href="/tasks?type=next&order_by=created_at:desc" class="<%= nav_link('/tasks', 'type' => 'next') %>">
|
||||
<i class="bi bi-arrow-right-circle-fill me-1"></i> Next Actions
|
||||
</a>
|
||||
</li>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</li>
|
||||
<li class="border-top my-3"></li>
|
||||
<li class="nav-item d-flex justify-content-between align-items-center w-100 <%= nav_link('/projects') %>">
|
||||
<a href="/projects" class="text-decoration-none flex-grow-1 <%= nav_link_active?('/projects') ? 'link-light' : 'link-dark' %>">
|
||||
<a href="/projects" class="text-decoration-none flex-grow-1 <%= nav_link_active?('/projects') ? 'text-light' : 'link-dark' %>">
|
||||
<i class="bi bi-hexagon-fill me-1"></i> Areas & Projects
|
||||
</a>
|
||||
<button class="btn btn-link text-secondary p-0 ms-2" type="button" id="addNewDropdown" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
</li>
|
||||
<li class="border-top my-3"></li>
|
||||
<li class="nav-item d-flex justify-content-between align-items-center <%= nav_link('/notes') %>">
|
||||
<a href="/notes" class="text-decoration-none flex-grow-1 <%= nav_link_active?('/notes') ? 'link-light' : 'link-dark' %>">
|
||||
<a href="/notes" class="text-decoration-none flex-grow-1 <%= nav_link_active?('/notes') ? 'text-light' : 'link-dark' %>">
|
||||
<i class="bi bi-journal-text me-1"></i> Notes
|
||||
</a>
|
||||
<a class="text-no-decoration link-secondary btn-outline-dark" href="#" data-bs-toggle="modal" data-bs-target="#newNoteModal">
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="input-group">
|
||||
<input type="text" id="task_name_<%= task.id %>" name="name" value="<%= task.name %>" class="form-control mb-2 mx-3 px-3 py-2 new-task-input task-name-input " placeholder="+ Add New Task" required>
|
||||
<input type="text" id="task_name_<%= task.id %>" name="name" value="<%= task.name %>" class="form-control mb-2 mx-3 px-3 py-2 new-task-input task-name-input rounded" placeholder="+ Add New Task" required>
|
||||
<% if @project %>
|
||||
<input type="hidden" name="project_id" value="<%= @project.id %>">
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -124,7 +124,8 @@ h6 {
|
|||
|
||||
/* tasks, notes */
|
||||
|
||||
.task-item, .note-item {
|
||||
.task-item,
|
||||
.note-item {
|
||||
background: var(--bs-white);
|
||||
}
|
||||
|
||||
|
|
@ -243,7 +244,7 @@ a.project-card .card:hover {
|
|||
}
|
||||
|
||||
.panel {
|
||||
background-color: var(--bs-light);
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.dark-mode .panel {
|
||||
|
|
@ -257,4 +258,26 @@ a.project-card .card:hover {
|
|||
.dark-mode #newNoteForm .card {
|
||||
background-color: var(--bs-gray-dark) !important;
|
||||
color: var(--bs-light) !important;
|
||||
}
|
||||
|
||||
.blank-slate {
|
||||
background-color: #eee !important;
|
||||
color: var(--bs-dark) !important;
|
||||
}
|
||||
|
||||
.dark-mode .blank-slate {
|
||||
background-color: var(--bs-gray-dark) !important;
|
||||
color: var(--bs-light) !important;
|
||||
}
|
||||
|
||||
.note-form-toggler {
|
||||
border: 1px solid #ddd !important;
|
||||
background-color: #f4f4f4 !important;
|
||||
color: #ccc !important;
|
||||
}
|
||||
|
||||
.dark-mode .note-form-toggler {
|
||||
border: 1px solid #000 !important;
|
||||
background-color: var(--bs-dark) !important;
|
||||
color: var(--bs-light) !important;
|
||||
}
|
||||
4
run.sh
Executable file
4
run.sh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
#! /bin/bash
|
||||
|
||||
export TUDUDI_SESSION_SECRET=7e9ca5868791e1e2da76b46deb760e7536967de380984ae30836433d212a94d362b500507e07f9c9f6e7e99cba0befd02925e378546565783de3c1648503aaf9
|
||||
puma -C app/config/puma.rb
|
||||
Loading…
Add table
Add a link
Reference in a new issue