Merge branch 'customizable-post-actions' into shigusegubu-themes3
This commit is contained in:
commit
04c5699c5a
10 changed files with 101 additions and 46 deletions
69
src/App.scss
69
src/App.scss
|
@ -408,32 +408,11 @@ nav {
|
|||
}
|
||||
}
|
||||
|
||||
.menu-item,
|
||||
.list-item {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
outline: none;
|
||||
text-align: initial;
|
||||
color: inherit;
|
||||
clear: both;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
border-color: var(--border);
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
border-top-width: 1px;
|
||||
width: 100%;
|
||||
padding: var(--__vertical-gap) var(--__horizontal-gap);
|
||||
background: transparent;
|
||||
|
||||
--__line-height: 1.5em;
|
||||
--__horizontal-gap: 0.75em;
|
||||
--__vertical-gap: 0.5em;
|
||||
|
||||
&.-non-interactive {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
&.-active,
|
||||
&:hover {
|
||||
|
@ -455,18 +434,6 @@ nav {
|
|||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
a,
|
||||
button:not(.button-default) {
|
||||
text-align: initial;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
display: inline;
|
||||
font-family: inherit;
|
||||
line-height: unset;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-top-right-radius: var(--roundness);
|
||||
border-top-left-radius: var(--roundness);
|
||||
|
@ -480,6 +447,42 @@ nav {
|
|||
}
|
||||
}
|
||||
|
||||
.menu-item,
|
||||
.list-item {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
outline: none;
|
||||
text-align: initial;
|
||||
color: inherit;
|
||||
clear: both;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
padding: var(--__vertical-gap) var(--__horizontal-gap);
|
||||
background: transparent;
|
||||
|
||||
--__line-height: 1.5em;
|
||||
--__horizontal-gap: 0.75em;
|
||||
--__vertical-gap: 0.5em;
|
||||
|
||||
&.-non-interactive {
|
||||
cursor: auto;
|
||||
}
|
||||
|
||||
a,
|
||||
button:not(.button-default) {
|
||||
text-align: initial;
|
||||
padding: 0;
|
||||
background: none;
|
||||
border: none;
|
||||
outline: none;
|
||||
display: inline;
|
||||
font-family: inherit;
|
||||
line-height: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.button-unstyled {
|
||||
border: none;
|
||||
outline: none;
|
||||
|
|
|
@ -350,6 +350,7 @@ const conversation = {
|
|||
},
|
||||
...mapGetters(['mergedConfig']),
|
||||
...mapState({
|
||||
mobileLayout: state => state.interface.layoutType === 'mobile',
|
||||
mastoUserSocketStatus: state => state.api.mastoUserSocketStatus
|
||||
})
|
||||
},
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
{{ $t('timeline.collapse') }}
|
||||
</button>
|
||||
<QuickFilterSettings
|
||||
v-if="!collapsable"
|
||||
v-if="!collapsable && mobileLayout"
|
||||
:conversation="true"
|
||||
class="rightside-button"
|
||||
/>
|
||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
|||
{
|
||||
component: 'Root',
|
||||
directives: {
|
||||
'--defaultInputBevel': 'shadow | $borderSide(#FFFFFF bottom 0.2), $borderSide(#000000 top 0.2), inset 0 0 2 #000000 / 0.15',
|
||||
'--defaultInputBevel': 'shadow | $borderSide(#FFFFFF bottom 0.2), $borderSide(#000000 top 0.2), inset 0 0 2 #000000 / 0.15, 1 0 1 1 --text / 0.15, -1 0 1 1 --text / 0.15',
|
||||
'--defaultInputHoverGlow': 'shadow | 0 0 4 --text / 0.5',
|
||||
'--defaultInputFocusGlow': 'shadow | 0 0 4 4 --link / 0.5'
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import Popover from '../popover/popover.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faFilter, faFont, faWrench } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
|
@ -11,7 +11,8 @@ library.add(
|
|||
|
||||
const QuickFilterSettings = {
|
||||
props: {
|
||||
conversation: Boolean
|
||||
conversation: Boolean,
|
||||
nested: Boolean
|
||||
},
|
||||
components: {
|
||||
Popover
|
||||
|
@ -27,6 +28,25 @@ const QuickFilterSettings = {
|
|||
},
|
||||
computed: {
|
||||
...mapGetters(['mergedConfig']),
|
||||
...mapState({
|
||||
mobileLayout: state => state.interface.layoutType === 'mobile'
|
||||
}),
|
||||
triggerAttrs () {
|
||||
if (this.mobileLayout) {
|
||||
return {}
|
||||
} else {
|
||||
return {
|
||||
title: this.$t('timeline.quick_filter_settings')
|
||||
}
|
||||
}
|
||||
},
|
||||
mainClass () {
|
||||
if (this.mobileLayout) {
|
||||
return 'main-button'
|
||||
} else {
|
||||
return 'dropdown-item'
|
||||
}
|
||||
},
|
||||
loggedIn () {
|
||||
return !!this.$store.state.users.currentUser
|
||||
},
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<template>
|
||||
<Popover
|
||||
trigger="click"
|
||||
:trigger="nested ? 'hover' : 'click'"
|
||||
class="QuickFilterSettings"
|
||||
:bound-to="{ x: 'container' }"
|
||||
:trigger-attrs="{ title: $t('timeline.quick_filter_settings') }"
|
||||
:position="nested ? 'right' : 'top'"
|
||||
:trigger-attrs="triggerAttrs"
|
||||
>
|
||||
<template #content>
|
||||
<div
|
||||
|
@ -137,7 +138,19 @@
|
|||
</div>
|
||||
</template>
|
||||
<template #trigger>
|
||||
<FAIcon icon="filter" />
|
||||
<div :class="mobileLayout ? 'main-button' : ''">
|
||||
<FAIcon icon="filter" :fixed-width="nested"/>
|
||||
<template v-if="nested">
|
||||
{{$t('timeline.filter_settings')}}
|
||||
</template>
|
||||
<FAIcon
|
||||
v-if="nested"
|
||||
class="chevron-icon"
|
||||
size="lg"
|
||||
icon="chevron-right"
|
||||
fixed-width
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</Popover>
|
||||
</template>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import Popover from '../popover/popover.vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Popover from 'src/components/popover/popover.vue'
|
||||
import QuickFilterSettings from 'src/components/quick_filter_settings/quick_filter_settings.vue'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||
import { faList, faFolderTree, faBars, faWrench } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
|
@ -15,7 +16,8 @@ const QuickViewSettings = {
|
|||
conversation: Boolean
|
||||
},
|
||||
components: {
|
||||
Popover
|
||||
Popover,
|
||||
QuickFilterSettings
|
||||
},
|
||||
methods: {
|
||||
setConversationDisplay (visibility) {
|
||||
|
@ -27,6 +29,9 @@ const QuickViewSettings = {
|
|||
},
|
||||
computed: {
|
||||
...mapGetters(['mergedConfig']),
|
||||
...mapState({
|
||||
mobileLayout: state => state.interface.layoutType === 'mobile'
|
||||
}),
|
||||
loggedIn () {
|
||||
return !!this.$store.state.users.currentUser
|
||||
},
|
||||
|
|
|
@ -3,13 +3,24 @@
|
|||
trigger="click"
|
||||
class="QuickViewSettings"
|
||||
:bound-to="{ x: 'container' }"
|
||||
:trigger-attrs="{ title: $t('timeline.quick_view_settings') }"
|
||||
:trigger-attrs="triggerAttrs"
|
||||
>
|
||||
<template #content>
|
||||
<div
|
||||
class="dropdown-menu"
|
||||
role="menu"
|
||||
>
|
||||
<div
|
||||
v-if="mobileLayout"
|
||||
class="menu-item dropdown-item -icon"
|
||||
>
|
||||
<QuickFilterSettings :nested="true" />
|
||||
</div>
|
||||
<div
|
||||
v-if="mobileLayout"
|
||||
role="separator"
|
||||
class="dropdown-divider"
|
||||
/>
|
||||
<div role="group">
|
||||
<div class="menu-item dropdown-item -icon-double">
|
||||
<button
|
||||
|
@ -60,7 +71,7 @@
|
|||
@click="showUserAvatars = !showUserAvatars"
|
||||
>
|
||||
<span
|
||||
class="main-button"
|
||||
class="input menu-checkbox"
|
||||
:class="{ 'menu-checkbox-checked': showUserAvatars }"
|
||||
:aria-hidden="true"
|
||||
/>{{ $t('settings.mention_link_show_avatar_quick') }}
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
</template>
|
||||
<QuickFilterSettings
|
||||
class="rightside-button"
|
||||
v-if="!mobileLayout"
|
||||
/>
|
||||
<QuickViewSettings
|
||||
class="rightside-button"
|
||||
|
|
|
@ -1214,7 +1214,8 @@
|
|||
"socket_reconnected": "Realtime connection established",
|
||||
"socket_broke": "Realtime connection lost: CloseEvent code {0}",
|
||||
"quick_view_settings": "Quick view settings",
|
||||
"quick_filter_settings": "Quick filter settings"
|
||||
"quick_filter_settings": "Quick filter settings",
|
||||
"filter_settings": "Filter"
|
||||
},
|
||||
"status": {
|
||||
"favorites": "Favorites",
|
||||
|
|
Loading…
Add table
Reference in a new issue