#101 - merge develop

This commit is contained in:
jared 2019-04-05 14:08:13 -04:00
commit 093f0b23f7
12 changed files with 31 additions and 22 deletions

View file

@ -9,12 +9,13 @@ const getStatusnetConfig = async ({ store }) => {
const res = await window.fetch('/api/statusnet/config.json') const res = await window.fetch('/api/statusnet/config.json')
if (res.ok) { if (res.ok) {
const data = await res.json() const data = await res.json()
const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey } = data.site const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey, safeDMMentionsEnabled } = data.site
store.dispatch('setInstanceOption', { name: 'name', value: name }) store.dispatch('setInstanceOption', { name: 'name', value: name })
store.dispatch('setInstanceOption', { name: 'registrationOpen', value: (registrationClosed === '0') }) store.dispatch('setInstanceOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) }) store.dispatch('setInstanceOption', { name: 'textlimit', value: parseInt(textlimit) })
store.dispatch('setInstanceOption', { name: 'server', value: server }) store.dispatch('setInstanceOption', { name: 'server', value: server })
store.dispatch('setInstanceOption', { name: 'safeDM', value: safeDMMentionsEnabled !== '0' })
// TODO: default values for this stuff, added if to not make it break on // TODO: default values for this stuff, added if to not make it break on
// my dev config out of the box. // my dev config out of the box.

View file

@ -179,6 +179,9 @@ const PostStatusForm = {
}, },
postFormats () { postFormats () {
return this.$store.state.instance.postFormats || [] return this.$store.state.instance.postFormats || []
},
safeDMEnabled () {
return this.$store.state.instance.safeDM
} }
}, },
methods: { methods: {

View file

@ -3,13 +3,16 @@
<form @submit.prevent="postStatus(newStatus)"> <form @submit.prevent="postStatus(newStatus)">
<div class="form-group" > <div class="form-group" >
<i18n <i18n
v-if="!this.$store.state.users.currentUser.locked && this.newStatus.visibility == 'private'" v-if="!$store.state.users.currentUser.locked && newStatus.visibility == 'private'"
path="post_status.account_not_locked_warning" path="post_status.account_not_locked_warning"
tag="p" tag="p"
class="visibility-notice"> class="visibility-notice">
<router-link :to="{ name: 'user-settings' }">{{ $t('post_status.account_not_locked_warning_link') }}</router-link> <router-link :to="{ name: 'user-settings' }">{{ $t('post_status.account_not_locked_warning_link') }}</router-link>
</i18n> </i18n>
<p v-if="this.newStatus.visibility == 'direct'" class="visibility-notice">{{ $t('post_status.direct_warning') }}</p> <p v-if="newStatus.visibility === 'direct'" class="visibility-notice">
<span v-if="safeDMEnabled">{{ $t('post_status.direct_warning_to_first_only') }}</span>
<span v-else>{{ $t('post_status.direct_warning_to_all') }}</span>
</p>
<EmojiInput <EmojiInput
v-if="newStatus.spoilerText || alwaysShowSubject" v-if="newStatus.spoilerText || alwaysShowSubject"
type="text" type="text"

View file

@ -80,7 +80,8 @@
}, },
"content_warning": "Subject (optional)", "content_warning": "Subject (optional)",
"default": "Just landed in L.A.", "default": "Just landed in L.A.",
"direct_warning": "This post will only be visible to all the mentioned users.", "direct_warning_to_all": "This post will be visible to all the mentioned users.",
"direct_warning_to_first_only": "This post will only be visible to the mentioned users at the beginning of the message.",
"posting": "Posting", "posting": "Posting",
"scope": { "scope": {
"direct": "Direct - Post to mentioned users only", "direct": "Direct - Post to mentioned users only",

View file

@ -5,6 +5,7 @@ const defaultState = {
// Stuff from static/config.json and apiConfig // Stuff from static/config.json and apiConfig
name: 'Pleroma FE', name: 'Pleroma FE',
registrationOpen: true, registrationOpen: true,
safeDM: true,
textlimit: 5000, textlimit: 5000,
server: 'http://localhost:4040/', server: 'http://localhost:4040/',
theme: 'pleroma-dark', theme: 'pleroma-dark',

File diff suppressed because one or more lines are too long

View file

@ -1,11 +1,11 @@
@font-face { @font-face {
font-family: 'fontello'; font-family: 'fontello';
src: url('../font/fontello.eot?23060348'); src: url('../font/fontello.eot?20888173');
src: url('../font/fontello.eot?23060348#iefix') format('embedded-opentype'), src: url('../font/fontello.eot?20888173#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?23060348') format('woff2'), url('../font/fontello.woff2?20888173') format('woff2'),
url('../font/fontello.woff?23060348') format('woff'), url('../font/fontello.woff?20888173') format('woff'),
url('../font/fontello.ttf?23060348') format('truetype'), url('../font/fontello.ttf?20888173') format('truetype'),
url('../font/fontello.svg?23060348#fontello') format('svg'); url('../font/fontello.svg?20888173#fontello') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) { @media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face { @font-face {
font-family: 'fontello'; font-family: 'fontello';
src: url('../font/fontello.svg?23060348#fontello') format('svg'); src: url('../font/fontello.svg?20888173#fontello') format('svg');
} }
} }
*/ */

View file

@ -229,11 +229,11 @@ body {
} }
@font-face { @font-face {
font-family: 'fontello'; font-family: 'fontello';
src: url('./font/fontello.eot?40419282'); src: url('./font/fontello.eot?93986776');
src: url('./font/fontello.eot?40419282#iefix') format('embedded-opentype'), src: url('./font/fontello.eot?93986776#iefix') format('embedded-opentype'),
url('./font/fontello.woff?40419282') format('woff'), url('./font/fontello.woff?93986776') format('woff'),
url('./font/fontello.ttf?40419282') format('truetype'), url('./font/fontello.ttf?93986776') format('truetype'),
url('./font/fontello.svg?40419282#fontello') format('svg'); url('./font/fontello.svg?93986776#fontello') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.