From 94d640f9f16c40a2586a00ecd774adbc977c06e0 Mon Sep 17 00:00:00 2001 From: Denys Nykula Date: Mon, 1 May 2023 20:50:31 +0300 Subject: [PATCH 01/10] fix dropdown-item-icon and form controls using missing variables --- src/App.scss | 2 +- src/components/popover/popover.vue | 2 +- src/components/select/select.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.scss b/src/App.scss index 38574cab..36176b35 100644 --- a/src/App.scss +++ b/src/App.scss @@ -469,7 +469,7 @@ textarea, color: $fallback--lightText; color: var(--inputText, $fallback--lightText); font-family: sans-serif; - font-family: var(--inputFont, sans-serif); + font-family: var(--interfaceFont, sans-serif); font-size: 1em; margin: 0; box-sizing: border-box; diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue index c2a3e801..bd6284b3 100644 --- a/src/components/popover/popover.vue +++ b/src/components/popover/popover.vue @@ -114,7 +114,7 @@ svg { width: 22px; margin-right: 0.75rem; - color: var(--menuPopoverIcon, $fallback--icon) + color: var(--popoverIcon, $fallback--icon) } } diff --git a/src/components/select/select.vue b/src/components/select/select.vue index 92493b0b..7b877ba4 100644 --- a/src/components/select/select.vue +++ b/src/components/select/select.vue @@ -38,7 +38,7 @@ label.Select { margin: 0; padding: 0 2em 0 .2em; font-family: sans-serif; - font-family: var(--inputFont, sans-serif); + font-family: var(--interfaceFont, sans-serif); font-size: 1em; width: 100%; z-index: 1; From 661a98d38dedbd2075d6d39b245f85b681fee80f Mon Sep 17 00:00:00 2001 From: Denys Nykula Date: Mon, 1 May 2023 20:53:29 +0300 Subject: [PATCH 02/10] order bubble after public in sidebar like in other two menus --- .../timeline_menu/timeline_menu_content.vue | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/timeline_menu/timeline_menu_content.vue b/src/components/timeline_menu/timeline_menu_content.vue index bb170b82..7c351721 100644 --- a/src/components/timeline_menu/timeline_menu_content.vue +++ b/src/components/timeline_menu/timeline_menu_content.vue @@ -16,22 +16,6 @@ >{{ $t("nav.home_timeline") }} -
  • - - - {{ $t("nav.bubble_timeline") }} - -
  • {{ $t("nav.public_tl") }}
  • +
  • + + + {{ $t("nav.bubble_timeline") }} + +
  • Date: Mon, 1 May 2023 20:54:18 +0300 Subject: [PATCH 03/10] fix apply theme button without page refresh --- .../tabs/theme_tab/theme_tab.scss | 4 ++++ src/services/style_setter/style_setter.js | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.scss b/src/components/settings_modal/tabs/theme_tab/theme_tab.scss index 0427e42f..0016a328 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.scss +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.scss @@ -89,6 +89,10 @@ margin: 1em 1em 0; } + .presets { + text-align: center; + } + .tab-header { display: flex; justify-content: space-between; diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index 9e691261..8954a9ce 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -7,14 +7,18 @@ export const applyTheme = (input) => { const body = document.body body.classList.add('hidden') - const styleEl = document.getElementById('theme-holder') - const styleSheet = styleEl.sheet + /** @type {CSSStyleSheet} */ + const styleSheet = document.getElementById('theme-holder').sheet + + for (let i = styleSheet.cssRules.length; i--; ) { + styleSheet.deleteRule(0) + } + + styleSheet.insertRule( + `:root { ${rules.radii}; ${rules.colors}; ${rules.shadows}; ${rules.fonts}; }`, + 0 + ) - styleSheet.toString() - styleSheet.insertRule(`:root { ${rules.radii} }`, 'index-max') - styleSheet.insertRule(`:root { ${rules.colors} }`, 'index-max') - styleSheet.insertRule(`:root { ${rules.shadows} }`, 'index-max') - styleSheet.insertRule(`:root { ${rules.fonts} }`, 'index-max') body.classList.remove('hidden') } From 8c6ccc321d5c4b0126f274b14ea6e26a99b483cc Mon Sep 17 00:00:00 2001 From: Denys Nykula Date: Mon, 15 May 2023 03:11:07 +0300 Subject: [PATCH 04/10] fix unfinished post being sent when scrolling --- src/components/post_status_form/post_status_form.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 02468f17..f4680336 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -291,12 +291,14 @@ > {{ $t('post_status.post') }} - + + + + -

    ({ + key: mode, + value: mode, + label: this.$t(`settings.user_accepts_direct_messages_from_${mode}`) + })) } }, components: { + ChoiceSetting, ScopeSelector, ImageCropper, EmojiInput, @@ -126,7 +134,8 @@ const ProfileTab = { fields_attributes: this.newFields.filter(el => el != null), bot: this.bot, show_role: this.showRole, - status_ttl_days: this.expirePosts ? this.newPostTTLDays : -1 + status_ttl_days: this.expirePosts ? this.newPostTTLDays : -1, + accepts_direct_messages_from: this.userAcceptsDirectMessagesFrom /* eslint-enable camelcase */ } diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue index 8748b685..9f80582f 100644 --- a/src/components/settings_modal/tabs/profile_tab.vue +++ b/src/components/settings_modal/tabs/profile_tab.vue @@ -89,6 +89,15 @@ {{ $t('settings.bot') }}

    +

    + + {{ $t('settings.user_accepts_direct_messages_from') }} + +

    {{ $t('settings.expire_posts_enabled') }} @@ -102,6 +111,9 @@ class="expire-posts-days" :placeholder="$t('settings.expire_posts_input_placeholder')" /> +

    +

    +

    { output.friends_count = data.following_count output.bot = data.bot + output.accepts_direct_messages_from = data.accepts_direct_messages_from output.follow_requests_count = data.follow_requests_count if (data.akkoma) { output.instance = data.akkoma.instance