slove conflict

This commit is contained in:
Hakaba Hitoyo 2018-02-10 10:17:58 +09:00
commit ebd8300e36
8 changed files with 108 additions and 37 deletions

View file

@ -94,6 +94,18 @@ const PostStatusForm = {
}, },
customEmoji () { customEmoji () {
return this.$store.state.config.customEmoji || [] return this.$store.state.config.customEmoji || []
},
statusLength () {
return this.newStatus.status.length
},
statusLengthLimit () {
return this.$store.state.config.textlimit
},
hasStatusLengthLimit () {
return this.statusLengthLimit > 0
},
charactersLeft () {
return this.statusLengthLimit - this.statusLength
} }
}, },
methods: { methods: {

View file

@ -18,6 +18,9 @@
</div> </div>
<div class='form-bottom'> <div class='form-bottom'>
<media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload> <media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload>
<p v-if="hasStatusLengthLimit" class="base04">{{ charactersLeft }}</p>
<button v-if="posting" disabled class="btn btn-default base05 base02-background">{{$t('post_status.posting')}}</button> <button v-if="posting" disabled class="btn btn-default base05 base02-background">{{$t('post_status.posting')}}</button>
<button v-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button> <button v-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button>
</div> </div>
@ -67,6 +70,12 @@
button { button {
width: 10em; width: 10em;
} }
p {
margin: 0.35em;
padding: 0.35em;
display: flex;
}
} }
.error { .error {
border-radius: 5px; border-radius: 5px;

View file

@ -100,7 +100,7 @@
<div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div> <div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div>
<div v-if='status.attachments' class='attachments'> <div v-if='status.attachments' class='attachments'>
<attachment v-if="!hideAttachments" :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments"> <attachment v-if="!hideAttachments" :status-id="status.id" :nsfw="status.nsfw" :attachment="attachment" v-for="attachment in status.attachments" :key="attachment.id">
</attachment> </attachment>
</div> </div>
</div> </div>

View file

@ -7,20 +7,24 @@
<p>{{$t('settings.theme_help')}}</p> <p>{{$t('settings.theme_help')}}</p>
<div class="color-container"> <div class="color-container">
<div class="color-item"> <div class="color-item">
<label for="bgcolor" class="base04">{{$t('settings.background')}}</label> <label for="bgcolor" class="base04 theme-color-lb">{{$t('settings.background')}}</label>
<input id="bgcolor" class="theme-color-in" type="text" v-model="bgColorLocal"> <input id="bgcolor" class="theme-color-cl" type="color" v-model="bgColorLocal">
<input id="bgcolor-t" class="theme-color-in" type="text" v-model="bgColorLocal">
</div> </div>
<div class="color-item"> <div class="color-item">
<label for="fgcolor" class="base04">{{$t('settings.foreground')}}</label> <label for="fgcolor" class="base04 theme-color-lb">{{$t('settings.foreground')}}</label>
<input id="fgcolor" class="theme-color-in" type="text" v-model="fgColorLocal"> <input id="fgcolor" class="theme-color-cl" type="color" v-model="fgColorLocal">
<input id="fgcolor-t" class="theme-color-in" type="text" v-model="fgColorLocal">
</div> </div>
<div class="color-item"> <div class="color-item">
<label for="textcolor" class="base04">{{$t('settings.text')}}</label> <label for="textcolor" class="base04 theme-color-lb">{{$t('settings.text')}}</label>
<input id="textcolor" class="theme-color-in" type="text" v-model="textColorLocal"> <input id="textcolor" class="theme-color-cl" type="color" v-model="textColorLocal">
<input id="textcolor-t" class="theme-color-in" type="text" v-model="textColorLocal">
</div> </div>
<div class="color-item"> <div class="color-item">
<label for="linkcolor" class="base04">{{$t('settings.links')}}</label> <label for="linkcolor" class="base04 theme-color-lb">{{$t('settings.links')}}</label>
<input id="linkcolor" class="theme-color-in" type="text" v-model="linkColorLocal"> <input id="linkcolor" class="theme-color-cl" type="color" v-model="linkColorLocal">
<input id="linkcolor-t" class="theme-color-in" type="text" v-model="linkColorLocal">
</div> </div>
</div> </div>
<div> <div>
@ -43,27 +47,50 @@
<script src="./style_switcher.js"></script> <script src="./style_switcher.js"></script>
<style lang="scss"> <style lang="scss">
.style-switcher { .style-switcher {
margin-right: 1em; margin-right: 1em;
} }
.color-container { .color-container {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} justify-content: space-between;
}
.color-item { .color-item {
max-width: 9em; min-width: 20em;
display:flex; display:flex;
flex-wrap:wrap; flex: 1 1 0;
} align-items: baseline;
margin: 5px 6px 5px 0;
.theme-color-in { }
max-width: 8em; .theme-color-cl,
.theme-color-in {
margin-left: 4px;
border-radius: 2px; border-radius: 2px;
border: 0; border: 0;
}
.theme-color-in {
padding: 5px; padding: 5px;
margin: 5px 0 5px 0; min-width: 4em;
max-width: 7em;
flex: 1;
}
.theme-color-lb {
flex: 2;
min-width: 7em;
max-width: 10em;
}
.theme-color-cl {
padding: 1px;
max-width: 8em;
align-self: stretch;
height: 100%;
flex: 0;
min-width: 2em;
cursor: pointer;
} }
.theme-preview-content { .theme-preview-content {

View file

@ -32,7 +32,7 @@
</div> </div>
<div class="panel-body base01-background"> <div class="panel-body base01-background">
<div class="timeline"> <div class="timeline">
<user-card v-for="follower in followers" :user="follower" :showFollows="false"></user-card> <user-card v-for="follower in followers" :key="follower.id" :user="follower" :showFollows="false"></user-card>
</div> </div>
</div> </div>
</div> </div>
@ -44,7 +44,7 @@
</div> </div>
<div class="panel-body base01-background"> <div class="panel-body base01-background">
<div class="timeline"> <div class="timeline">
<user-card v-for="friend in friends" :user="friend" :showFollows="true"></user-card> <user-card v-for="friend in friends" :key="friend.id" :user="friend" :showFollows="true"></user-card>
</div> </div>
</div> </div>
</div> </div>

View file

@ -840,7 +840,11 @@ const pl = {
} }
const es = { const es = {
chat: {
title: 'Chat'
},
nav: { nav: {
chat: 'Chat Local',
timeline: 'Línea Temporal', timeline: 'Línea Temporal',
mentions: 'Menciones', mentions: 'Menciones',
public_tl: 'Línea Temporal Pública', public_tl: 'Línea Temporal Pública',
@ -857,7 +861,8 @@ const es = {
muted: 'Silenciado', muted: 'Silenciado',
followers: 'Seguidores', followers: 'Seguidores',
followees: 'Siguiendo', followees: 'Siguiendo',
per_day: 'por día' per_day: 'por día',
remote_follow: 'Seguir'
}, },
timeline: { timeline: {
show_new: 'Mostrar lo nuevo', show_new: 'Mostrar lo nuevo',
@ -881,6 +886,12 @@ const es = {
set_new_profile_background: 'Cambiar fondo del perfil', set_new_profile_background: 'Cambiar fondo del perfil',
settings: 'Ajustes', settings: 'Ajustes',
theme: 'Tema', theme: 'Tema',
presets: 'Por defecto',
theme_help: 'Use códigos de color hexadecimales (#aabbcc) para personalizar su tema de colores.',
background: 'Segundo plano',
foreground: 'Primer plano',
text: 'Texto',
links: 'Links',
filtering: 'Filtros', filtering: 'Filtros',
filtering_explanation: 'Todos los estados que contengan estas palabras serán silenciados, una por línea', filtering_explanation: 'Todos los estados que contengan estas palabras serán silenciados, una por línea',
attachments: 'Adjuntos', attachments: 'Adjuntos',
@ -888,7 +899,12 @@ const es = {
hide_attachments_in_convo: 'Ocultar adjuntos en las conversaciones', hide_attachments_in_convo: 'Ocultar adjuntos en las conversaciones',
nsfw_clickthrough: 'Activar el clic para ocultar los adjuntos NSFW', nsfw_clickthrough: 'Activar el clic para ocultar los adjuntos NSFW',
autoload: 'Activar carga automática al llegar al final de la página', autoload: 'Activar carga automática al llegar al final de la página',
reply_link_preview: 'Activar la previsualización del enlace de responder al pasar el ratón por encima' streaming: 'Habilite la transmisión automática de nuevas publicaciones cuando se desplaza hacia la parte superior',
reply_link_preview: 'Activar la previsualización del enlace de responder al pasar el ratón por encima',
follow_import: 'Importar personas que tú sigues',
import_followers_from_a_csv_file: 'Importar personas que tú sigues apartir de un archivo csv',
follows_imported: '¡Importado! Procesarlos llevará tiempo.',
follow_import_error: 'Error al importal el archivo'
}, },
notifications: { notifications: {
notifications: 'Notificaciones', notifications: 'Notificaciones',
@ -918,7 +934,8 @@ const es = {
error_fetching_user: 'Error al buscar usuario' error_fetching_user: 'Error al buscar usuario'
}, },
general: { general: {
submit: 'Enviar' submit: 'Enviar',
apply: 'Aplicar'
} }
} }

View file

@ -75,15 +75,23 @@ const i18n = new VueI18n({
messages messages
}) })
window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((data) => {
const {name, closed: registrationClosed, textlimit} = data.site
store.dispatch('setOption', { name: 'name', value: name })
store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) })
})
window.fetch('/static/config.json') window.fetch('/static/config.json')
.then((res) => res.json()) .then((res) => res.json())
.then((data) => { .then((data) => {
const {name, theme, background, logo, registrationOpen, showInstanceSpecificPanel} = data const {theme, background, logo} = data
store.dispatch('setOption', { name: 'name', value: name })
store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'theme', value: theme })
store.dispatch('setOption', { name: 'background', value: background }) store.dispatch('setOption', { name: 'background', value: background })
store.dispatch('setOption', { name: 'logo', value: logo }) store.dispatch('setOption', { name: 'logo', value: logo })
store.dispatch('setOption', { name: 'registrationOpen', value: registrationOpen })
store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel }) store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel })
if (data['chatDisabled']) { if (data['chatDisabled']) {
store.dispatch('disableChat') store.dispatch('disableChat')

View file

@ -1,9 +1,7 @@
{ {
"name": "Pleroma FE",
"theme": "pleroma-dark", "theme": "pleroma-dark",
"background": "/static/bg.jpg", "background": "/static/bg.jpg",
"logo": "/static/logo.png", "logo": "/static/logo.png",
"registrationOpen": true,
"defaultPath": "/main/all", "defaultPath": "/main/all",
"chatDisabled": false, "chatDisabled": false,
"showInstanceSpecificPanel": false "showInstanceSpecificPanel": false