From 581e3e836ad6c8a9a211eb09d7eaa1fbaf830da2 Mon Sep 17 00:00:00 2001 From: eal Date: Mon, 20 Nov 2017 20:32:51 +0200 Subject: Add completion for normal emoji. --- src/components/post_status_form/post_status_form.js | 8 ++++++-- src/components/post_status_form/post_status_form.vue | 5 +++-- src/main.js | 9 +++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6fc84407..2eb091f4 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -64,14 +64,15 @@ const PostStatusForm = { img: profile_image_url_original })) } else if (firstchar === ':') { - const matchedEmoji = filter(this.emoji, (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1))) + const matchedEmoji = filter(this.emoji.concat(this.customEmoji), (emoji) => emoji.shortcode.match(this.textAtCaret.slice(1))) if (matchedEmoji.length <= 0) { return false } - return map(take(matchedEmoji, 5), ({shortcode, image_url}) => ({ + return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}) => ({ // eslint-disable-next-line camelcase screen_name: `:${shortcode}:`, name: '', + utf: utf || '', img: image_url })) } else { @@ -90,6 +91,9 @@ const PostStatusForm = { }, emoji () { return this.$store.state.config.emoji || [] + }, + customEmoji () { + return this.$store.state.config.customEmoji || [] } }, methods: { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index d0210286..8a2ec24d 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -6,8 +6,9 @@
-
- +
+ + {{candidate.utf}} {{candidate.screen_name}} {{candidate.name}} diff --git a/src/main.js b/src/main.js index b6544a5a..14cb27eb 100644 --- a/src/main.js +++ b/src/main.js @@ -125,5 +125,14 @@ window.fetch('/api/pleroma/emoji.json') const emoji = Object.keys(values).map((key) => { return { shortcode: key, image_url: values[key] } }) + store.dispatch('setOption', { name: 'customEmoji', value: emoji }) + }) + +window.fetch('/static/emoji.json') + .then((res) => res.json()) + .then((values) => { + const emoji = Object.keys(values).map((key) => { + return { shortcode: key, image_url: false, 'utf': values[key] } + }) store.dispatch('setOption', { name: 'emoji', value: emoji }) }) -- cgit v1.2.3-70-g09d2 From 33d828d04825d50ba0f21451e80b62e8fb7af4c9 Mon Sep 17 00:00:00 2001 From: aka <0xcebb@protonmail.ch> Date: Wed, 31 Jan 2018 01:02:36 -0300 Subject: Completes portuguese translation --- src/i18n/messages.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/i18n/messages.js b/src/i18n/messages.js index f0953a10..d4128ab7 100644 --- a/src/i18n/messages.js +++ b/src/i18n/messages.js @@ -922,7 +922,11 @@ const es = { } const pt = { + chat: { + title: 'Chat' + }, nav: { + chat: 'Chat Local', timeline: 'Linha do tempo', mentions: 'Menções', public_tl: 'Linha do tempo pública', @@ -963,6 +967,12 @@ const pt = { set_new_profile_background: 'Mudar o plano de fundo de perfil', settings: 'Configurações', theme: 'Tema', + presets: 'Predefinições', + theme_help: 'Use cores em códigos hexadecimais (#aabbcc) para personalizar seu esquema de cores.', + background: 'Plano de Fundo', + foreground: 'Primeiro Plano', + text: 'Texto', + links: 'Links', filtering: 'Filtragem', filtering_explanation: 'Todas as postagens contendo estas palavras serão silenciadas, uma por linha.', attachments: 'Anexos', @@ -970,7 +980,12 @@ const pt = { hide_attachments_in_convo: 'Ocultar anexos em conversas', nsfw_clickthrough: 'Habilitar clique para ocultar anexos NSFW', autoload: 'Habilitar carregamento automático quando a rolagem chegar ao fim.', - reply_link_preview: 'Habilitar a pré-visualização de link de respostas ao passar o mouse.' + streaming: 'Habilitar o fluxo automático de postagens quando ao topo da página', + reply_link_preview: 'Habilitar a pré-visualização de link de respostas ao passar o mouse.', + follow_import: 'Importar seguidas', + import_followers_from_a_csv_file: 'Importe os perfis que tu segues apartir de um arquivo CSV', + follows_imported: 'Seguidas importadas! O processamento das mesmas pode demorar um pouco.', + follow_import_error: 'Erro ao importar seguidas' }, notifications: { notifications: 'Notificações', @@ -1000,7 +1015,8 @@ const pt = { error_fetching_user: 'Erro procurando usuário' }, general: { - submit: 'Enviar' + submit: 'Enviar', + apply: 'Aplicar' } } -- cgit v1.2.3-70-g09d2 From 84b0d54cd01898f684fc2f08b5d1034375e02bb1 Mon Sep 17 00:00:00 2001 From: aka <0xcebb@protonmail.ch> Date: Wed, 31 Jan 2018 14:48:09 -0300 Subject: Fixes issue #58 --- src/components/post_status_form/post_status_form.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index acc97c86..59c14eac 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -104,6 +104,7 @@ const PostStatusForm = { }, postStatus (newStatus) { if (this.posting) { return } + if (this.submitDisabled) { return } if (this.newStatus.status === '') { if (this.newStatus.files.length > 0) { -- cgit v1.2.3-70-g09d2 From fe2e5ba6f04e9fd32aa62f4889c752cd2bb7eede Mon Sep 17 00:00:00 2001 From: eal Date: Thu, 1 Feb 2018 17:18:51 +0200 Subject: Align custom emoji to middle of line --- src/components/status/status.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/components/status/status.vue b/src/components/status/status.vue index d6c8cdb3..d5c904a2 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -248,6 +248,7 @@ img, video { max-width: 100%; max-height: 400px; + vertical-align: middle; object-fit: contain; } -- cgit v1.2.3-70-g09d2 From 90175a1872cace45ae0e410ed283fab25c9e42cd Mon Sep 17 00:00:00 2001 From: eal Date: Thu, 1 Feb 2018 18:12:23 +0200 Subject: Fix name clash on unicode and custom emoji --- src/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.js b/src/main.js index 51e0f7eb..305077b1 100644 --- a/src/main.js +++ b/src/main.js @@ -136,7 +136,7 @@ window.fetch('/api/pleroma/emoji.json') const emoji = Object.keys(values).map((key) => { return { shortcode: key, image_url: values[key] } }) - store.dispatch('setOption', { name: 'emoji', value: emoji }) + store.dispatch('setOption', { name: 'customEmoji', value: emoji }) }, (failure) => {} ), -- cgit v1.2.3-70-g09d2 From 043e14d5cb929fca35b8d55c9008498146e90b8b Mon Sep 17 00:00:00 2001 From: eal Date: Thu, 1 Feb 2018 19:18:47 +0200 Subject: Show chat only if channel is joined. --- src/App.js | 2 +- src/modules/chat.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/App.js b/src/App.js index 0636c47d..8e7acb42 100644 --- a/src/App.js +++ b/src/App.js @@ -24,7 +24,7 @@ export default { logoStyle () { return { 'background-image': `url(${this.$store.state.config.logo})` } }, style () { return { 'background-image': `url(${this.background})` } }, sitename () { return this.$store.state.config.name }, - chat () { return this.$store.state.chat.channel } + chat () { return this.$store.state.chat.channel.state === 'joined' } }, methods: { activatePanel (panelName) { diff --git a/src/modules/chat.js b/src/modules/chat.js index b1244ebe..383ac75c 100644 --- a/src/modules/chat.js +++ b/src/modules/chat.js @@ -1,7 +1,7 @@ const chat = { state: { messages: [], - channel: null + channel: {state: ''} }, mutations: { setChannel (state, channel) { -- cgit v1.2.3-70-g09d2 From 689afecb65019f838fb6ef4d9dd7756cb12c05fb Mon Sep 17 00:00:00 2001 From: eal Date: Thu, 1 Feb 2018 21:30:49 +0200 Subject: Add remote follow button to local user profiles. --- .../user_card_content/user_card_content.js | 5 +++++ .../user_card_content/user_card_content.vue | 20 ++++++++++++++++++++ src/i18n/messages.js | 3 ++- 3 files changed, 27 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index 6e67a321..32d62ebb 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -22,6 +22,11 @@ export default { isOtherUser () { return this.user.id !== this.$store.state.users.currentUser.id }, + subscribeUrl () { + // eslint-disable-next-line no-undef + const serverUrl = new URL(this.user.statusnet_profile_url) + return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus` + }, loggedIn () { return this.$store.state.users.currentUser }, diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 4c40c55f..ef000c94 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -46,6 +46,15 @@
+
+
+ + + +
+