aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/favorite_button/favorite_button.js2
-rw-r--r--src/components/favorite_button/favorite_button.vue10
-rw-r--r--src/components/post_status_form/post_status_form.js9
-rw-r--r--src/components/post_status_form/post_status_form.vue5
-rw-r--r--src/components/retweet_button/retweet_button.js2
-rw-r--r--src/components/retweet_button/retweet_button.vue10
-rw-r--r--src/components/status/status.vue18
-rw-r--r--src/i18n/messages.js20
-rw-r--r--src/main.js11
9 files changed, 62 insertions, 25 deletions
diff --git a/src/components/favorite_button/favorite_button.js b/src/components/favorite_button/favorite_button.js
index 466e9b84..1266be90 100644
--- a/src/components/favorite_button/favorite_button.js
+++ b/src/components/favorite_button/favorite_button.js
@@ -1,5 +1,5 @@
const FavoriteButton = {
- props: ['status'],
+ props: ['status', 'loggedIn'],
data () {
return {
animated: false
diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue
index dcf28e35..65d368c7 100644
--- a/src/components/favorite_button/favorite_button.vue
+++ b/src/components/favorite_button/favorite_button.vue
@@ -1,6 +1,10 @@
<template>
- <div>
- <i :class='classes' class='favorite-button base09' @click.prevent='favorite()'/>
+ <div v-if="loggedIn">
+ <i :class='classes' class='favorite-button fav-active base09' @click.prevent='favorite()'/>
+ <span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
+ </div>
+ <div v-else>
+ <i :class='classes' class='favorite-button base09'/>
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
</div>
</template>
@@ -8,7 +12,7 @@
<script src="./favorite_button.js" ></script>
<style lang='scss'>
- .favorite-button {
+ .fav-active {
cursor: pointer;
animation-duration: 0.6s;
&:hover {
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index acc97c86..1f63de25 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: {
@@ -104,6 +108,7 @@ const PostStatusForm = {
},
postStatus (newStatus) {
if (this.posting) { return }
+ if (this.submitDisabled) { return }
if (this.newStatus.status === '') {
if (this.newStatus.files.length > 0) {
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue
index bb2329f3..8e436428 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 @@
</div>
<div style="position:relative;" v-if="candidates">
<div class="autocomplete-panel base05-background">
- <div v-for="candidate in candidates" @click="replace(candidate.screen_name + ' ')" class="autocomplete base02">
- <img :src="candidate.img"></img>
+ <div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))" class="autocomplete base02">
+ <span v-if="candidate.img"><img :src="candidate.img"></img></span>
+ <span v-else>{{candidate.utf}}</span>
<span>
{{candidate.screen_name}}
<small class="base02">{{candidate.name}}</small>
diff --git a/src/components/retweet_button/retweet_button.js b/src/components/retweet_button/retweet_button.js
index 2280f315..4a43542d 100644
--- a/src/components/retweet_button/retweet_button.js
+++ b/src/components/retweet_button/retweet_button.js
@@ -1,5 +1,5 @@
const RetweetButton = {
- props: ['status'],
+ props: ['status', 'loggedIn'],
data () {
return {
animated: false
diff --git a/src/components/retweet_button/retweet_button.vue b/src/components/retweet_button/retweet_button.vue
index edbfef32..7a7ea763 100644
--- a/src/components/retweet_button/retweet_button.vue
+++ b/src/components/retweet_button/retweet_button.vue
@@ -1,6 +1,10 @@
<template>
- <div>
- <i :class='classes' class='icon-retweet base09' v-on:click.prevent='retweet()'></i>
+ <div v-if="loggedIn">
+ <i :class='classes' class='icon-retweet rt-active base09' v-on:click.prevent='retweet()'></i>
+ <span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
+ </div>
+ <div v-else>
+ <i :class='classes' class='icon-retweet base09'></i>
<span v-if='status.repeat_num > 0'>{{status.repeat_num}}</span>
</div>
</template>
@@ -9,7 +13,7 @@
<style lang='scss'>
@import '../../_variables.scss';
- .icon-retweet {
+ .rt-active {
cursor: pointer;
animation-duration: 0.6s;
&:hover {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index d5c904a2..3a8d164d 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -105,17 +105,15 @@
</div>
</div>
- <div v-if="loggedIn">
- <div class='status-actions'>
- <div>
- <a href="#" v-on:click.prevent="toggleReplying">
- <i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
- </a>
- </div>
- <retweet-button :status=status></retweet-button>
- <favorite-button :status=status></favorite-button>
- <delete-button :status=status></delete-button>
+ <div class='status-actions'>
+ <div v-if="loggedIn">
+ <a href="#" v-on:click.prevent="toggleReplying">
+ <i class="base09 icon-reply" :class="{'icon-reply-active': replying}"></i>
+ </a>
</div>
+ <retweet-button :loggedIn="loggedIn" :status=status></retweet-button>
+ <favorite-button :loggedIn="loggedIn" :status=status></favorite-button>
+ <delete-button :status=status></delete-button>
</div>
</div>
</div>
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'
}
}
diff --git a/src/main.js b/src/main.js
index de74511b..a14ca7c8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -137,7 +137,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 })
store.dispatch('setOption', { name: 'pleromaBackend', value: true })
},
(failure) => {
@@ -146,3 +146,12 @@ window.fetch('/api/pleroma/emoji.json')
),
(error) => console.log(error)
)
+
+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 })
+ })