Merge branch 'small-fixes-and-improvements' into shigusegubu-themes3
This commit is contained in:
commit
9f4e1d5363
11 changed files with 142 additions and 90 deletions
|
|
@ -54,7 +54,7 @@ export default {
|
||||||
{
|
{
|
||||||
variant: 'danger',
|
variant: 'danger',
|
||||||
directives: {
|
directives: {
|
||||||
background: '--cRed',
|
background: '$blend(--cRed 0.25 --inheritedBackground)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
.inner-nav {
|
.inner-nav {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: var(--navbar-height);
|
grid-template-rows: var(--navbar-height);
|
||||||
grid-template-columns: 2fr auto 2fr;
|
grid-template-columns: minmax(5em, 1fr) auto minmax(5em, 1fr);
|
||||||
grid-template-areas: "sitename logo actions";
|
grid-template-areas: "sitename logo actions";
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 1.2em;
|
padding: 0 1.2em;
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&.-logoLeft .inner-nav {
|
&.-logoLeft .inner-nav {
|
||||||
grid-template-columns: auto 2fr 2fr;
|
grid-template-columns: auto minmax(5em, 1fr) minmax(5em, 1fr);
|
||||||
grid-template-areas: "logo sitename actions";
|
grid-template-areas: "logo sitename actions";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,23 +92,18 @@
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
grid-area: actions;
|
grid-area: actions;
|
||||||
|
justify-content: flex-end;
|
||||||
|
text-align: right;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
flex: 1;
|
|
||||||
line-height: var(--navbar-height);
|
line-height: var(--navbar-height);
|
||||||
height: var(--navbar-height);
|
height: var(--navbar-height);
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
&.right {
|
|
||||||
justify-content: flex-end;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.spacer {
|
.spacer {
|
||||||
width: 1em;
|
min-width: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,48 +32,50 @@
|
||||||
>
|
>
|
||||||
</router-link>
|
</router-link>
|
||||||
<div class="item right actions">
|
<div class="item right actions">
|
||||||
<search-bar
|
<SearchBar
|
||||||
v-if="currentUser || !privateMode"
|
v-if="currentUser || !privateMode"
|
||||||
@toggled="onSearchBarToggled"
|
@toggled="onSearchBarToggled"
|
||||||
@click.stop
|
@click.stop
|
||||||
/>
|
/>
|
||||||
<button
|
<template v-if="searchBarHidden">
|
||||||
class="button-unstyled nav-icon"
|
<button
|
||||||
:title="$t('nav.preferences')"
|
class="button-unstyled nav-icon"
|
||||||
@click.stop="openSettingsModal('user')"
|
:title="$t('nav.preferences')"
|
||||||
>
|
@click.stop="openSettingsModal('user')"
|
||||||
<FAIcon
|
>
|
||||||
fixed-width
|
<FAIcon
|
||||||
class="fa-scale-110 fa-old-padding"
|
fixed-width
|
||||||
icon="cog"
|
class="fa-scale-110 fa-old-padding"
|
||||||
/>
|
icon="cog"
|
||||||
</button>
|
/>
|
||||||
<button
|
</button>
|
||||||
v-if="currentUser && currentUser.role === 'admin'"
|
<button
|
||||||
class="button-unstyled nav-icon"
|
v-if="currentUser && currentUser.role === 'admin'"
|
||||||
target="_blank"
|
class="button-unstyled nav-icon"
|
||||||
:title="$t('nav.administration')"
|
target="_blank"
|
||||||
@click.stop="openSettingsModal('admin')"
|
:title="$t('nav.administration')"
|
||||||
>
|
@click.stop="openSettingsModal('admin')"
|
||||||
<FAIcon
|
>
|
||||||
fixed-width
|
<FAIcon
|
||||||
class="fa-scale-110 fa-old-padding"
|
fixed-width
|
||||||
icon="tachometer-alt"
|
class="fa-scale-110 fa-old-padding"
|
||||||
/>
|
icon="tachometer-alt"
|
||||||
</button>
|
/>
|
||||||
<span class="spacer" />
|
</button>
|
||||||
<button
|
<span class="spacer" />
|
||||||
v-if="currentUser"
|
<button
|
||||||
class="button-unstyled nav-icon"
|
v-if="currentUser"
|
||||||
:title="$t('login.logout')"
|
class="button-unstyled nav-icon"
|
||||||
@click.stop.prevent="logout"
|
:title="$t('login.logout')"
|
||||||
>
|
@click.stop.prevent="logout"
|
||||||
<FAIcon
|
>
|
||||||
fixed-width
|
<FAIcon
|
||||||
class="fa-scale-110 fa-old-padding"
|
fixed-width
|
||||||
icon="sign-out-alt"
|
class="fa-scale-110 fa-old-padding"
|
||||||
/>
|
icon="sign-out-alt"
|
||||||
</button>
|
/>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<teleport to="#modal">
|
<teleport to="#modal">
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,39 @@
|
||||||
import Draft from 'src/components/draft/draft.vue'
|
import Draft from 'src/components/draft/draft.vue'
|
||||||
import List from 'src/components/list/list.vue'
|
import List from 'src/components/list/list.vue'
|
||||||
|
import ConfirmModal from 'src/components/confirm_modal/confirm_modal.vue'
|
||||||
|
|
||||||
const Drafts = {
|
const Drafts = {
|
||||||
components: {
|
components: {
|
||||||
Draft,
|
Draft,
|
||||||
List,
|
List,
|
||||||
|
ConfirmModal,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showingConfirmDialog: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
drafts() {
|
drafts() {
|
||||||
return this.$store.getters.draftsArray
|
return this.$store.getters.draftsArray
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
abandonAll() {
|
||||||
|
this.showingConfirmDialog = true
|
||||||
|
},
|
||||||
|
doAbandonAll() {
|
||||||
|
this.drafts.forEach((draft) => {
|
||||||
|
this.$store.dispatch('abandonDraft', { id: draft.id }).then(() => {
|
||||||
|
this.hideConfirmDialog()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.hideConfirmDialog()
|
||||||
|
},
|
||||||
|
hideConfirmDialog() {
|
||||||
|
this.showingConfirmDialog = false
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Drafts
|
export default Drafts
|
||||||
|
|
|
||||||
|
|
@ -13,36 +13,66 @@
|
||||||
>
|
>
|
||||||
{{ $t('drafts.no_drafts') }}
|
{{ $t('drafts.no_drafts') }}
|
||||||
</div>
|
</div>
|
||||||
<List
|
<template v-else>
|
||||||
v-else
|
<List
|
||||||
:items="drafts"
|
:items="drafts"
|
||||||
:non-interactive="true"
|
:non-interactive="true"
|
||||||
>
|
>
|
||||||
<template #item="{ item: draft }">
|
<template #item="{ item: draft }">
|
||||||
<Draft
|
<Draft
|
||||||
class="draft"
|
class="draft"
|
||||||
:draft="draft"
|
:draft="draft"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</List>
|
</List>
|
||||||
|
<div class="remove-all">
|
||||||
|
<button
|
||||||
|
class="btn -danger button-default"
|
||||||
|
@click="abandonAll"
|
||||||
|
>
|
||||||
|
{{ $t('drafts.clean_drafts') }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<teleport to="#modal">
|
||||||
|
<confirm-modal
|
||||||
|
v-if="showingConfirmDialog"
|
||||||
|
:confirm-danger="true"
|
||||||
|
:title="$t('drafts.abandon_confirm_title')"
|
||||||
|
:confirm-text="$t('drafts.abandon_confirm_accept_button')"
|
||||||
|
:cancel-text="$t('drafts.abandon_confirm_cancel_button')"
|
||||||
|
@accepted="doAbandonAll"
|
||||||
|
@cancelled="hideConfirmDialog"
|
||||||
|
>
|
||||||
|
{{ $t('drafts.abandon_all_confirm') }}
|
||||||
|
</confirm-modal>
|
||||||
|
</teleport>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script src="./drafts.js"></script>
|
<script src="./drafts.js"></script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.draft {
|
.Drafts {
|
||||||
margin: 1em 0;
|
.draft {
|
||||||
}
|
margin: 1em 0;
|
||||||
|
}
|
||||||
|
|
||||||
.empty-drafs-list-alert {
|
.remove-all {
|
||||||
padding: 3em;
|
margin: 1em;
|
||||||
font-size: 1.2em;
|
display: flex;
|
||||||
display: flex;
|
justify-content: center;
|
||||||
justify-content: center;
|
}
|
||||||
color: var(--textFaint);
|
|
||||||
|
.empty-drafs-list-alert {
|
||||||
|
padding: 3em;
|
||||||
|
font-size: 1.2em;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
color: var(--textFaint);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -90,10 +90,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.reply-or-quote-selector {
|
.reply-or-quote-selector {
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
gap: 1em;
|
gap: 0 1em;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap-reverse;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,13 @@
|
||||||
role="radiogroup"
|
role="radiogroup"
|
||||||
class="reply-or-quote-selector"
|
class="reply-or-quote-selector"
|
||||||
>
|
>
|
||||||
|
<Checkbox
|
||||||
|
v-model="quoteThreadToggled"
|
||||||
|
:radio="true"
|
||||||
|
:disabled="quoteFormVisible"
|
||||||
|
>
|
||||||
|
{{ $t('post_status.quote_option') }}
|
||||||
|
</Checkbox>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
role="radio"
|
role="radio"
|
||||||
:radio="true"
|
:radio="true"
|
||||||
|
|
@ -120,13 +127,6 @@
|
||||||
>
|
>
|
||||||
{{ $t('post_status.reply_option') }}
|
{{ $t('post_status.reply_option') }}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
<Checkbox
|
|
||||||
v-model="quoteThreadToggled"
|
|
||||||
:radio="true"
|
|
||||||
:disabled="quoteFormVisible"
|
|
||||||
>
|
|
||||||
{{ $t('post_status.quote_option') }}
|
|
||||||
</Checkbox>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,6 @@
|
||||||
class="cancel-icon fa-scale-110 fa-old-padding"
|
class="cancel-icon fa-scale-110 fa-old-padding"
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<span class="spacer" />
|
|
||||||
<span class="spacer" />
|
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -61,18 +59,14 @@
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.SearchBar {
|
.SearchBar {
|
||||||
display: inline-flex;
|
display: flex;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|
||||||
&.-expanded {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-bar-input,
|
.search-bar-input,
|
||||||
.search-button {
|
.search-button {
|
||||||
height: 29px;
|
height: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-bar-input {
|
.search-bar-input {
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
background-color: var(--icon);
|
background-color: var(--icon);
|
||||||
|
opacity: 0.75;
|
||||||
margin: 0.5em 0;
|
margin: 0.5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -84,7 +85,7 @@
|
||||||
&.-with-extra {
|
&.-with-extra {
|
||||||
.action-button-inner,
|
.action-button-inner,
|
||||||
.extra-button {
|
.extra-button {
|
||||||
padding-left: 0.2em;
|
padding-left: 0.25em;
|
||||||
padding-right: 0.25em;
|
padding-right: 0.25em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1884,6 +1884,7 @@
|
||||||
"drafts": {
|
"drafts": {
|
||||||
"drafts": "Drafts",
|
"drafts": "Drafts",
|
||||||
"no_drafts": "You have no drafts",
|
"no_drafts": "You have no drafts",
|
||||||
|
"clean_drafts": "Remove all drafts",
|
||||||
"empty": "(No content)",
|
"empty": "(No content)",
|
||||||
"poll_tooltip": "Draft contains a poll",
|
"poll_tooltip": "Draft contains a poll",
|
||||||
"continue": "Continue composing",
|
"continue": "Continue composing",
|
||||||
|
|
@ -1893,6 +1894,7 @@
|
||||||
"abandon_confirm": "Do you really want to abandon this draft?",
|
"abandon_confirm": "Do you really want to abandon this draft?",
|
||||||
"abandon_confirm_accept_button": "Abandon",
|
"abandon_confirm_accept_button": "Abandon",
|
||||||
"abandon_confirm_cancel_button": "Keep",
|
"abandon_confirm_cancel_button": "Keep",
|
||||||
|
"abandon_all_confirm": "Do you really want to abandon all drafts?",
|
||||||
"replying": "Replying to {statusLink}",
|
"replying": "Replying to {statusLink}",
|
||||||
"editing": "Editing {statusLink}",
|
"editing": "Editing {statusLink}",
|
||||||
"unavailable": "(unavailable)"
|
"unavailable": "(unavailable)"
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,12 @@ export const init = ({
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
const lastVariantRule = variantRules[variantRules.length - 1]
|
const lastVariantRule = variantRules[variantRules.length - 1]
|
||||||
if (lastVariantRule) {
|
const lastVariantSelector = ruleToSelector(
|
||||||
|
lastVariantRule,
|
||||||
|
true,
|
||||||
|
)
|
||||||
|
|
||||||
|
if (lastVariantRule && lastVariantSelector !== selector) {
|
||||||
inheritRule = lastVariantRule
|
inheritRule = lastVariantRule
|
||||||
} else {
|
} else {
|
||||||
const normalRules = ruleset.filter(
|
const normalRules = ruleset.filter(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue