From 71bdbdf14670ae10f5a64578127fbb5a43339130 Mon Sep 17 00:00:00 2001 From: Henry Jameson <me@hjkos.com> Date: Wed, 22 Nov 2017 00:20:28 +0300 Subject: [PATCH 1/9] wip, styles are a bit broken tho --- src/components/style_switcher/style_switcher.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue index f92f7299..ed428c2c 100644 --- a/src/components/style_switcher/style_switcher.vue +++ b/src/components/style_switcher/style_switcher.vue @@ -8,19 +8,19 @@ <div class="color-container"> <div class="color-item"> <label for="bgcolor" class="base04">{{$t('settings.background')}}</label> - <input id="bgcolor" class="theme-color-in" type="text" v-model="bgColorLocal"> + <input id="bgcolor" class="theme-color-in" type="color" v-model="bgColorLocal"> </div> <div class="color-item"> <label for="fgcolor" class="base04">{{$t('settings.foreground')}}</label> - <input id="fgcolor" class="theme-color-in" type="text" v-model="fgColorLocal"> + <input id="fgcolor" class="theme-color-in" type="color" v-model="fgColorLocal"> </div> <div class="color-item"> <label for="textcolor" class="base04">{{$t('settings.text')}}</label> - <input id="textcolor" class="theme-color-in" type="text" v-model="textColorLocal"> + <input id="textcolor" class="theme-color-in" type="color" v-model="textColorLocal"> </div> <div class="color-item"> <label for="linkcolor" class="base04">{{$t('settings.links')}}</label> - <input id="linkcolor" class="theme-color-in" type="text" v-model="linkColorLocal"> + <input id="linkcolor" class="theme-color-in" type="color" v-model="linkColorLocal"> </div> </div> <div> From 338245eb63f55152697a4bc01801fd59d7be1fdd Mon Sep 17 00:00:00 2001 From: Henry Jameson <me@hjkos.com> Date: Sat, 3 Feb 2018 22:23:38 +0300 Subject: [PATCH 2/9] updated css and stuff for color picker in styles --- .../style_switcher/style_switcher.vue | 79 +++++++++++++------ 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/src/components/style_switcher/style_switcher.vue b/src/components/style_switcher/style_switcher.vue index ed428c2c..31bf546d 100644 --- a/src/components/style_switcher/style_switcher.vue +++ b/src/components/style_switcher/style_switcher.vue @@ -7,20 +7,24 @@ <p>{{$t('settings.theme_help')}}</p> <div class="color-container"> <div class="color-item"> - <label for="bgcolor" class="base04">{{$t('settings.background')}}</label> - <input id="bgcolor" class="theme-color-in" type="color" v-model="bgColorLocal"> + <label for="bgcolor" class="base04 theme-color-lb">{{$t('settings.background')}}</label> + <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 class="color-item"> - <label for="fgcolor" class="base04">{{$t('settings.foreground')}}</label> - <input id="fgcolor" class="theme-color-in" type="color" v-model="fgColorLocal"> + <label for="fgcolor" class="base04 theme-color-lb">{{$t('settings.foreground')}}</label> + <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 class="color-item"> - <label for="textcolor" class="base04">{{$t('settings.text')}}</label> - <input id="textcolor" class="theme-color-in" type="color" v-model="textColorLocal"> + <label for="textcolor" class="base04 theme-color-lb">{{$t('settings.text')}}</label> + <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 class="color-item"> - <label for="linkcolor" class="base04">{{$t('settings.links')}}</label> - <input id="linkcolor" class="theme-color-in" type="color" v-model="linkColorLocal"> + <label for="linkcolor" class="base04 theme-color-lb">{{$t('settings.links')}}</label> + <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> @@ -43,27 +47,50 @@ <script src="./style_switcher.js"></script> <style lang="scss"> - .style-switcher { - margin-right: 1em; - } +.style-switcher { + margin-right: 1em; +} - .color-container { - display: flex; - flex-wrap: wrap; - } +.color-container { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} - .color-item { - max-width: 9em; - display:flex; - flex-wrap:wrap; - } +.color-item { + min-width: 20em; + display:flex; + flex: 1 1 0; + align-items: baseline; + margin: 5px 6px 5px 0; +} +.theme-color-cl, +.theme-color-in { + margin-left: 4px; + border-radius: 2px; + border: 0; +} - .theme-color-in { - max-width: 8em; - border-radius: 2px; - border: 0; - padding: 5px; - margin: 5px 0 5px 0; +.theme-color-in { + padding: 5px; + 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 { From e647bb22bb179896dc00025bb35f650c3dc395bf Mon Sep 17 00:00:00 2001 From: eal <eal@waifu.club> Date: Sun, 4 Feb 2018 17:26:46 +0200 Subject: [PATCH 3/9] Add keys to all component lists. --- src/components/status/status.vue | 2 +- src/components/timeline/timeline.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index f6afaa25..28272b0b 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -100,7 +100,7 @@ <div @click.prevent="linkClicked" class="status-content" v-html="status.statusnet_html"></div> <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> </div> </div> diff --git a/src/components/timeline/timeline.vue b/src/components/timeline/timeline.vue index 9d2e1ea1..d6ecfd2f 100644 --- a/src/components/timeline/timeline.vue +++ b/src/components/timeline/timeline.vue @@ -32,7 +32,7 @@ </div> <div class="panel-body base01-background"> <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> @@ -44,7 +44,7 @@ </div> <div class="panel-body base01-background"> <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> From 474c13003ad0b820dc7002e030a5b9fbd8e6efc0 Mon Sep 17 00:00:00 2001 From: Aka <aka@social.sakamoto.gq> Date: Thu, 8 Feb 2018 00:46:50 -0300 Subject: [PATCH 4/9] Completes spanish translation --- src/i18n/messages.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index f3f1e2d4..59f453b1 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -840,7 +840,11 @@ const pl = { } const es = { + chat: { + title: 'Chat' + }, nav: { + chat: 'Chat Local', timeline: 'Línea Temporal', mentions: 'Menciones', public_tl: 'Línea Temporal Pública', @@ -858,6 +862,7 @@ const es = { followers: 'Seguidores', followees: 'Siguiendo', per_day: 'por día' + remote_follow: 'Seguir' }, timeline: { show_new: 'Mostrar lo nuevo', @@ -881,6 +886,12 @@ const es = { set_new_profile_background: 'Cambiar fondo del perfil', settings: 'Ajustes', 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_explanation: 'Todos los estados que contengan estas palabras serán silenciados, una por línea', attachments: 'Adjuntos', @@ -888,7 +899,12 @@ const es = { hide_attachments_in_convo: 'Ocultar adjuntos en las conversaciones', nsfw_clickthrough: 'Activar el clic para ocultar los adjuntos NSFW', autoload: 'Activar carga automática al llegar al final de la página', + 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: 'Notificaciones', @@ -919,6 +935,7 @@ const es = { }, general: { submit: 'Enviar' + apply: 'Aplicar' } } From 402f8ead69cc53a963052ed3ac0c73656fc3c435 Mon Sep 17 00:00:00 2001 From: Aka <aka@social.sakamoto.gq> Date: Thu, 8 Feb 2018 00:51:33 -0300 Subject: [PATCH 5/9] Completes spanish translation --- src/i18n/messages.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/messages.js b/src/i18n/messages.js index 59f453b1..6779420d 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -861,7 +861,7 @@ const es = { muted: 'Silenciado', followers: 'Seguidores', followees: 'Siguiendo', - per_day: 'por día' + per_day: 'por día', remote_follow: 'Seguir' }, timeline: { @@ -900,7 +900,7 @@ const es = { nsfw_clickthrough: 'Activar el clic para ocultar los adjuntos NSFW', autoload: 'Activar carga automática al llegar al final de la página', 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' + 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.', @@ -934,7 +934,7 @@ const es = { error_fetching_user: 'Error al buscar usuario' }, general: { - submit: 'Enviar' + submit: 'Enviar', apply: 'Aplicar' } } From e2248bcf4fc57b7dbac9585a41b0578201394d88 Mon Sep 17 00:00:00 2001 From: dtluna <dtluna@openmailbox.org> Date: Fri, 9 Feb 2018 16:02:26 +0300 Subject: [PATCH 6/9] Use `name` and `closed` from the backend --- src/main.js | 13 ++++++++++--- static/config.json | 2 -- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main.js b/src/main.js index a14ca7c8..8d598d78 100644 --- a/src/main.js +++ b/src/main.js @@ -75,15 +75,22 @@ const i18n = new VueI18n({ messages }) +window.fetch('/api/statusnet/config.json') + .then((res) => res.json()) + .then((data) => { + const {name, closed: registrationClosed, textlimit} = data + store.dispatch('setOption', { name: 'name', value: name }) + store.dispatch('setOption', { name: 'registrationOpen', value: !registrationClosed }) + store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) }) + }) + window.fetch('/static/config.json') .then((res) => res.json()) .then((data) => { - const {name, theme, background, logo, registrationOpen} = data - store.dispatch('setOption', { name: 'name', value: name }) + const {theme, background, logo} = data store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'background', value: background }) store.dispatch('setOption', { name: 'logo', value: logo }) - store.dispatch('setOption', { name: 'registrationOpen', value: registrationOpen }) if (data['chatDisabled']) { store.dispatch('disableChat') } diff --git a/static/config.json b/static/config.json index 880efca8..8e4b21ca 100644 --- a/static/config.json +++ b/static/config.json @@ -1,9 +1,7 @@ { - "name": "Pleroma FE", "theme": "pleroma-dark", "background": "/static/bg.jpg", "logo": "/static/logo.png", - "registrationOpen": false, "defaultPath": "/main/all", "chatDisabled": false } From e49cf7b67a3d1532ff19091697c4d2487e14d257 Mon Sep 17 00:00:00 2001 From: dtluna <dtluna@openmailbox.org> Date: Fri, 9 Feb 2018 16:37:32 +0300 Subject: [PATCH 7/9] Add textlimit --- src/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 8d598d78..7fb9a047 100644 --- a/src/main.js +++ b/src/main.js @@ -78,9 +78,10 @@ const i18n = new VueI18n({ window.fetch('/api/statusnet/config.json') .then((res) => res.json()) .then((data) => { - const {name, closed: registrationClosed, textlimit} = data + const {name, closed: registrationClosed, textlimit} = data.site + store.dispatch('setOption', { name: 'name', value: name }) - store.dispatch('setOption', { name: 'registrationOpen', value: !registrationClosed }) + store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') }) store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) }) }) From 6c424c355c7faa70c84614b9c518ee116b42dd53 Mon Sep 17 00:00:00 2001 From: dtluna <dtluna@openmailbox.org> Date: Fri, 9 Feb 2018 17:51:04 +0300 Subject: [PATCH 8/9] Add characters left being displayed --- src/components/post_status_form/post_status_form.js | 12 ++++++++++++ src/components/post_status_form/post_status_form.vue | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 1f63de25..c1213fa9 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -94,6 +94,18 @@ const PostStatusForm = { }, 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: { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 8e436428..86458f0d 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -18,6 +18,9 @@ </div> <div class='form-bottom'> <media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload> + + <p v-if="hasStatusLengthLimit">{{ charactersLeft }}</p> + <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> </div> From dcbbd7c53e921eddf542b082a06d8eb4999550c7 Mon Sep 17 00:00:00 2001 From: dtluna <dtluna@openmailbox.org> Date: Fri, 9 Feb 2018 18:22:29 +0300 Subject: [PATCH 9/9] Add styles on the characters left indicator --- src/components/post_status_form/post_status_form.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 86458f0d..a759bb53 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -19,7 +19,7 @@ <div class='form-bottom'> <media-upload @uploading="disableSubmit" @uploaded="addMediaFile" @upload-failed="enableSubmit" :drop-files="dropFiles"></media-upload> - <p v-if="hasStatusLengthLimit">{{ charactersLeft }}</p> + <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-else :disabled="submitDisabled" type="submit" class="btn btn-default base05 base02-background">{{$t('general.submit')}}</button> @@ -70,6 +70,12 @@ button { width: 10em; } + + p { + margin: 0.35em; + padding: 0.35em; + display: flex; + } } .error { border-radius: 5px;