Add badges to Fedibird-specific settings
This commit is contained in:
parent
b5b756df95
commit
1877a1dff1
26 changed files with 65 additions and 14 deletions
|
@ -696,6 +696,18 @@ html {
|
||||||
color: $ui-highlight-color;
|
color: $ui-highlight-color;
|
||||||
background-color: rgba($ui-highlight-color, 0.1);
|
background-color: rgba($ui-highlight-color, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fedibird_features {
|
||||||
|
border-color: $fedibird-theme-color;
|
||||||
|
color: $fedibird-theme-color;
|
||||||
|
background-color: rgba($fedibird-theme-color, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.fedibird_features {
|
||||||
|
border-color: $fedibird-theme-color;
|
||||||
|
color: $fedibird-theme-color;
|
||||||
|
background-color: rgba($fedibird-theme-color, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.compose-form .compose-form__warning {
|
.compose-form .compose-form__warning {
|
||||||
|
|
|
@ -202,6 +202,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-role,
|
.account-role,
|
||||||
|
.fedibird_features,
|
||||||
|
.simple_form .fedibird_features,
|
||||||
.simple_form .recommended {
|
.simple_form .recommended {
|
||||||
padding: 4px 8px;
|
padding: 4px 8px;
|
||||||
border-radius: 17px;
|
border-radius: 17px;
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
&.with_block_label .hint { margin-bottom: 16px }
|
&.with_block_label .hint { margin-bottom: 16px }
|
||||||
|
|
||||||
&.boolean {
|
&.boolean {
|
||||||
|
.fedibird_features,
|
||||||
.recommended { margin: 0 8px }
|
.recommended { margin: 0 8px }
|
||||||
|
|
||||||
.label_input>label { padding-top: 3px }
|
.label_input>label { padding-top: 3px }
|
||||||
|
|
|
@ -202,6 +202,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.account-role,
|
.account-role,
|
||||||
|
.fedibird_features,
|
||||||
|
.simple_form .fedibird_features,
|
||||||
.simple_form .recommended {
|
.simple_form .recommended {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 4px 6px;
|
padding: 4px 6px;
|
||||||
|
@ -227,6 +229,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fedibird_features,
|
||||||
|
.simple_form .fedibird_features {
|
||||||
|
background-color: rgba($fedibird-theme-color, 0.5);
|
||||||
|
border: 1px solid $fedibird-theme-color;
|
||||||
|
}
|
||||||
|
|
||||||
.account__header__fields {
|
.account__header__fields {
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
@ -102,6 +102,7 @@ code {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fedibird_features,
|
||||||
.recommended {
|
.recommended {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
|
|
|
@ -5,6 +5,7 @@ $success-green: #79bd9a !default; // Padua
|
||||||
$error-red: #df405a !default; // Cerise
|
$error-red: #df405a !default; // Cerise
|
||||||
$warning-red: #ff5050 !default; // Sunset Orange
|
$warning-red: #ff5050 !default; // Sunset Orange
|
||||||
$gold-star: #ca8f04 !default; // Dark Goldenrod
|
$gold-star: #ca8f04 !default; // Dark Goldenrod
|
||||||
|
$fedibird-theme-color: #990099; // Violet
|
||||||
|
|
||||||
$red-bookmark: $warning-red;
|
$red-bookmark: $warning-red;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('account_subscribes.edit.title')
|
= t('account_subscribes.edit.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @form_account_subscribing, url: settings_account_subscribe_path(@form_account_subscribing.id), method: :put do |f|
|
= simple_form_for @form_account_subscribing, url: settings_account_subscribe_path(@form_account_subscribing.id), method: :put do |f|
|
||||||
= render 'shared/error_messages', object: @form_account_subscribing
|
= render 'shared/error_messages', object: @form_account_subscribing
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.account_subscribes')
|
= t('settings.account_subscribes')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
%p= t('account_subscribes.hint_html')
|
%p= t('account_subscribes.hint_html')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('account_subscribes.new.title')
|
= t('account_subscribes.new.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @form_account_subscribing, url: settings_account_subscribes_path do |f|
|
= simple_form_for @form_account_subscribing, url: settings_account_subscribes_path do |f|
|
||||||
= render 'shared/error_messages', object: @form_account_subscribing
|
= render 'shared/error_messages', object: @form_account_subscribing
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('domain_subscribes.edit.title')
|
= t('domain_subscribes.edit.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @domain_subscribe, url: settings_domain_subscribe_path(@domain_subscribe), method: :put do |f|
|
= simple_form_for @domain_subscribe, url: settings_domain_subscribe_path(@domain_subscribe), method: :put do |f|
|
||||||
= render 'shared/error_messages', object: @domain_subscribe
|
= render 'shared/error_messages', object: @domain_subscribe
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.domain_subscribes')
|
= t('settings.domain_subscribes')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
%p= t('domain_subscribes.hint_html')
|
%p= t('domain_subscribes.hint_html')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('domain_subscribes.new.title')
|
= t('domain_subscribes.new.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @domain_subscribe, url: settings_domain_subscribes_path do |f|
|
= simple_form_for @domain_subscribe, url: settings_domain_subscribes_path do |f|
|
||||||
= render 'shared/error_messages', object: @domain_subscribe
|
= render 'shared/error_messages', object: @domain_subscribe
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.favourite_domains')
|
= t('settings.favourite_domains')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
%p= t('favourite_domains.hint_html')
|
%p= t('favourite_domains.hint_html')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.favourite_tags')
|
= t('settings.favourite_tags')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
%p= t('favourite_tags.hint_html')
|
%p= t('favourite_tags.hint_html')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('follow_tags.edit.title')
|
= t('follow_tags.edit.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @follow_tag, url: settings_follow_tag_path(@follow_tag), method: :put do |f|
|
= simple_form_for @follow_tag, url: settings_follow_tag_path(@follow_tag), method: :put do |f|
|
||||||
= render 'shared/error_messages', object: @follow_tag
|
= render 'shared/error_messages', object: @follow_tag
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('settings.follow_tags')
|
= t('settings.follow_tags')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
%p= t('follow_tags.hint_html')
|
%p= t('follow_tags.hint_html')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('follow_tags.new.title')
|
= t('follow_tags.new.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @follow_tag, url: settings_follow_tags_path do |f|
|
= simple_form_for @follow_tag, url: settings_follow_tags_path do |f|
|
||||||
= render 'shared/error_messages', object: @follow_tag
|
= render 'shared/error_messages', object: @follow_tag
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('keyword_subscribes.edit.title')
|
= t('keyword_subscribes.edit.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @keyword_subscribe, url: settings_keyword_subscribe_path(@keyword_subscribe), method: :put do |f|
|
= simple_form_for @keyword_subscribe, url: settings_keyword_subscribe_path(@keyword_subscribe), method: :put do |f|
|
||||||
= render 'shared/error_messages', object: @keyword_subscribe
|
= render 'shared/error_messages', object: @keyword_subscribe
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('keyword_subscribes.index.title')
|
= t('keyword_subscribes.index.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
%p= t('keyword_subscribes.hint_html')
|
%p= t('keyword_subscribes.hint_html')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
- content_for :page_title do
|
- content_for :page_title do
|
||||||
= t('keyword_subscribes.new.title')
|
= t('keyword_subscribes.new.title')
|
||||||
|
%span.fedibird_features Fedibird
|
||||||
|
|
||||||
= simple_form_for @keyword_subscribe, url: settings_keyword_subscribes_path do |f|
|
= simple_form_for @keyword_subscribe, url: settings_keyword_subscribes_path do |f|
|
||||||
= render 'shared/error_messages', object: @keyword_subscribe
|
= render 'shared/error_messages', object: @keyword_subscribe
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
|
= f.input :setting_unfollow_modal, as: :boolean, wrapper: :with_label
|
||||||
= f.input :setting_unsubscribe_modal, as: :boolean, wrapper: :with_label
|
= f.input :setting_unsubscribe_modal, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
|
= f.input :setting_boost_modal, as: :boolean, wrapper: :with_label
|
||||||
= f.input :setting_delete_modal, as: :boolean, wrapper: :with_label
|
= f.input :setting_delete_modal, as: :boolean, wrapper: :with_label
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
= ff.input :follow_request, as: :boolean, wrapper: :with_label
|
= ff.input :follow_request, as: :boolean, wrapper: :with_label
|
||||||
= ff.input :reblog, as: :boolean, wrapper: :with_label
|
= ff.input :reblog, as: :boolean, wrapper: :with_label
|
||||||
= ff.input :favourite, as: :boolean, wrapper: :with_label
|
= ff.input :favourite, as: :boolean, wrapper: :with_label
|
||||||
= ff.input :emoji_reaction, as: :boolean, wrapper: :with_label
|
= ff.input :emoji_reaction, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
= ff.input :mention, as: :boolean, wrapper: :with_label
|
= ff.input :mention, as: :boolean, wrapper: :with_label
|
||||||
|
|
||||||
- if current_user.staff?
|
- if current_user.staff?
|
||||||
|
|
|
@ -34,40 +34,40 @@
|
||||||
%h4= t 'preferences.fedibird_features'
|
%h4= t 'preferences.fedibird_features'
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_follow_button_on_timeline, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_follow_button_on_timeline, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_subscribe_button_on_timeline, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_subscribe_button_on_timeline, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_followed_by, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_followed_by, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_follow_button_to_list_adder, as: :boolean, wrapper: :with_label
|
= f.input :setting_follow_button_to_list_adder, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_navigation_panel, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_navigation_panel, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_quote_button, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_quote_button, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_bookmark_button, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_bookmark_button, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_place_tab_bar_at_bottom, as: :boolean, wrapper: :with_label
|
= f.input :setting_place_tab_bar_at_bottom, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_tab_bar_label, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_tab_bar_label, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_enable_limited_timeline, as: :boolean, wrapper: :with_label
|
= f.input :setting_enable_limited_timeline, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_enable_reaction, as: :boolean, wrapper: :with_label
|
= f.input :setting_enable_reaction, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
.fields-group
|
.fields-group
|
||||||
= f.input :setting_show_reply_tree_button, as: :boolean, wrapper: :with_label
|
= f.input :setting_show_reply_tree_button, as: :boolean, wrapper: :with_label, fedibird_features: true
|
||||||
|
|
||||||
-# .fields-group
|
-# .fields-group
|
||||||
-# = f.input :setting_show_target, as: :boolean, wrapper: :with_label
|
-# = f.input :setting_show_target, as: :boolean, wrapper: :with_label
|
||||||
|
|
|
@ -16,8 +16,17 @@ module RecommendedComponent
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module FedibirdFeaturesComponent
|
||||||
|
def fedibird_features(_wrapper_options = nil)
|
||||||
|
return unless options[:fedibird_features]
|
||||||
|
options[:label_text] = ->(raw_label_text, _required_label_text, _label_present) { safe_join([raw_label_text, ' ', content_tag(:span, I18n.t('simple_form.fedibird_features'), class: 'fedibird_features')]) }
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
SimpleForm.include_component(AppendComponent)
|
SimpleForm.include_component(AppendComponent)
|
||||||
SimpleForm.include_component(RecommendedComponent)
|
SimpleForm.include_component(RecommendedComponent)
|
||||||
|
SimpleForm.include_component(FedibirdFeaturesComponent)
|
||||||
|
|
||||||
SimpleForm.setup do |config|
|
SimpleForm.setup do |config|
|
||||||
# Wrappers are used by the form builder to generate a
|
# Wrappers are used by the form builder to generate a
|
||||||
|
@ -75,6 +84,7 @@ SimpleForm.setup do |config|
|
||||||
|
|
||||||
b.wrapper tag: :div, class: :label_input do |ba|
|
b.wrapper tag: :div, class: :label_input do |ba|
|
||||||
ba.optional :recommended
|
ba.optional :recommended
|
||||||
|
ba.optional :fedibird_features
|
||||||
ba.use :label
|
ba.use :label
|
||||||
|
|
||||||
ba.wrapper tag: :div, class: :label_input__wrapper do |bb|
|
ba.wrapper tag: :div, class: :label_input__wrapper do |bb|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
en:
|
en:
|
||||||
simple_form:
|
simple_form:
|
||||||
|
fedibird_features: Fedibird
|
||||||
hints:
|
hints:
|
||||||
account_alias:
|
account_alias:
|
||||||
acct: Specify the username@domain of the account you want to move from
|
acct: Specify the username@domain of the account you want to move from
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
---
|
---
|
||||||
ja:
|
ja:
|
||||||
simple_form:
|
simple_form:
|
||||||
|
fedibird_features: Fedibird
|
||||||
hints:
|
hints:
|
||||||
account_alias:
|
account_alias:
|
||||||
acct: 引っ越し元のユーザー名@ドメインを指定してください
|
acct: 引っ越し元のユーザー名@ドメインを指定してください
|
||||||
|
|
Loading…
Reference in a new issue