Merge branch 'vue3-again' into shigusegubu-vue3
* vue3-again: fix user-list-popover fix duplicate setting (most likely a merge issue) fix opening directly to filtering tab not working Fix notices not disappearing on their own fix another spacing issue
This commit is contained in:
commit
83845f1a01
5 changed files with 14 additions and 20 deletions
|
@ -63,8 +63,8 @@ const SettingsModalContent = {
|
||||||
const targetTab = this.$store.state.interface.settingsModalTargetTab
|
const targetTab = this.$store.state.interface.settingsModalTargetTab
|
||||||
// We're being told to open in specific tab
|
// We're being told to open in specific tab
|
||||||
if (targetTab) {
|
if (targetTab) {
|
||||||
const tabIndex = this.$refs.tabSwitcher.$slots.default.findIndex(elm => {
|
const tabIndex = this.$refs.tabSwitcher.$slots.default().findIndex(elm => {
|
||||||
return elm.data && elm.data.attrs['data-tab-name'] === targetTab
|
return elm.props && elm.props['data-tab-name'] === targetTab
|
||||||
})
|
})
|
||||||
if (tabIndex >= 0) {
|
if (tabIndex >= 0) {
|
||||||
this.$refs.tabSwitcher.setTab(tabIndex)
|
this.$refs.tabSwitcher.setTab(tabIndex)
|
||||||
|
|
|
@ -72,22 +72,10 @@
|
||||||
<div>{{ $t('settings.filtering_explanation') }}</div>
|
<div>{{ $t('settings.filtering_explanation') }}</div>
|
||||||
</li>
|
</li>
|
||||||
<h3>{{ $t('settings.attachments') }}</h3>
|
<h3>{{ $t('settings.attachments') }}</h3>
|
||||||
<li v-if="expertLevel > 0">
|
|
||||||
<label for="maxThumbnails">
|
|
||||||
{{ $t('settings.max_thumbnails') }}
|
|
||||||
</label>
|
|
||||||
<input
|
|
||||||
id="maxThumbnails"
|
|
||||||
path.number="maxThumbnails"
|
|
||||||
class="number-input"
|
|
||||||
type="number"
|
|
||||||
min="0"
|
|
||||||
step="1"
|
|
||||||
>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<IntegerSetting
|
<IntegerSetting
|
||||||
path="maxThumbnails"
|
path="maxThumbnails"
|
||||||
|
expert="1"
|
||||||
:min="0"
|
:min="0"
|
||||||
>
|
>
|
||||||
{{ $t('settings.max_thumbnails') }}
|
{{ $t('settings.max_thumbnails') }}
|
||||||
|
|
|
@ -101,6 +101,7 @@
|
||||||
:to="retweeterProfileLink"
|
:to="retweeterProfileLink"
|
||||||
>{{ retweeter }}</router-link>
|
>{{ retweeter }}</router-link>
|
||||||
</span>
|
</span>
|
||||||
|
{{ ' ' }}
|
||||||
<FAIcon
|
<FAIcon
|
||||||
icon="retweet"
|
icon="retweet"
|
||||||
class="repeat-icon"
|
class="repeat-icon"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
import RichContent from 'src/components/rich_content/rich_content.jsx'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
@ -13,6 +14,7 @@ const UserListPopover = {
|
||||||
'users'
|
'users'
|
||||||
],
|
],
|
||||||
components: {
|
components: {
|
||||||
|
RichContent,
|
||||||
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
|
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
|
||||||
UserAvatar: defineAsyncComponent(() => import('../user_avatar/user_avatar.vue'))
|
UserAvatar: defineAsyncComponent(() => import('../user_avatar/user_avatar.vue'))
|
||||||
},
|
},
|
||||||
|
|
|
@ -106,7 +106,7 @@ const interfaceMod = {
|
||||||
commit('openSettingsModal')
|
commit('openSettingsModal')
|
||||||
},
|
},
|
||||||
pushGlobalNotice (
|
pushGlobalNotice (
|
||||||
{ commit, dispatch },
|
{ commit, dispatch, state },
|
||||||
{
|
{
|
||||||
messageKey,
|
messageKey,
|
||||||
messageArgs = {},
|
messageArgs = {},
|
||||||
|
@ -118,11 +118,14 @@ const interfaceMod = {
|
||||||
messageArgs,
|
messageArgs,
|
||||||
level
|
level
|
||||||
}
|
}
|
||||||
if (timeout) {
|
|
||||||
setTimeout(() => dispatch('removeGlobalNotice', notice), timeout)
|
|
||||||
}
|
|
||||||
commit('pushGlobalNotice', notice)
|
commit('pushGlobalNotice', notice)
|
||||||
return notice
|
// Adding a new element to array wraps it in a Proxy, which breaks the comparison
|
||||||
|
// TODO: Generate UUID or something instead or relying on !== operator?
|
||||||
|
const newNotice = state.globalNotices[state.globalNotices.length - 1]
|
||||||
|
if (timeout) {
|
||||||
|
setTimeout(() => dispatch('removeGlobalNotice', newNotice), timeout)
|
||||||
|
}
|
||||||
|
return newNotice
|
||||||
},
|
},
|
||||||
removeGlobalNotice ({ commit }, notice) {
|
removeGlobalNotice ({ commit }, notice) {
|
||||||
commit('removeGlobalNotice', notice)
|
commit('removeGlobalNotice', notice)
|
||||||
|
|
Loading…
Add table
Reference in a new issue