Skip to content

Commit

Permalink
feat(icons): add icons - first iteration (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreybakanovsky authored Sep 28, 2023
1 parent a96b8d8 commit b01229d
Show file tree
Hide file tree
Showing 19 changed files with 176 additions and 40 deletions.
5 changes: 4 additions & 1 deletion app/views/account_automatic_topup_configs/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
.field
= f.text_field :amount, autofocus: true, class: "input", placeholder: "Weekly amount"
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', account_path(account), class: 'button is-light'
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= f.submit 'Update', class: "button is-primary"
5 changes: 4 additions & 1 deletion app/views/account_automatic_topup_configs/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
.field
= f.text_field :amount, autofocus: true, class: "input", placeholder: "Weekly amount"
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', account_path(account), class: 'button is-light'
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= f.submit 'Save', class: "button is-primary"
6 changes: 5 additions & 1 deletion app/views/account_shares/_account_share.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ tr
td= link_to 'link', public_account_path(token: account_share.token)
- else
td= link_to 'link', accept_account_share_url(token: account_share.token)
td= link_to 'Cancel', account_share_path(account, account_share), method: :delete, data: {confirm: 'Cancel this share?'}, class: 'button is-small is-light'
td
=link_to account_share_path(account, account_share), method: :delete, data: {confirm: 'Cancel this share?'}, class: 'button is-small is-light' do
span.icon
i.fa.fa-undo
|   Cancel
31 changes: 27 additions & 4 deletions app/views/account_shares/index.html.slim
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
h2.title.is-4
| Account shares
.buttons.mt-4
= link_to 'Back', account_path(account), class: 'button is-light'
= link_to 'New private share', new_account_share_path, class: 'button is-light mr-4'
= link_to 'New public share', new_account_public_account_share_path, class: 'button is-light'
.buttons.for-desktop.mt-4
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= link_to new_account_share_path, class: 'button is-light mr-4' do
span.icon
i.fa.fa-user
|   Private share
= link_to new_account_public_account_share_path, class: 'button is-light' do
span.icon
i.fa.fa-users
|   Public share

.buttons.for-mobile.mt-4
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
= link_to new_account_share_path, class: 'button is-light mr-4' do
span.icon
i.fa.fa-user
|   Private share
= link_to new_account_public_account_share_path, class: 'button is-light' do
span.icon
i.fa.fa-users
|   Public share

.columns
.column
.card
Expand Down
12 changes: 9 additions & 3 deletions app/views/account_shares/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
.field
= f.text_field :name, name: 'account_share[name]', autofocus: true, class: "input", placeholder: "Name"
.field
= f.email_field :email, name: 'account_share[email]', type: "email"
= f.email_field :email, name: 'account_share[email]', type: "email", placeholder: "email"
br
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', account_shares_path(account), class: 'button is-light'
= f.submit "Send invitation", class: 'button is-primary'
= link_to account_shares_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= button_to account_shares_path, class: 'button is-primary' do
span.icon
i.fa.fa-paper-plane
|   Send invitation
6 changes: 5 additions & 1 deletion app/views/accounts/_objective.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ tr
| #{goal_percentage(account, objective)}
progress.progress.is-small(value="#{goal_percentage(account, objective).chomp('%')}" max="100") #{goal_percentage(account, objective)}
td= ([objective.amount - account.balance, 0].max / account.automatic_topup_configs.sum(:amount).+(0.1)).ceil
td= link_to 'Delete', objective_path(objective), method: :delete, data: {confirm: 'Delete this objective?'}, class: 'button is-small is-light'
td
= link_to objective_path(objective), method: :delete, data: {confirm: 'Delete this objective?'}, class: 'button is-small is-light' do
span.icon
i.fa.fa-trash-o
|   Delete
15 changes: 12 additions & 3 deletions app/views/accounts/_transaction.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ tr
- else
td.is-plus-color= transaction.signed_amount(account)
td= transaction.description
td.for-desktop= link_to 'Cancel', transaction_path(transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-small is-light'
td.for-desktop
= link_to transaction_path(transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-small is-light' do
span.icon
i.fa.fa-undo
|   Cancel
td.for-mobile.px-0
div.dropdown.is-right dropdown-id="dropdown-transaction-#{transaction.id}"
.dropdown-trigger
Expand All @@ -16,6 +20,11 @@ tr
.dropdown-menu.cover#dropdown-menu role="menu"
.dropdown-content.cover
= link_to transaction_path(id: transaction, account_id: account), class: "button is-small is-white is-fullwidth" do
| View details
span.icon
i.fa.fa-list-ul
|   View details
= link_to transaction_path(id: transaction, account_id: account), method: :delete, data: { confirm: 'Cancel this transaction?' }, class: 'button is-danger is-small is-fullwidth' do
| Cancel transaction
span.icon
i.fa.fa-undo
|   Cancel transaction

12 changes: 9 additions & 3 deletions app/views/accounts/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
|  
= f.label :notification, "Report transactions"
br
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', account_path(account), class: 'button is-light'
= f.submit 'Save', class: 'button is-primary'
buttons.is-flex.is-justify-content-flex-end
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= button_to account_path, class: 'button is-primary' do
span.icon
i.fa.fa-hdd-o
|   Save
10 changes: 8 additions & 2 deletions app/views/accounts/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@
.notification.is-light
| This amount will be automatically added to the account every week. You will receive an email notification about that
.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', my_account_path, class: 'button is-light'
= form.submit 'Save', class: "button is-primary is-fullwidth"
= link_to my_account_path, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= button_to my_account_path, class: 'button is-primary' do
span.icon
i.fa.fa-hdd-o
|   Save
49 changes: 41 additions & 8 deletions app/views/accounts/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,38 @@
h2.title.is-4
| Account details
.buttons
= link_to 'Back', my_account_path, class: 'button is-light'
= link_to 'Edit', edit_account_path(account), class: 'button is-light'
= link_to 'Account shares', account_shares_path(account), class: 'button is-light'
= link_to 'Archive', archive_account_path(account), data: {confirm: 'Archive this account?'}, class: 'button is-danger'

.buttons.for-desktop
= link_to my_account_path, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= link_to edit_account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-pencil
|   Edit
= link_to account_shares_path(account), class: 'button is-light' do
span.icon
i.fa.fa-share-alt
|   Account shares
= link_to archive_account_path(account), data: {confirm: 'Archive this account?'}, class: 'button is-danger' do
span.icon
i.fa.fa-archive
|   Archive

.buttons.for-mobile
= link_to my_account_path, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
= link_to edit_account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-pencil
= link_to account_shares_path(account), class: 'button is-light' do
span.icon
i.fa.fa-share-alt
= link_to archive_account_path(account), data: {confirm: 'Archive this account?'}, class: 'button is-danger' do
span.icon
i.fa.fa-archive

.columns
.column
.card
Expand Down Expand Up @@ -82,9 +110,14 @@ h2.title.is-4
td= config.from_account.name || config.from_account.email
td= config.amount
td
= link_to 'Edit', edit_account_account_automatic_topup_config_path(account, config), class: 'button is-small is-light'
|  
= link_to 'Cancel', account_account_automatic_topup_config_path(account, config), method: :delete, data: { confirm: 'Cancel this top up?' }, class: 'button is-small is-light'
= link_to edit_account_account_automatic_topup_config_path(account, config), class: 'button is-small is-light' do
span.icon
i.fa.fa-pencil
|   Edit
= link_to account_account_automatic_topup_config_path(account, config), method: :delete, data: { confirm: 'Cancel this top up?' }, class: 'button is-small is-light' do
span.icon
i.fa.fa-undo
|   Cancel
.card-footer
= link_to '+Add', new_account_account_automatic_topup_config_path(account), class: 'card-footer-item'
- if account.accumulative_balance_data.present?
Expand Down
5 changes: 4 additions & 1 deletion app/views/devise/registrations/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,8 @@
p.help
| (we need your current password to confirm your changes)
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', request.referer.present? && request.referer != edit_user_registration_path ? request.referer : root_path, class: 'button is-light'
= link_to request.referer.present? && request.referer != edit_user_registration_path ? request.referer : root_path, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= f.submit "Update", class: "button is-primary"
5 changes: 4 additions & 1 deletion app/views/feedbacks/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
= form.text_area :description, autofocus: true, class: "textarea", placeholder: "Your feedback"
.field
.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', request.referer, class: 'button is-light'
= link_to request.referer, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= form.submit 'Save', class: "button is-primary is-fullwidth"
5 changes: 4 additions & 1 deletion app/views/my_accounts/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.columns
.column.is-flex.is-justify-content-flex-end
- if account.children.unarchived.present? || shared_accounts.present?
= link_to 'Add account', new_account_path, class: 'button is-primary'
= button_to new_account_path, method: :get, class: 'button is-primary' do
span.icon
i.fa.fa-plus
|   Add account

- if account.children.unarchived.present? || shared_accounts.present?
- account.children.unarchived.each do |child|
Expand Down
10 changes: 8 additions & 2 deletions app/views/objectives/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,11 @@
.field
= f.text_field :amount, class: "input", placeholder: "Amount"
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', account_path(account), class: 'button is-light'
= f.submit 'Save', class: 'button is-primary'
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= button_to account_objectives_path(account), class: 'button is-primary' do
span.icon
i.fa.fa-hdd-o
|   Save
5 changes: 4 additions & 1 deletion app/views/public_account_shares/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
= link_to account.name, account_path(account)
= form_with(url: account_public_account_shares_path, method: :post) do |form|
.buttons.is-centered
= link_to 'Back', account_shares_path(account), class: 'button is-light'
= link_to account_shares_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= form.submit 'Create', class: 'button is-primary'
5 changes: 4 additions & 1 deletion app/views/public_account_shares/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
h2.title.is-4
| Account details
.buttons
= link_to 'Back', my_account_path, class: 'button is-light'
= link_to my_account_path, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
.columns
.column
.card
Expand Down
10 changes: 8 additions & 2 deletions app/views/spends/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
.field
= f.text_field :description, class: "input", placeholder: "Description"
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', request.referer, class: 'button is-light'
= f.submit 'Save', class: "button is-primary is-fullwidth"
= link_to request.referer, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= button_to account_spend_path(account), class: 'button is-primary' do
span.icon
i.fa.fa-hdd-o
|   Save
10 changes: 8 additions & 2 deletions app/views/topups/new.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@
.field
= f.text_field :description, class: "input", placeholder: "Description"
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Back', request.referer, class: 'button is-light'
= f.submit 'Save', class: "button is-primary is-fullwidth"
= link_to request.referer, class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back
= button_to account_topup_path(account), class: 'button is-primary' do
span.icon
i.fa.fa-hdd-o
|   Save
10 changes: 8 additions & 2 deletions app/views/transactions/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@ div.content
td= 'Description '
td= transaction.description
div.buttons.is-flex.is-justify-content-flex-end
= link_to 'Cancel transaction', transaction_path(id: transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-danger'
= link_to 'Back', account_path(account), class: 'button is-light'
= link_to transaction_path(id: transaction), method: :delete, data: {confirm: 'Cancel this transaction?'}, class: 'button is-danger' do
span.icon
i.fa.fa-undo
|   Cancel transaction
= link_to account_path(account), class: 'button is-light' do
span.icon
i.fa.fa-chevron-left
|   Back

0 comments on commit b01229d

Please sign in to comment.