From 433ea02a18c0328b8079a40657220633c09e363a Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 18 Apr 2021 14:58:02 +0300 Subject: Changed some of TabSwitcher's internals for easier Vue3 migration --- src/components/settings_modal/tabs/theme_tab/theme_tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js index 8960c566..727513f4 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -34,7 +34,7 @@ import OpacityInput from 'src/components/opacity_input/opacity_input.vue' import ShadowControl from 'src/components/shadow_control/shadow_control.vue' import FontControl from 'src/components/font_control/font_control.vue' import ContrastRatio from 'src/components/contrast_ratio/contrast_ratio.vue' -import TabSwitcher from 'src/components/tab_switcher/tab_switcher.js' +import TabSwitcher from 'src/components/tab_switcher/tab_switcher.jsx' import Checkbox from 'src/components/checkbox/checkbox.vue' import Preview from './preview.vue' -- cgit v1.2.3-70-g09d2 From 905b9771ec74c4c79e5795676ea9c3946e586ce9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Apr 2021 13:24:08 +0300 Subject: stop using vue.set --- src/components/font_control/font_control.js | 5 ++--- src/components/gallery/gallery.js | 2 +- .../settings_modal/tabs/theme_tab/theme_tab.js | 13 ++++++------ src/modules/chats.js | 22 ++++++++++----------- src/modules/config.js | 7 +++---- src/modules/instance.js | 3 +-- src/modules/interface.js | 9 +++------ src/modules/oauth.js | 4 +--- src/modules/polls.js | 13 ++++++------ src/modules/statuses.js | 15 +++++++------- src/modules/users.js | 23 +++++++++++----------- 11 files changed, 52 insertions(+), 64 deletions(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/font_control/font_control.js b/src/components/font_control/font_control.js index 6274780b..d3e4680f 100644 --- a/src/components/font_control/font_control.js +++ b/src/components/font_control/font_control.js @@ -1,4 +1,3 @@ -import { set } from 'vue' import { library } from '@fortawesome/fontawesome-svg-core' import { faChevronDown @@ -40,8 +39,8 @@ export default { return this.dValue.family }, set (v) { - set(this.lValue, 'family', v) - this.$emit('input', this.lValue) + this.lValue.family = v + this.$emit('update:modelValue', this.lValue) } }, isCustom () { diff --git a/src/components/gallery/gallery.js b/src/components/gallery/gallery.js index f856fd0a..d13d98f9 100644 --- a/src/components/gallery/gallery.js +++ b/src/components/gallery/gallery.js @@ -34,7 +34,7 @@ const Gallery = { }, methods: { onNaturalSizeLoad (id, size) { - this.$set(this.sizes, id, size) + this.sizes[id] = size }, rowStyle (itemsPerRow) { return { 'padding-bottom': `${(100 / (itemsPerRow + 0.6))}%` } diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js index 727513f4..9f4dd1a9 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -1,4 +1,3 @@ -import { set, delete as del } from 'vue' import { rgb2hex, hex2rgb, @@ -326,9 +325,9 @@ export default { }, set (val) { if (val) { - set(this.shadowsLocal, this.shadowSelected, this.currentShadowFallback.map(_ => Object.assign({}, _))) + this.shadowsLocal[this.shadowSelected] = this.currentShadowFallback.map(_ => Object.assign({}, _)) } else { - del(this.shadowsLocal, this.shadowSelected) + delete this.shadowsLocal[this.shadowSelected] } } }, @@ -340,7 +339,7 @@ export default { return this.shadowsLocal[this.shadowSelected] }, set (v) { - set(this.shadowsLocal, this.shadowSelected, v) + this.shadowsLocal[this.shadowSelected] = v } }, themeValid () { @@ -562,7 +561,7 @@ export default { .filter(_ => _.endsWith('ColorLocal') || _.endsWith('OpacityLocal')) .filter(_ => !v1OnlyNames.includes(_)) .forEach(key => { - set(this.$data, key, undefined) + this.$data[key] = undefined }) }, @@ -570,7 +569,7 @@ export default { Object.keys(this.$data) .filter(_ => _.endsWith('RadiusLocal')) .forEach(key => { - set(this.$data, key, undefined) + this.$data[key] = undefined }) }, @@ -578,7 +577,7 @@ export default { Object.keys(this.$data) .filter(_ => _.endsWith('OpacityLocal')) .forEach(key => { - set(this.$data, key, undefined) + this.$data[key] = undefined }) }, diff --git a/src/modules/chats.js b/src/modules/chats.js index 69d683bd..f28c2603 100644 --- a/src/modules/chats.js +++ b/src/modules/chats.js @@ -1,4 +1,4 @@ -import Vue from 'vue' +import { reactive } from 'vue' import { find, omitBy, orderBy, sumBy } from 'lodash' import chatService from '../services/chat_service/chat_service.js' import { parseChat, parseChatMessage } from '../services/entity_normalizer/entity_normalizer.service.js' @@ -13,8 +13,8 @@ const emptyChatList = () => ({ const defaultState = { chatList: emptyChatList(), chatListFetcher: null, - openedChats: {}, - openedChatMessageServices: {}, + openedChats: reactive({}), + openedChatMessageServices: reactive({}), fetcher: undefined, currentChatId: null, lastReadMessageId: null @@ -137,10 +137,10 @@ const chats = { }, addOpenedChat (state, { _dispatch, chat }) { state.currentChatId = chat.id - Vue.set(state.openedChats, chat.id, chat) + state.openedChats[chat.id] = chat if (!state.openedChatMessageServices[chat.id]) { - Vue.set(state.openedChatMessageServices, chat.id, chatService.empty(chat.id)) + state.openedChatMessageServices[chat.id] = chatService.empty(chat.id) } }, setCurrentChatId (state, { chatId }) { @@ -160,7 +160,7 @@ const chats = { } } else { state.chatList.data.push(updatedChat) - Vue.set(state.chatList.idStore, updatedChat.id, updatedChat) + state.chatList.idStore[updatedChat.id] = updatedChat } }) }, @@ -172,7 +172,7 @@ const chats = { chat.updated_at = updatedChat.updated_at } if (!chat) { state.chatList.data.unshift(updatedChat) } - Vue.set(state.chatList.idStore, updatedChat.id, updatedChat) + state.chatList.idStore[updatedChat.id] = updatedChat }, deleteChat (state, { _dispatch, id, _rootGetters }) { state.chats.data = state.chats.data.filter(conversation => @@ -186,8 +186,8 @@ const chats = { commit('setChatListFetcher', { fetcher: undefined }) for (const chatId in state.openedChats) { chatService.clear(state.openedChatMessageServices[chatId]) - Vue.delete(state.openedChats, chatId) - Vue.delete(state.openedChatMessageServices, chatId) + delete state.openedChats[chatId] + delete state.openedChatMessageServices[chatId] } }, setChatsLoading (state, { value }) { @@ -215,8 +215,8 @@ const chats = { for (const chatId in state.openedChats) { if (currentChatId !== chatId) { chatService.clear(state.openedChatMessageServices[chatId]) - Vue.delete(state.openedChats, chatId) - Vue.delete(state.openedChatMessageServices, chatId) + delete state.openedChats[chatId] + delete state.openedChatMessageServices[chatId] } } }, diff --git a/src/modules/config.js b/src/modules/config.js index 629588a8..9e419b40 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -1,4 +1,3 @@ -import { set, delete as del } from 'vue' import { setPreset, applyTheme } from '../services/style_setter/style_setter.js' import messages from '../i18n/messages' @@ -98,14 +97,14 @@ const config = { }, mutations: { setOption (state, { name, value }) { - set(state, name, value) + state[name] = value }, setHighlight (state, { user, color, type }) { const data = this.state.config.highlight[user] if (color || type) { - set(state.highlight, user, { color: color || data.color, type: type || data.type }) + state.highlight[user] = { color: color || data.color, type: type || data.type } } else { - del(state.highlight, user) + delete state.highlight[user] } } }, diff --git a/src/modules/instance.js b/src/modules/instance.js index 96de73ca..fd7d5efb 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -1,4 +1,3 @@ -import { set } from 'vue' import { getPreset, applyTheme } from '../services/style_setter/style_setter.js' import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js' import apiService from '../services/api/api.service.js' @@ -86,7 +85,7 @@ const instance = { mutations: { setInstanceOption (state, { name, value }) { if (typeof value !== 'undefined') { - set(state, name, value) + state[name] = value } }, setKnownDomains (state, domains) { diff --git a/src/modules/interface.js b/src/modules/interface.js index d6db32fd..6509386a 100644 --- a/src/modules/interface.js +++ b/src/modules/interface.js @@ -1,5 +1,3 @@ -import { set, delete as del } from 'vue' - const defaultState = { settingsModalState: 'hidden', settingsModalLoaded: false, @@ -29,11 +27,10 @@ const interfaceMod = { if (state.noticeClearTimeout) { clearTimeout(state.noticeClearTimeout) } - set(state.settings, 'currentSaveStateNotice', { error: false, data: success }) - set(state.settings, 'noticeClearTimeout', - setTimeout(() => del(state.settings, 'currentSaveStateNotice'), 2000)) + state.settings.currentSaveStateNotice = { error: false, data: success } + state.settings.noticeClearTimeout = setTimeout(() => delete state.settings.currentSaveStateNotice, 2000) } else { - set(state.settings, 'currentSaveStateNotice', { error: true, errorData: error }) + state.settings.currentSaveStateNotice = { error: true, errorData: error } } }, setNotificationPermission (state, permission) { diff --git a/src/modules/oauth.js b/src/modules/oauth.js index a2a83450..038bc3f3 100644 --- a/src/modules/oauth.js +++ b/src/modules/oauth.js @@ -1,5 +1,3 @@ -import { delete as del } from 'vue' - const oauth = { state: { clientId: false, @@ -29,7 +27,7 @@ const oauth = { state.userToken = false // state.token is userToken with older name, coming from persistent state // let's clear it as well, since it is being used as a fallback of state.userToken - del(state, 'token') + delete state.token } }, getters: { diff --git a/src/modules/polls.js b/src/modules/polls.js index 92b89a06..1c4f98a4 100644 --- a/src/modules/polls.js +++ b/src/modules/polls.js @@ -1,5 +1,4 @@ import { merge } from 'lodash' -import { set } from 'vue' const polls = { state: { @@ -13,25 +12,25 @@ const polls = { // Make expired-state change trigger re-renders properly poll.expired = Date.now() > Date.parse(poll.expires_at) if (existingPoll) { - set(state.pollsObject, poll.id, merge(existingPoll, poll)) + state.pollsObject[poll.id] = merge(existingPoll, poll) } else { - set(state.pollsObject, poll.id, poll) + state.pollsObject[poll.id] = poll } }, trackPoll (state, pollId) { const currentValue = state.trackedPolls[pollId] if (currentValue) { - set(state.trackedPolls, pollId, currentValue + 1) + state.trackedPolls[pollId] = currentValue + 1 } else { - set(state.trackedPolls, pollId, 1) + state.trackedPolls[pollId] = 1 } }, untrackPoll (state, pollId) { const currentValue = state.trackedPolls[pollId] if (currentValue) { - set(state.trackedPolls, pollId, currentValue - 1) + state.trackedPolls[pollId] = currentValue - 1 } else { - set(state.trackedPolls, pollId, 0) + state.trackedPolls[pollId] = 0 } } }, diff --git a/src/modules/statuses.js b/src/modules/statuses.js index ac5d25c4..a13930e9 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -12,7 +12,6 @@ import { isArray, omitBy } from 'lodash' -import { set } from 'vue' import { isStatusNotification, isValidNotification, @@ -92,7 +91,7 @@ const mergeOrAdd = (arr, obj, item) => { // This is a new item, prepare it prepareStatus(item) arr.push(item) - set(obj, item.id, item) + obj[item.id] = item return { item, new: true } } } @@ -131,7 +130,7 @@ const addStatusToGlobalStorage = (state, data) => { if (conversationsObject[conversationId]) { conversationsObject[conversationId].push(status) } else { - set(conversationsObject, conversationId, [status]) + conversationsObject[conversationId] = [status] } } return result @@ -523,7 +522,7 @@ export const mutations = { }, addEmojiReactionsBy (state, { id, emojiReactions, currentUser }) { const status = state.allStatusesObject[id] - set(status, 'emoji_reactions', emojiReactions) + status['emoji_reactions'] = emojiReactions }, addOwnReaction (state, { id, emoji, currentUser }) { const status = state.allStatusesObject[id] @@ -542,9 +541,9 @@ export const mutations = { // Update count of existing reaction if it exists, otherwise append at the end if (reactionIndex >= 0) { - set(status.emoji_reactions, reactionIndex, newReaction) + status.emoji_reactions[reactionIndex] = newReaction } else { - set(status, 'emoji_reactions', [...status.emoji_reactions, newReaction]) + status['emoji_reactions'] = [...status.emoji_reactions, newReaction] } }, removeOwnReaction (state, { id, emoji, currentUser }) { @@ -563,9 +562,9 @@ export const mutations = { } if (newReaction.count > 0) { - set(status.emoji_reactions, reactionIndex, newReaction) + status.emoji_reactions[reactionIndex] = newReaction } else { - set(status, 'emoji_reactions', status.emoji_reactions.filter(r => r.name !== emoji)) + status['emoji_reactions'] = status.emoji_reactions.filter(r => r.name !== emoji) } }, updateStatusWithPoll (state, { id, poll }) { diff --git a/src/modules/users.js b/src/modules/users.js index 8a764a16..3c7a49c6 100644 --- a/src/modules/users.js +++ b/src/modules/users.js @@ -1,7 +1,6 @@ import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' import oauthApi from '../services/new_api/oauth.js' import { compact, map, each, mergeWith, last, concat, uniq, isArray } from 'lodash' -import { set } from 'vue' import { registerPushNotifications, unregisterPushNotifications } from '../services/push/push.js' // TODO: Unify with mergeOrAdd in statuses.js @@ -15,9 +14,9 @@ export const mergeOrAdd = (arr, obj, item) => { } else { // This is a new item, prepare it arr.push(item) - set(obj, item.id, item) + obj[item.id] = item if (item.screen_name && !item.screen_name.includes('@')) { - set(obj, item.screen_name.toLowerCase(), item) + obj[item.screen_name.toLowerCase()] = item } return { item, new: true } } @@ -103,23 +102,23 @@ export const mutations = { const user = state.usersObject[id] const tags = user.tags || [] const newTags = tags.concat([tag]) - set(user, 'tags', newTags) + user['tags'] = newTags }, untagUser (state, { user: { id }, tag }) { const user = state.usersObject[id] const tags = user.tags || [] const newTags = tags.filter(t => t !== tag) - set(user, 'tags', newTags) + user['tags'] = newTags }, updateRight (state, { user: { id }, right, value }) { const user = state.usersObject[id] let newRights = user.rights newRights[right] = value - set(user, 'rights', newRights) + user['rights'] = newRights }, updateActivationStatus (state, { user: { id }, deactivated }) { const user = state.usersObject[id] - set(user, 'deactivated', deactivated) + user['deactivated'] = deactivated }, setCurrentUser (state, user) { state.lastLoginName = user.screen_name @@ -148,26 +147,26 @@ export const mutations = { clearFriends (state, userId) { const user = state.usersObject[userId] if (user) { - set(user, 'friendIds', []) + user['friendIds'] = [] } }, clearFollowers (state, userId) { const user = state.usersObject[userId] if (user) { - set(user, 'followerIds', []) + user['followerIds'] = [] } }, addNewUsers (state, users) { each(users, (user) => { if (user.relationship) { - set(state.relationships, user.relationship.id, user.relationship) + state.relationships[user.relationship.id] = user.relationship } mergeOrAdd(state.users, state.usersObject, user) }) }, updateUserRelationship (state, relationships) { relationships.forEach((relationship) => { - set(state.relationships, relationship.id, relationship) + state.relationships[relationship.id] = relationship }) }, saveBlockIds (state, blockIds) { @@ -222,7 +221,7 @@ export const mutations = { }, setColor (state, { user: { id }, highlighted }) { const user = state.usersObject[id] - set(user, 'highlight', highlighted) + user['highlight'] = highlighted }, signUpPending (state) { state.signUpPending = true -- cgit v1.2.3-70-g09d2 From 9e8513b3129b4e7ae22906522418e04aa3db5235 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 25 Apr 2021 13:25:42 +0300 Subject: i18n fixes --- src/components/notification/notification.vue | 4 ++-- src/components/poll/poll.vue | 4 ++-- src/components/post_status_form/post_status_form.vue | 6 +++--- src/components/settings_modal/tabs/theme_tab/preview.vue | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 0081dee4..cafa1e79 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -101,9 +101,9 @@ - + {{ notification.emoji }} - + diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index 187d1829..2215d675 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -65,13 +65,13 @@ {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} ·  - + - + diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 6b490aee..c0a85727 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -18,9 +18,9 @@
- @@ -30,7 +30,7 @@ > {{ $t('post_status.account_not_locked_warning_link') }} - +

- + {{ $t('settings.style.preview.mono') }} {{ $t('settings.style.preview.link') }} - +

-- cgit v1.2.3-70-g09d2 From 961ca3a71b2e5b5f98df5613d4348c8efee6ba05 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 23 Mar 2022 16:15:05 +0200 Subject: fix all the spacings i could find --- src/components/font_control/font_control.vue | 1 + .../interface_language_switcher/interface_language_switcher.vue | 1 + src/components/poll/poll_form.vue | 1 + src/components/scope_selector/scope_selector.vue | 3 +++ src/components/select/select.vue | 1 + src/components/settings_modal/helpers/choice_setting.vue | 1 + src/components/settings_modal/settings_modal.vue | 1 + src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 1 + src/components/status/status.vue | 1 + src/components/user_card/user_card.vue | 1 + 10 files changed, 12 insertions(+) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/font_control/font_control.vue b/src/components/font_control/font_control.vue index ddda218b..72b480ef 100644 --- a/src/components/font_control/font_control.vue +++ b/src/components/font_control/font_control.vue @@ -22,6 +22,7 @@ class="opt-l" :for="name + '-o'" /> + {{ ' ' }} + {{ ' ' }} + {{ ' ' }} + {{ ' ' }} + {{ ' ' }} diff --git a/src/components/user_card/user_card.vue b/src/components/user_card/user_card.vue index 0708f387..14b4643a 100644 --- a/src/components/user_card/user_card.vue +++ b/src/components/user_card/user_card.vue @@ -141,6 +141,7 @@ class="userHighlightCl" type="color" > + {{ ' ' }}
- filter: drop-shadow() - +

{{ $t('settings.style.shadows.filter_hint.avatar_inset') }}

- drop-shadow spread-radius inset - - + box-shadow - +

{{ $t('settings.style.shadows.filter_hint.spread_zero') }}

diff --git a/src/components/shadow_control/shadow_control.vue b/src/components/shadow_control/shadow_control.vue index 511e07f3..b59ac3bc 100644 --- a/src/components/shadow_control/shadow_control.vue +++ b/src/components/shadow_control/shadow_control.vue @@ -204,12 +204,12 @@ v-model="selected.alpha" :disabled="!present" /> - --variable,mod - +
diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue index e64455e0..48942005 100644 --- a/src/components/thread_tree/thread_tree.vue +++ b/src/components/thread_tree/thread_tree.vue @@ -74,36 +74,42 @@ v-if="currentReplies.length && !threadShowing" class="thread-tree-replies thread-tree-replies-hidden" > - - - - {{ $tc('status.thread_follow', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id] }) }} - - - + + + + + - - - {{ $tc('status.thread_show_full', totalReplyCount[status.id], { numStatus: totalReplyCount[status.id], depth: totalReplyDepth[status.id] }) }} - - + + + -- cgit v1.2.3-70-g09d2 From e58422889bbc6857c7f171978bb89da013284507 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Thu, 24 Mar 2022 18:01:20 -0400 Subject: Fix overlapping buttons in Theme settings --- src/components/settings_modal/settings_modal.scss | 5 ++++ src/components/settings_modal/settings_modal.vue | 4 +++ .../settings_modal/tabs/theme_tab/theme_tab.js | 5 ++++ .../settings_modal/tabs/theme_tab/theme_tab.scss | 30 ++++++++++--------- .../settings_modal/tabs/theme_tab/theme_tab.vue | 35 ++++++++++++---------- src/components/tab_switcher/tab_switcher.js | 6 ++++ 6 files changed, 56 insertions(+), 29 deletions(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/settings_modal/settings_modal.scss b/src/components/settings_modal/settings_modal.scss index fb466f2f..2f7649a9 100644 --- a/src/components/settings_modal/settings_modal.scss +++ b/src/components/settings_modal/settings_modal.scss @@ -54,5 +54,10 @@ >* { margin-right: 0.5em; } + + .extra-content { + display: flex; + flex-grow: 1; + } } } diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue index 1805c77f..b8de7e7e 100644 --- a/src/components/settings_modal/settings_modal.vue +++ b/src/components/settings_modal/settings_modal.vue @@ -112,6 +112,10 @@ {{ $t("settings.expert_mode") }} + diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js index 0b6669fc..c3ed3059 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -378,6 +378,11 @@ export default { // To separate from other random JSON files and possible future source formats _pleroma_theme_version: 2, theme, source } + }, + isActive () { + const tabSwitcher = this.$parent + console.log(this.$parent) + return tabSwitcher ? tabSwitcher.isActive('theme') : false } }, components: { 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 0db21537..21b49a32 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.scss +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.scss @@ -268,13 +268,6 @@ } } - .apply-container { - justify-content: center; - position: absolute; - bottom: 8px; - right: 5px; - } - .radius-item, .color-item { min-width: 20em; @@ -334,16 +327,25 @@ padding: 20px; } + .btn { + margin-left: .25em; + margin-right: .25em; + } +} + +.extra-content { .apply-container { + display: flex; + flex-direction: row; + justify-content: space-around; + flex-grow: 1; + .btn { + flex-grow: 1; min-height: 28px; - min-width: 10em; - padding: 0 2em; + min-width: 0; + max-width: 10em; + padding: 0; } } - - .btn { - margin-left: .25em; - margin-right: .25em; - } } diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue index c02986ed..c32f9353 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue @@ -1016,21 +1016,26 @@ -
- - -
+ +
+ + +
+
diff --git a/src/components/tab_switcher/tab_switcher.js b/src/components/tab_switcher/tab_switcher.js index 12aac8e6..d2a7f5c5 100644 --- a/src/components/tab_switcher/tab_switcher.js +++ b/src/components/tab_switcher/tab_switcher.js @@ -47,6 +47,12 @@ export default Vue.component('tab-switcher', { return this.active } }, + isActive () { + return tabName => { + const isWanted = slot => slot.data && slot.data.attrs['data-tab-name'] === tabName + return this.$slots.default.findIndex(isWanted) === this.activeIndex + } + }, settingsModalVisible () { return this.settingsModalState === 'visible' }, -- cgit v1.2.3-70-g09d2 From b319c0c72b5d4da224492574865a78fd624bf206 Mon Sep 17 00:00:00 2001 From: HJ <30-hj@users.noreply.git.pleroma.social> Date: Fri, 25 Mar 2022 13:17:22 +0000 Subject: Remove debugging code --- src/components/settings_modal/tabs/theme_tab/theme_tab.js | 1 - 1 file changed, 1 deletion(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js index c3ed3059..6d140b6c 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js @@ -381,7 +381,6 @@ export default { }, isActive () { const tabSwitcher = this.$parent - console.log(this.$parent) return tabSwitcher ? tabSwitcher.isActive('theme') : false } }, -- cgit v1.2.3-70-g09d2 From 87d420a92bdcf9e94923482986ea772bd3753184 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 27 Mar 2022 12:58:28 +0300 Subject: port !1488 to vue3 --- src/components/settings_modal/settings_modal.vue | 4 ++-- src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 6 +++--- src/components/tab_switcher/tab_switcher.jsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue index 28f85423..18dd3d7a 100644 --- a/src/components/settings_modal/settings_modal.vue +++ b/src/components/settings_modal/settings_modal.vue @@ -113,9 +113,9 @@ {{ $t("settings.expert_mode") }} - diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue index 9cdd229a..cf049a70 100644 --- a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue +++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue @@ -1018,9 +1018,9 @@ -
-
+ diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.jsx index 59ff98df..f5a1e603 100644 --- a/src/components/tab_switcher/tab_switcher.jsx +++ b/src/components/tab_switcher/tab_switcher.jsx @@ -50,7 +50,7 @@ export default { activeIndex () { // In case of controlled component if (this.activeTab) { - return this.slots().findIndex(slot => this.activeTab === slot.key) + return this.slots().findIndex(slot => this.activeTab === slot.props.key) } else { return this.active } @@ -58,7 +58,7 @@ export default { isActive () { return tabName => { const isWanted = slot => slot.props && slot.props['data-tab-name'] === tabName - return this.$slots.default.findIndex(isWanted) === this.activeIndex + return this.$slots.default().findIndex(isWanted) === this.activeIndex } }, settingsModalVisible () { -- cgit v1.2.3-70-g09d2 From 650e69c33683b34e002f5fdc698ceb384baf059b Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 29 Mar 2022 00:02:02 +0300 Subject: fix misc warnings --- src/components/notification/notification.vue | 2 +- src/components/poll/poll.vue | 2 +- src/components/settings_modal/helpers/integer_setting.js | 2 +- src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 6 +++--- src/components/shadow_control/shadow_control.vue | 2 +- src/components/thread_tree/thread_tree.vue | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 23157a51..d77b2f57 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -112,7 +112,7 @@ - + {{ notification.emoji }} diff --git a/src/components/poll/poll.vue b/src/components/poll/poll.vue index e949c653..c3880096 100644 --- a/src/components/poll/poll.vue +++ b/src/components/poll/poll.vue @@ -71,7 +71,7 @@ {{ $tc("polls.votes_count", poll.votes_count, { count: poll.votes_count }) }} ·  - +
- filter: drop-shadow()

{{ $t('settings.style.shadows.filter_hint.avatar_inset') }}

- @@ -966,7 +966,7 @@ spread-radius inset - diff --git a/src/components/shadow_control/shadow_control.vue b/src/components/shadow_control/shadow_control.vue index b59ac3bc..d1e5fc22 100644 --- a/src/components/shadow_control/shadow_control.vue +++ b/src/components/shadow_control/shadow_control.vue @@ -204,7 +204,7 @@ v-model="selected.alpha" :disabled="!present" /> - diff --git a/src/components/thread_tree/thread_tree.vue b/src/components/thread_tree/thread_tree.vue index 48942005..f81653eb 100644 --- a/src/components/thread_tree/thread_tree.vue +++ b/src/components/thread_tree/thread_tree.vue @@ -74,7 +74,7 @@ v-if="currentReplies.length && !threadShowing" class="thread-tree-replies thread-tree-replies-hidden" > - - Date: Tue, 29 Mar 2022 01:04:37 +0300 Subject: lint --- src/components/color_input/color_input.vue | 2 +- src/components/notification/notification.vue | 5 ++++- src/components/opacity_input/opacity_input.vue | 2 +- src/components/poll/poll.vue | 5 ++++- src/components/selectable_list/selectable_list.vue | 4 ++-- src/components/settings_modal/helpers/boolean_setting.vue | 2 +- src/components/settings_modal/helpers/choice_setting.vue | 2 +- src/components/settings_modal/settings_modal.vue | 7 +++++-- src/components/settings_modal/tabs/profile_tab.vue | 2 +- src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 9 ++++++--- src/components/shadow_control/shadow_control.vue | 3 ++- src/components/thread_tree/thread_tree.vue | 6 ++++-- src/components/user_avatar/user_avatar.vue | 2 +- src/components/user_reporting_modal/user_reporting_modal.vue | 2 +- 14 files changed, 34 insertions(+), 19 deletions(-) (limited to 'src/components/settings_modal/tabs/theme_tab') diff --git a/src/components/color_input/color_input.vue b/src/components/color_input/color_input.vue index bb25f5a8..e84603c3 100644 --- a/src/components/color_input/color_input.vue +++ b/src/components/color_input/color_input.vue @@ -11,7 +11,7 @@ - + {{ notification.emoji }} diff --git a/src/components/opacity_input/opacity_input.vue b/src/components/opacity_input/opacity_input.vue index 83bc917d..15d08e04 100644 --- a/src/components/opacity_input/opacity_input.vue +++ b/src/components/opacity_input/opacity_input.vue @@ -11,7 +11,7 @@
- +
@@ -31,7 +31,7 @@ >
diff --git a/src/components/settings_modal/helpers/boolean_setting.vue b/src/components/settings_modal/helpers/boolean_setting.vue index 3808bc74..69584808 100644 --- a/src/components/settings_modal/helpers/boolean_setting.vue +++ b/src/components/settings_modal/helpers/boolean_setting.vue @@ -4,7 +4,7 @@ class="BooleanSetting" > diff --git a/src/components/settings_modal/helpers/choice_setting.vue b/src/components/settings_modal/helpers/choice_setting.vue index b6aa853a..258c7422 100644 --- a/src/components/settings_modal/helpers/choice_setting.vue +++ b/src/components/settings_modal/helpers/choice_setting.vue @@ -6,7 +6,7 @@ {{ ' ' }} diff --git a/src/components/settings_modal/settings_modal.vue b/src/components/settings_modal/settings_modal.vue index e0e8304d..18dd3d7a 100644 --- a/src/components/settings_modal/settings_modal.vue +++ b/src/components/settings_modal/settings_modal.vue @@ -110,15 +110,12 @@ - + {{ $t("settings.expert_mode") }}
diff --git a/src/components/settings_modal/tabs/profile_tab.vue b/src/components/settings_modal/tabs/profile_tab.vue index d3f6727f..b78581bd 100644 --- a/src/components/settings_modal/tabs/profile_tab.vue +++ b/src/components/settings_modal/tabs/profile_tab.vue @@ -184,8 +184,8 @@