Compare commits
No commits in common. "e498c5100628930a6cf8e18a98d3b74581165e02" and "72c980dbc3a1a49662db8a4e30c207da1d5155dc" have entirely different histories.
e498c51006
...
72c980dbc3
9 changed files with 14 additions and 103 deletions
|
@ -402,10 +402,6 @@ nav {
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
|
||||||
cursor: not-allowed;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-item,
|
.menu-item,
|
||||||
|
|
|
@ -71,7 +71,6 @@
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-modal-footer {
|
.dialog-modal-footer {
|
||||||
|
@ -115,7 +114,7 @@
|
||||||
|
|
||||||
button {
|
button {
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
height: 3em;
|
height: 2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,6 @@ import StatusContent from 'src/components/status_content/status_content.vue'
|
||||||
import Gallery from 'src/components/gallery/gallery.vue'
|
import Gallery from 'src/components/gallery/gallery.vue'
|
||||||
import { cloneDeep } from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
|
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
|
||||||
import {
|
|
||||||
faPollH
|
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
|
||||||
|
|
||||||
library.add(
|
|
||||||
faPollH
|
|
||||||
)
|
|
||||||
|
|
||||||
const Draft = {
|
const Draft = {
|
||||||
components: {
|
components: {
|
||||||
PostStatusForm,
|
PostStatusForm,
|
||||||
|
|
|
@ -27,15 +27,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="status-preview">
|
<div class="status-preview">
|
||||||
<span class="status_content">
|
<p>{{ draft.status }}</p>
|
||||||
<p v-if="draft.spoilerText">
|
|
||||||
<i>
|
|
||||||
{{ draft.spoilerText }}:
|
|
||||||
</i>
|
|
||||||
</p>
|
|
||||||
<p v-if="draft.status">{{ draft.status }}</p>
|
|
||||||
<p v-else class="faint">{{ $t('drafts.empty') }}</p>
|
|
||||||
</span>
|
|
||||||
<gallery
|
<gallery
|
||||||
v-if="draft.files?.length !== 0"
|
v-if="draft.files?.length !== 0"
|
||||||
class="attachments media-body"
|
class="attachments media-body"
|
||||||
|
@ -47,18 +39,6 @@
|
||||||
@play="$emit('mediaplay', attachment.id)"
|
@play="$emit('mediaplay', attachment.id)"
|
||||||
@pause="$emit('mediapause', attachment.id)"
|
@pause="$emit('mediapause', attachment.id)"
|
||||||
/>
|
/>
|
||||||
<div
|
|
||||||
v-if="draft.poll.options"
|
|
||||||
class="poll-indicator-container"
|
|
||||||
:title="$t('drafts.poll_tooltip')"
|
|
||||||
>
|
|
||||||
<div class="poll-indicator">
|
|
||||||
<FAIcon
|
|
||||||
icon="poll-h"
|
|
||||||
size="3x"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="editing">
|
<div v-if="editing">
|
||||||
|
@ -108,6 +88,12 @@
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.Draft {
|
.Draft {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
line-height: 1.1;
|
||||||
|
font-size: initial;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--link);
|
||||||
|
}
|
||||||
|
|
||||||
.status-content {
|
.status-content {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
|
@ -116,11 +102,8 @@
|
||||||
|
|
||||||
.status-preview {
|
.status-preview {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr 10em;
|
||||||
grid-auto-columns: 10em;
|
|
||||||
grid-auto-flow: column;
|
|
||||||
grid-gap: 0.5em;
|
grid-gap: 0.5em;
|
||||||
align-items: start;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
@ -128,32 +111,6 @@
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.poll-indicator-container {
|
|
||||||
border-radius: var(--roundness);
|
|
||||||
display: grid;
|
|
||||||
justify-items: center;
|
|
||||||
align-items: center;
|
|
||||||
align-self: start;
|
|
||||||
height: 0;
|
|
||||||
padding-bottom: 62.5%;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
.poll-indicator {
|
|
||||||
box-sizing: border-box;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
display: grid;
|
|
||||||
justify-items: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<List
|
<List
|
||||||
v-else
|
v-else
|
||||||
:items="drafts"
|
:items="drafts"
|
||||||
:non-interactive="true"
|
|
||||||
>
|
>
|
||||||
<template #item="{ item: draft }">
|
<template #item="{ item: draft }">
|
||||||
<Draft
|
<Draft
|
||||||
|
|
|
@ -11,9 +11,8 @@ export default {
|
||||||
'Avatar'
|
'Avatar'
|
||||||
],
|
],
|
||||||
states: {
|
states: {
|
||||||
hover: ':hover:not(.disabled)',
|
hover: ':hover',
|
||||||
active: '.-active',
|
active: '.-active'
|
||||||
disabled: '.disabled'
|
|
||||||
},
|
},
|
||||||
defaultRules: [
|
defaultRules: [
|
||||||
{
|
{
|
||||||
|
@ -86,28 +85,6 @@ export default {
|
||||||
textColor: '--link',
|
textColor: '--link',
|
||||||
textAuto: 'no-preserve'
|
textAuto: 'no-preserve'
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Text',
|
|
||||||
parent: {
|
|
||||||
component: 'MenuItem',
|
|
||||||
state: ['disabled']
|
|
||||||
},
|
|
||||||
directives: {
|
|
||||||
textOpacity: 0.25,
|
|
||||||
textOpacityMode: 'blend'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
component: 'Icon',
|
|
||||||
parent: {
|
|
||||||
component: 'MenuItem',
|
|
||||||
state: ['disabled']
|
|
||||||
},
|
|
||||||
directives: {
|
|
||||||
textOpacity: 0.25,
|
|
||||||
textOpacityMode: 'blend'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -352,12 +352,6 @@ const PostStatusForm = {
|
||||||
return this.$t('post_status.auto_save_nothing_new')
|
return this.$t('post_status.auto_save_nothing_new')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
safeToSaveDraft () {
|
|
||||||
return this.newStatus.status ||
|
|
||||||
this.newStatus.spoilerText ||
|
|
||||||
this.newStatus.files?.length ||
|
|
||||||
this.newStatus.hasPoll
|
|
||||||
},
|
|
||||||
...mapGetters(['mergedConfig']),
|
...mapGetters(['mergedConfig']),
|
||||||
...mapState({
|
...mapState({
|
||||||
mobileLayout: state => state.interface.mobileLayout
|
mobileLayout: state => state.interface.mobileLayout
|
||||||
|
@ -753,7 +747,9 @@ const PostStatusForm = {
|
||||||
saveDraft () {
|
saveDraft () {
|
||||||
if (!this.disableDraft &&
|
if (!this.disableDraft &&
|
||||||
!this.saveInhibited) {
|
!this.saveInhibited) {
|
||||||
if (this.safeToSaveDraft) {
|
if (this.newStatus.status ||
|
||||||
|
this.newStatus.files?.length ||
|
||||||
|
this.newStatus.hasPoll) {
|
||||||
return this.$store.dispatch('addOrSaveDraft', { draft: this.newStatus })
|
return this.$store.dispatch('addOrSaveDraft', { draft: this.newStatus })
|
||||||
.then(id => {
|
.then(id => {
|
||||||
if (this.newStatus.id !== id) {
|
if (this.newStatus.id !== id) {
|
||||||
|
|
|
@ -339,8 +339,6 @@
|
||||||
v-if="!disableDraft"
|
v-if="!disableDraft"
|
||||||
class="menu-item dropdown-item dropdown-item-icon"
|
class="menu-item dropdown-item dropdown-item-icon"
|
||||||
role="menu"
|
role="menu"
|
||||||
:disabled="!safeToSaveDraft"
|
|
||||||
:class="{ disabled: !safeToSaveDraft }"
|
|
||||||
@click.prevent="saveDraft"
|
@click.prevent="saveDraft"
|
||||||
@click="close"
|
@click="close"
|
||||||
>
|
>
|
||||||
|
|
|
@ -1514,8 +1514,6 @@
|
||||||
"drafts": {
|
"drafts": {
|
||||||
"drafts": "Drafts",
|
"drafts": "Drafts",
|
||||||
"no_drafts": "You have no drafts",
|
"no_drafts": "You have no drafts",
|
||||||
"empty": "(No content)",
|
|
||||||
"poll_tooltip": "Draft contains a poll",
|
|
||||||
"continue": "Continue composing",
|
"continue": "Continue composing",
|
||||||
"save": "Save without posting",
|
"save": "Save without posting",
|
||||||
"abandon": "Abandon draft",
|
"abandon": "Abandon draft",
|
||||||
|
|
Loading…
Add table
Reference in a new issue