-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
975906b
commit 6a62d4c
Showing
30 changed files
with
634 additions
and
297 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
app/components/common/buttons/delete_button_with_text/component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<%= button_to @path, method: :delete, form: { data: { turbo_confirm: t("are_you_sure") } }, | ||
class: "c-btn c-btn--ghost c-acount__button c-acount__button--icon", target: '_top' do %> | ||
<%= render 'svg/trash' %> | ||
<span><%= @text %></span> | ||
<% end %> |
16 changes: 16 additions & 0 deletions
16
app/components/common/buttons/delete_button_with_text/component.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Common | ||
module Buttons | ||
module DeleteButtonWithText | ||
class Component < ApplicationViewComponent | ||
attr_reader :path, :text | ||
|
||
def initialize(path:, text:) | ||
super | ||
|
||
@path = path | ||
@text = text | ||
end | ||
end | ||
end | ||
end | ||
end |
6 changes: 4 additions & 2 deletions
6
app/components/common/form/checkboxes/rounded_checkbox/component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<%= @form.check_box @attribute, @options %> | ||
<div class="o-checkbox__slider round"></div> | ||
<label class='o-checkbox' for="checkbox"> | ||
<%= @form.check_box @attribute, @options %> | ||
<div class="o-checkbox__slider round"></div> | ||
</label> |
7 changes: 7 additions & 0 deletions
7
app/components/common/form/password_field/description/component.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<label class="c-account__label-explain" for="<%= "#{@user.class.name.underscore}_password" %>"> | ||
<div> | ||
<%= t('users.password') %> | ||
<%= tag.span t('users.form.you_can_leave_blank') if @user.persisted? || (@user.signed_in_with_identity_document? && @user.encrypted_password.blank?) %> | ||
</div> | ||
<%= tag.span t('users.form.password_requirements', minimum: @minimum_password_length) if @minimum_password_length %> | ||
</label> |
20 changes: 20 additions & 0 deletions
20
app/components/common/form/password_field/description/component.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Common | ||
module Form | ||
module PasswordField | ||
module Description | ||
class Component < ApplicationViewComponent | ||
attr_reader :form, :attribute, :minimum_password_length, :user | ||
|
||
def initialize(form:, attribute:, minimum_password_length:, user:) | ||
super | ||
|
||
@form = form | ||
@attribute = attribute | ||
@minimum_password_length = minimum_password_length | ||
@user = user | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<label class="o-checkbox" for="webpush"> | ||
<%= check_box_tag 'webpush', 'yes', false, data: data_data %> | ||
<div class="o-checkbox__slider round"></div> | ||
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Common | ||
module Webpush | ||
module Setting | ||
class Component < ApplicationViewComponent | ||
def data_data | ||
{ | ||
controller: 'profile-webpush', | ||
profile_webpush_target: 'checkbox', | ||
profile_webpush_vapid_public_value: Rails.configuration.customization[:vapid_public], | ||
action: 'change->push-notification#setupPushNotifications' | ||
} | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.