Skip to content

Commit

Permalink
Smaller ui updates (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Flückiger authored May 10, 2021
1 parent 54d5e2c commit 352f82b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/views/timer_sessions/_sessions_filters.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
= f.date_field :min_date
.col
= f.date_field :max_date

.mt-3
= f.submit t('timer_sessions.filters.filter')
5 changes: 3 additions & 2 deletions app/views/timer_sessions/_timer_container.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
= f.hidden_field :id, data: { timer_id: '' }
= error_messages_for active_timer_session
- if active_timer_session.timer_start
.box
.text-center
div[data-hours-timer]
h1
#hours-clock
=<> t('timer_sessions.timer.current')
span#hours-clock
.row
.issue-container
.box
Expand Down
5 changes: 3 additions & 2 deletions app/views/timer_sessions/_timer_sessions_day_block.html.slim
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.box
h3 = format_block_date(date)
b.float-right = sum_work_hours(Array.wrap(timer_sessions))
.space-between.mb-3
b.h3 = format_block_date(date)
b.float-right = sum_work_hours(Array.wrap(timer_sessions))
table.list.timer-sessions-table
tbody
- Array.wrap(timer_sessions).each do |timer_session|
Expand Down
4 changes: 2 additions & 2 deletions app/views/timer_sessions/_timer_sessions_list.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
= render 'sessions_filters'

.w-75.mx-auto
= render 'sessions_filters'
- (timer_sessions_by_day || []).each do |date, timer_session_day|
= render 'timer_sessions_day_block',
date: date,
Expand Down
17 changes: 17 additions & 0 deletions assets/stylesheets/utils.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
border-collapse:collapse;
}

.timer-sessions-table > td {
text-align: left;
margin-left: 5px;
}

.text-center {
text-align: center;
}

.space-between {
display: flex;
-moz-box-pack: justify;
justify-content: space-between;
-moz-box-align: center;
align-items: center;
}

.h3 {
font-size: 3rem;
}
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ en:
stop: Stop
cancel: Cancel
date_placeholder: 'dd.mm.yyyy hh:mm'
current: 'Current Timer:'
index:
title: Tracky
table:
Expand Down

0 comments on commit 352f82b

Please sign in to comment.