Compare commits
3 commits
e92ecc612f
...
04c5699c5a
Author | SHA1 | Date | |
---|---|---|---|
|
04c5699c5a | ||
|
4f108057a2 | ||
|
74b167f8db |
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 {
|
.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-color: var(--border);
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 0;
|
border-width: 0;
|
||||||
border-top-width: 1px;
|
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,
|
&.-active,
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -455,18 +434,6 @@ nav {
|
||||||
border-bottom-width: 1px;
|
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 {
|
&:first-child {
|
||||||
border-top-right-radius: var(--roundness);
|
border-top-right-radius: var(--roundness);
|
||||||
border-top-left-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 {
|
.button-unstyled {
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
|
@ -350,6 +350,7 @@ const conversation = {
|
||||||
},
|
},
|
||||||
...mapGetters(['mergedConfig']),
|
...mapGetters(['mergedConfig']),
|
||||||
...mapState({
|
...mapState({
|
||||||
|
mobileLayout: state => state.interface.layoutType === 'mobile',
|
||||||
mastoUserSocketStatus: state => state.api.mastoUserSocketStatus
|
mastoUserSocketStatus: state => state.api.mastoUserSocketStatus
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
{{ $t('timeline.collapse') }}
|
{{ $t('timeline.collapse') }}
|
||||||
</button>
|
</button>
|
||||||
<QuickFilterSettings
|
<QuickFilterSettings
|
||||||
v-if="!collapsable"
|
v-if="!collapsable && mobileLayout"
|
||||||
:conversation="true"
|
:conversation="true"
|
||||||
class="rightside-button"
|
class="rightside-button"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
||||||
{
|
{
|
||||||
component: 'Root',
|
component: 'Root',
|
||||||
directives: {
|
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',
|
'--defaultInputHoverGlow': 'shadow | 0 0 4 --text / 0.5',
|
||||||
'--defaultInputFocusGlow': 'shadow | 0 0 4 4 --link / 0.5'
|
'--defaultInputFocusGlow': 'shadow | 0 0 4 4 --link / 0.5'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Popover from '../popover/popover.vue'
|
import Popover from '../popover/popover.vue'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters, mapState } from 'vuex'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faFilter, faFont, faWrench } from '@fortawesome/free-solid-svg-icons'
|
import { faFilter, faFont, faWrench } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@ library.add(
|
||||||
|
|
||||||
const QuickFilterSettings = {
|
const QuickFilterSettings = {
|
||||||
props: {
|
props: {
|
||||||
conversation: Boolean
|
conversation: Boolean,
|
||||||
|
nested: Boolean
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Popover
|
Popover
|
||||||
|
@ -27,6 +28,25 @@ const QuickFilterSettings = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['mergedConfig']),
|
...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 () {
|
loggedIn () {
|
||||||
return !!this.$store.state.users.currentUser
|
return !!this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
<template>
|
<template>
|
||||||
<Popover
|
<Popover
|
||||||
trigger="click"
|
:trigger="nested ? 'hover' : 'click'"
|
||||||
class="QuickFilterSettings"
|
class="QuickFilterSettings"
|
||||||
:bound-to="{ x: 'container' }"
|
:bound-to="{ x: 'container' }"
|
||||||
:trigger-attrs="{ title: $t('timeline.quick_filter_settings') }"
|
:position="nested ? 'right' : 'top'"
|
||||||
|
:trigger-attrs="triggerAttrs"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div
|
<div
|
||||||
|
@ -137,7 +138,19 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #trigger>
|
<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>
|
</template>
|
||||||
</Popover>
|
</Popover>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import Popover from '../popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import { mapGetters } from 'vuex'
|
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 { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { faList, faFolderTree, faBars, faWrench } from '@fortawesome/free-solid-svg-icons'
|
import { faList, faFolderTree, faBars, faWrench } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
|
@ -15,7 +16,8 @@ const QuickViewSettings = {
|
||||||
conversation: Boolean
|
conversation: Boolean
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Popover
|
Popover,
|
||||||
|
QuickFilterSettings
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setConversationDisplay (visibility) {
|
setConversationDisplay (visibility) {
|
||||||
|
@ -27,6 +29,9 @@ const QuickViewSettings = {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['mergedConfig']),
|
...mapGetters(['mergedConfig']),
|
||||||
|
...mapState({
|
||||||
|
mobileLayout: state => state.interface.layoutType === 'mobile'
|
||||||
|
}),
|
||||||
loggedIn () {
|
loggedIn () {
|
||||||
return !!this.$store.state.users.currentUser
|
return !!this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,13 +3,24 @@
|
||||||
trigger="click"
|
trigger="click"
|
||||||
class="QuickViewSettings"
|
class="QuickViewSettings"
|
||||||
:bound-to="{ x: 'container' }"
|
:bound-to="{ x: 'container' }"
|
||||||
:trigger-attrs="{ title: $t('timeline.quick_view_settings') }"
|
:trigger-attrs="triggerAttrs"
|
||||||
>
|
>
|
||||||
<template #content>
|
<template #content>
|
||||||
<div
|
<div
|
||||||
class="dropdown-menu"
|
class="dropdown-menu"
|
||||||
role="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 role="group">
|
||||||
<div class="menu-item dropdown-item -icon-double">
|
<div class="menu-item dropdown-item -icon-double">
|
||||||
<button
|
<button
|
||||||
|
@ -60,7 +71,7 @@
|
||||||
@click="showUserAvatars = !showUserAvatars"
|
@click="showUserAvatars = !showUserAvatars"
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="main-button"
|
class="input menu-checkbox"
|
||||||
:class="{ 'menu-checkbox-checked': showUserAvatars }"
|
:class="{ 'menu-checkbox-checked': showUserAvatars }"
|
||||||
:aria-hidden="true"
|
:aria-hidden="true"
|
||||||
/>{{ $t('settings.mention_link_show_avatar_quick') }}
|
/>{{ $t('settings.mention_link_show_avatar_quick') }}
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
</template>
|
</template>
|
||||||
<QuickFilterSettings
|
<QuickFilterSettings
|
||||||
class="rightside-button"
|
class="rightside-button"
|
||||||
|
v-if="!mobileLayout"
|
||||||
/>
|
/>
|
||||||
<QuickViewSettings
|
<QuickViewSettings
|
||||||
class="rightside-button"
|
class="rightside-button"
|
||||||
|
|
|
@ -1214,7 +1214,8 @@
|
||||||
"socket_reconnected": "Realtime connection established",
|
"socket_reconnected": "Realtime connection established",
|
||||||
"socket_broke": "Realtime connection lost: CloseEvent code {0}",
|
"socket_broke": "Realtime connection lost: CloseEvent code {0}",
|
||||||
"quick_view_settings": "Quick view settings",
|
"quick_view_settings": "Quick view settings",
|
||||||
"quick_filter_settings": "Quick filter settings"
|
"quick_filter_settings": "Quick filter settings",
|
||||||
|
"filter_settings": "Filter"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"favorites": "Favorites",
|
"favorites": "Favorites",
|
||||||
|
|
Loading…
Add table
Reference in a new issue