Add hexagon avatar mode (joke)
This commit is contained in:
parent
4e41bbb9b7
commit
11a784735a
11 changed files with 25 additions and 0 deletions
|
@ -79,6 +79,7 @@ class Settings::PreferencesController < Settings::BaseController
|
||||||
:setting_disable_joke_appearance,
|
:setting_disable_joke_appearance,
|
||||||
:setting_new_features_policy,
|
:setting_new_features_policy,
|
||||||
:setting_theme_instance_ticker,
|
:setting_theme_instance_ticker,
|
||||||
|
:setting_hexagon_avatar,
|
||||||
:setting_enable_status_reference,
|
:setting_enable_status_reference,
|
||||||
:setting_match_visibility_of_references,
|
:setting_match_visibility_of_references,
|
||||||
:setting_post_reference_modal,
|
:setting_post_reference_modal,
|
||||||
|
|
|
@ -144,6 +144,7 @@ module ApplicationHelper
|
||||||
output << "theme-#{current_theme.parameterize}"
|
output << "theme-#{current_theme.parameterize}"
|
||||||
output << 'system-font' if current_account&.user&.setting_system_font_ui
|
output << 'system-font' if current_account&.user&.setting_system_font_ui
|
||||||
output << (current_account&.user&.setting_reduce_motion ? 'reduce-motion' : 'no-reduce-motion')
|
output << (current_account&.user&.setting_reduce_motion ? 'reduce-motion' : 'no-reduce-motion')
|
||||||
|
output << 'hexagon-avatar' if current_account&.user&.setting_hexagon_avatar
|
||||||
output << 'rtl' if locale_direction == 'rtl'
|
output << 'rtl' if locale_direction == 'rtl'
|
||||||
output.reject(&:blank?).join(' ')
|
output.reject(&:blank?).join(' ')
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,3 +27,4 @@
|
||||||
@import 'mastodon/dashboard';
|
@import 'mastodon/dashboard';
|
||||||
@import 'mastodon/rtl';
|
@import 'mastodon/rtl';
|
||||||
@import 'mastodon/accessibility';
|
@import 'mastodon/accessibility';
|
||||||
|
@import 'mastodon/hexagon_avatar';
|
||||||
|
|
0
app/javascript/styles/hexagon_avatar.scss
Normal file
0
app/javascript/styles/hexagon_avatar.scss
Normal file
8
app/javascript/styles/mastodon/hexagon_avatar.scss
Normal file
8
app/javascript/styles/mastodon/hexagon_avatar.scss
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.hexagon-avatar {
|
||||||
|
.account__avatar,
|
||||||
|
.account__avatar-overlay-base,
|
||||||
|
.account__avatar-overlay-overlay {
|
||||||
|
-webkit-mask-image: url("data:image/svg+xml,%3Csvg%20id%3D%22nft-hexagon-mask%22%20data-name%3D%22nft-hexagon-mask%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%20400%22%3E%3Cpolygon%20points%3D%22300%2026.8%20100%2026.8%200%20200%20100%20373.2%20300%20373.2%20400%20200%20300%2026.8%22%2F%3E%3C%2Fsvg%3E");
|
||||||
|
mask-image: url("data:image/svg+xml,%3Csvg%20id%3D%22nft-hexagon-mask%22%20data-name%3D%22nft-hexagon-mask%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20400%20400%22%3E%3Cpolygon%20points%3D%22300%2026.8%20100%2026.8%200%20200%20100%20373.2%20300%20373.2%20400%20200%20300%2026.8%22%2F%3E%3C%2Fsvg%3E");
|
||||||
|
}
|
||||||
|
}
|
|
@ -78,6 +78,7 @@ class UserSettingsDecorator
|
||||||
user.settings['theme_instance_ticker'] = theme_instance_ticker if change?('setting_theme_instance_ticker')
|
user.settings['theme_instance_ticker'] = theme_instance_ticker if change?('setting_theme_instance_ticker')
|
||||||
user.settings['enable_status_reference'] = enable_status_reference_preference if change?('setting_enable_status_reference')
|
user.settings['enable_status_reference'] = enable_status_reference_preference if change?('setting_enable_status_reference')
|
||||||
user.settings['match_visibility_of_references'] = match_visibility_of_references_preference if change?('setting_match_visibility_of_references')
|
user.settings['match_visibility_of_references'] = match_visibility_of_references_preference if change?('setting_match_visibility_of_references')
|
||||||
|
user.settings['hexagon_avatar'] = hexagon_avatar_preference if change?('setting_hexagon_avatar')
|
||||||
end
|
end
|
||||||
|
|
||||||
def merged_notification_emails
|
def merged_notification_emails
|
||||||
|
@ -268,6 +269,10 @@ end
|
||||||
settings['setting_theme_instance_ticker']
|
settings['setting_theme_instance_ticker']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def hexagon_avatar_preference
|
||||||
|
boolean_cast_setting 'setting_hexagon_avatar'
|
||||||
|
end
|
||||||
|
|
||||||
def enable_status_reference_preference
|
def enable_status_reference_preference
|
||||||
boolean_cast_setting 'setting_enable_status_reference'
|
boolean_cast_setting 'setting_enable_status_reference'
|
||||||
end
|
end
|
||||||
|
|
|
@ -136,6 +136,7 @@ class User < ApplicationRecord
|
||||||
:theme_instance_ticker,
|
:theme_instance_ticker,
|
||||||
:enable_status_reference, :match_visibility_of_references,
|
:enable_status_reference, :match_visibility_of_references,
|
||||||
:post_reference_modal, :add_reference_modal, :unselect_reference_modal,
|
:post_reference_modal, :add_reference_modal, :unselect_reference_modal,
|
||||||
|
:hexagon_avatar,
|
||||||
|
|
||||||
to: :settings, prefix: :setting, allow_nil: false
|
to: :settings, prefix: :setting, allow_nil: false
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
.fields-row__column.fields-row__column-6
|
.fields-row__column.fields-row__column-6
|
||||||
= f.input :setting_theme_instance_ticker, collection: ['none', 'type-0', 'type-1', 'type-2', 'type-3'], label_method: lambda { |item| t("simple_form.hints.defaults.setting_theme_instance_ticker_#{item}") }, wrapper: :with_label, include_blank: false, hint: t('simple_form.hints.defaults.setting_theme_instance_ticker_html'), fedibird_features: true
|
= f.input :setting_theme_instance_ticker, collection: ['none', 'type-0', 'type-1', 'type-2', 'type-3'], label_method: lambda { |item| t("simple_form.hints.defaults.setting_theme_instance_ticker_#{item}") }, wrapper: :with_label, include_blank: false, hint: t('simple_form.hints.defaults.setting_theme_instance_ticker_html'), fedibird_features: true
|
||||||
|
|
||||||
|
.fields-group
|
||||||
|
= f.input :setting_hexagon_avatar, as: :boolean, wrapper: :with_label, hint: true, fedibird_features: true
|
||||||
|
|
||||||
%h4= t 'appearance.advanced_web_interface'
|
%h4= t 'appearance.advanced_web_interface'
|
||||||
|
|
||||||
%p.hint= t 'appearance.advanced_web_interface_hint'
|
%p.hint= t 'appearance.advanced_web_interface_hint'
|
||||||
|
|
|
@ -62,6 +62,7 @@ en:
|
||||||
setting_enable_reaction: Enable the reaction display on the timeline and display the reaction button
|
setting_enable_reaction: Enable the reaction display on the timeline and display the reaction button
|
||||||
setting_enable_status_reference: Enable the feature where a post references another post
|
setting_enable_status_reference: Enable the feature where a post references another post
|
||||||
setting_follow_button_to_list_adder: Change the behavior of the Follow / Subscribe button, open a dialog where you can select a list to follow / subscribe, or opt out of receiving at home
|
setting_follow_button_to_list_adder: Change the behavior of the Follow / Subscribe button, open a dialog where you can select a list to follow / subscribe, or opt out of receiving at home
|
||||||
|
setting_hexagon_avatar: Display everyone's avatar icon as a hollowed out hexagon (joke feature)
|
||||||
setting_hide_followers_count: The number of followers will be hidden in your profile
|
setting_hide_followers_count: The number of followers will be hidden in your profile
|
||||||
setting_hide_following_count: The number of following will be hidden in your profile
|
setting_hide_following_count: The number of following will be hidden in your profile
|
||||||
setting_hide_network: Who you follow and who follows you will be hidden on your profile
|
setting_hide_network: Who you follow and who follows you will be hidden on your profile
|
||||||
|
@ -218,6 +219,7 @@ en:
|
||||||
setting_enable_status_reference: Enable reference
|
setting_enable_status_reference: Enable reference
|
||||||
setting_expand_spoilers: Always expand posts marked with content warnings
|
setting_expand_spoilers: Always expand posts marked with content warnings
|
||||||
setting_follow_button_to_list_adder: Open list add dialog with follow button
|
setting_follow_button_to_list_adder: Open list add dialog with follow button
|
||||||
|
setting_hexagon_avatar: Experience NFT Avatar
|
||||||
setting_hide_followers_count: Hide your followers count
|
setting_hide_followers_count: Hide your followers count
|
||||||
setting_hide_following_count: Hide your following count
|
setting_hide_following_count: Hide your following count
|
||||||
setting_hide_network: Hide your social graph
|
setting_hide_network: Hide your social graph
|
||||||
|
|
|
@ -62,6 +62,7 @@ ja:
|
||||||
setting_enable_reaction: タイムラインでリアクションの表示を有効にし、リアクションボタンを表示する
|
setting_enable_reaction: タイムラインでリアクションの表示を有効にし、リアクションボタンを表示する
|
||||||
setting_enable_status_reference: 投稿が別の投稿を参照する機能を有効にします
|
setting_enable_status_reference: 投稿が別の投稿を参照する機能を有効にします
|
||||||
setting_follow_button_to_list_adder: フォロー・購読ボタンの動作を変更し、フォロー・購読するリストを選択したり、ホームで受け取らないよう設定するダイアログを開きます
|
setting_follow_button_to_list_adder: フォロー・購読ボタンの動作を変更し、フォロー・購読するリストを選択したり、ホームで受け取らないよう設定するダイアログを開きます
|
||||||
|
setting_hexagon_avatar: 全員のアバターアイコンを6角形にくりぬいて表示します(ジョーク機能)
|
||||||
setting_hide_followers_count: フォロワー数をプロフィールページで見られないようにします
|
setting_hide_followers_count: フォロワー数をプロフィールページで見られないようにします
|
||||||
setting_hide_following_count: フォロー数をプロフィールページで見られないようにします
|
setting_hide_following_count: フォロー数をプロフィールページで見られないようにします
|
||||||
setting_hide_network: フォローとフォロワーの情報がプロフィールページで見られないようにします
|
setting_hide_network: フォローとフォロワーの情報がプロフィールページで見られないようにします
|
||||||
|
@ -218,6 +219,7 @@ ja:
|
||||||
setting_enable_status_reference: 参照を有効にする
|
setting_enable_status_reference: 参照を有効にする
|
||||||
setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する
|
setting_expand_spoilers: 閲覧注意としてマークされた投稿を常に展開する
|
||||||
setting_follow_button_to_list_adder: フォローボタンでリスト追加ダイアログを開く
|
setting_follow_button_to_list_adder: フォローボタンでリスト追加ダイアログを開く
|
||||||
|
setting_hexagon_avatar: NFTアイコンを体験する
|
||||||
setting_hide_followers_count: フォロワー数を隠す
|
setting_hide_followers_count: フォロワー数を隠す
|
||||||
setting_hide_following_count: フォロー数を隠す
|
setting_hide_following_count: フォロー数を隠す
|
||||||
setting_hide_network: 繋がりを隠す
|
setting_hide_network: 繋がりを隠す
|
||||||
|
|
|
@ -96,6 +96,7 @@ defaults: &defaults
|
||||||
post_reference_modal: false
|
post_reference_modal: false
|
||||||
add_reference_modal: true
|
add_reference_modal: true
|
||||||
unselect_reference_modal: false
|
unselect_reference_modal: false
|
||||||
|
hexagon_avatar: false
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *defaults
|
<<: *defaults
|
||||||
|
|
Loading…
Reference in a new issue