diff --git a/components/Author.vue b/components/Author.vue index f1f57113b..54770d33d 100644 --- a/components/Author.vue +++ b/components/Author.vue @@ -107,7 +107,9 @@ @@ -139,21 +141,12 @@ export default { trunc: { type: Number, default: null }, showAuthorPopover: { type: Boolean, default: true } }, - data() { - return { - voted: false - } - }, computed: { itsMe() { return this.author.slug === this.$store.getters['auth/user'].slug }, fanCount() { let count = Number(this.author.followedByCount) || 0 - if (this.voted) { - // NOTE: this is used for presentation - count += 1 - } return count }, author() { diff --git a/components/FollowButton.vue b/components/FollowButton.vue index 3540726d2..f5c705a8d 100644 --- a/components/FollowButton.vue +++ b/components/FollowButton.vue @@ -2,12 +2,15 @@ - Folgen + {{ label }} @@ -18,37 +21,69 @@ export default { name: 'HcFollowButton', props: { - followId: { type: String, default: null } + followId: { type: String, default: null }, + isFollowed: { type: Boolean, default: false } }, data() { return { disabled: false, - loading: false + loading: false, + hovered: false + } + }, + computed: { + icon() { + if (this.isFollowed && this.hovered) { + return 'close' + } else { + return this.isFollowed ? 'check' : 'plus' + } + }, + label() { + if (this.isFollowed) { + return this.$t('followButton.following') + } else { + return this.$t('followButton.follow') + } + } + }, + watch: { + isFollowed() { + this.loading = false + this.hovered = false } }, methods: { - follow() { - this.loading = true + onHover() { + if (!this.disabled && !this.loading) { + this.hovered = true + } + }, + toggle() { + const follow = !this.isFollowed + const mutation = follow ? 'follow' : 'unfollow' + + this.hovered = false + + this.$emit('optimistic', follow) + this.$apollo .mutate({ mutation: gql` - mutation($myId: ID!, $followId: ID!) { - AddUserFollowing(from: { id: $myId }, to: { id: $followId }) { - from { - id - } - } + mutation($id: ID!) { + ${mutation}(id: $id, type: User) } `, variables: { - myId: this.$store.getters['auth/user'].id, - followId: this.followId + id: this.followId } }) - .then(() => { - this.loading = false - this.disabled = true - this.$emit('update') + .then(res => { + // this.$emit('optimistic', follow ? res.data.follow : follow) + this.$emit('update', follow) + }) + .catch(() => { + this.$emit('optimistic', !follow) }) } } diff --git a/components/ShoutButton.vue b/components/ShoutButton.vue index 075006b2e..02d7cb639 100644 --- a/components/ShoutButton.vue +++ b/components/ShoutButton.vue @@ -4,20 +4,25 @@ style="text-align: center" > - + {{ shoutedCount }}x - Empfohlen + {{ $t('shoutButton.shouted') }} @@ -28,41 +33,69 @@ import gql from 'graphql-tag' export default { props: { count: { type: Number, default: 0 }, - postId: { type: String, default: null } + postId: { type: String, default: null }, + isShouted: { type: Boolean, default: false }, + disabled: { type: Boolean, default: false } }, data() { return { loading: false, - disabled: false, - shoutedCount: this.count + shoutedCount: this.count, + shouted: false + } + }, + watch: { + isShouted: { + immediate: true, + handler: function(shouted) { + this.shouted = shouted + } } }, methods: { - shout() { - this.loading = true + toggle() { + const shout = !this.shouted + const mutation = shout ? 'shout' : 'unshout' + const count = shout ? this.shoutedCount + 1 : this.shoutedCount - 1 + + const backup = { + shoutedCount: this.shoutedCount, + shouted: this.shouted + } + + this.shoutedCount = count + this.shouted = shout + this.$apollo .mutate({ mutation: gql` - mutation($myId: ID!, $postId: ID!) { - AddUserShouted(from: { id: $myId }, to: { id: $postId }) { - from { - id - } - } + mutation($id: ID!) { + ${mutation}(id: $id, type: Post) } `, variables: { - myId: this.$store.getters['auth/user'].id, - postId: this.postId + id: this.postId } }) - .then(() => { + .then(res => { + if (res && res.data) { + this.$emit('update', shout) + } + }) + .catch(() => { + this.shoutedCount = backup.shoutedCount + this.shouted = backup.shouted + }) + .finally(() => { this.loading = false - this.disabled = true - this.shoutedCount++ - this.$emit('update') }) } } } + + diff --git a/graphql/UserProfileQuery.js b/graphql/UserProfileQuery.js index 4e0245b52..30431602b 100644 --- a/graphql/UserProfileQuery.js +++ b/graphql/UserProfileQuery.js @@ -29,6 +29,7 @@ export default app => { slug avatar followedByCount + followedByCurrentUser contributionsCount commentsCount badges { @@ -41,12 +42,14 @@ export default app => { } } followedByCount + followedByCurrentUser followedBy(first: 7) { id name slug avatar followedByCount + followedByCurrentUser contributionsCount commentsCount badges { diff --git a/locales/de.json b/locales/de.json index 93b6f34e6..6deb5a7f8 100644 --- a/locales/de.json +++ b/locales/de.json @@ -1,13 +1,4 @@ { - "actions": { - "loading": "lade", - "loadMore": "mehr laden", - "create": "Erstellen", - "save": "Speichern", - "edit": "Bearbeiten", - "delete": "Löschen", - "cancel": "Abbrechen" - }, "login": { "copy": "Wenn Du bereits ein Konto bei Human Connection hast, melde Dich bitte hier an.", "login": "Einloggen", @@ -93,6 +84,48 @@ "name": "Einstellungen" } }, + "post": { + "name": "Beitrag", + "moreInfo": { + "name": "Mehr Info" + }, + "takeAction": { + "name": "Aktiv werden" + } + }, + "quotes": { + "african": { + "quote": "Viele kleine Leute an vielen kleinen Orten, die viele kleine Dinge tun, werden das Antlitz dieser Welt verändern.", + "author": "Afrikanisches Sprichwort" + } + }, + "common": { + "post": "Beitrag ::: Beiträge", + "comment": "Kommentar ::: Kommentare", + "letsTalk": "Miteinander reden", + "versus": "Versus", + "moreInfo": "Mehr Info", + "takeAction": "Aktiv werden", + "shout": "Empfehlung ::: Empfehlungen", + "user": "Benutzer ::: Benutzer", + "category": "Kategorie ::: Kategorien", + "organization": "Organisation ::: Organisationen", + "project": "Projekt ::: Projekte", + "tag": "Tag ::: Tags", + "name": "Name", + "loadMore": "mehr laden", + "loading": "wird geladen", + "reportContent": "Melden" + }, + "actions": { + "loading": "lade", + "loadMore": "mehr laden", + "create": "Erstellen", + "save": "Speichern", + "edit": "Bearbeiten", + "delete": "Löschen", + "cancel": "Abbrechen" + }, "moderation": { "name": "Moderation", "reports": { @@ -101,14 +134,6 @@ "submitter": "gemeldet von" } }, - "contribution": { - "edit": "Beitrag bearbeiten", - "delete": "Beitrag löschen" - }, - "comment": { - "edit": "Kommentar bearbeiten", - "delete": "Kommentar löschen" - }, "disable": { "user": { "title": "Nutzer sperren", @@ -126,15 +151,6 @@ "message": "Bist du sicher, dass du den Kommentar \"{name}\" deaktivieren möchtest?" } }, - "post": { - "name": "Beitrag", - "moreInfo": { - "name": "Mehr Info" - }, - "takeAction": { - "name": "Aktiv werden" - } - }, "report": { "submit": "Meldung senden", "cancel": "Abbrechen", @@ -154,28 +170,19 @@ "message": "Bist du sicher, dass du den Kommentar von \"{name}\" melden möchtest?" } }, - "quotes": { - "african": { - "quote": "Viele kleine Leute, an vielen kleinen Orten, die viele kleine Dinge tun, werden das Antlitz dieser Welt verändern.", - "author": "Afrikanisches Sprichwort" - } + "contribution": { + "edit": "Beitrag bearbeiten", + "delete": "Beitrag löschen" }, - "common": { - "reportContent": "Melden", - "post": "Beitrag ::: Beiträge", - "comment": "Kommentar ::: Kommentare", - "letsTalk": "Miteinander reden", - "versus": "Versus", - "moreInfo": "Mehr Info", - "takeAction": "Aktiv werden", - "shout": "Empfehlung ::: Empfehlungen", - "user": "Benutzer ::: Benutzer", - "category": "Kategorie ::: Kategorien", - "organization": "Organisation ::: Organisationen", - "project": "Projekt ::: Projekte", - "tag": "Tag ::: Tags", - "name": "Name", - "loadMore": "mehr laden", - "loading": "wird geladen" + "comment": { + "edit": "Kommentar bearbeiten", + "delete": "Kommentar löschen" + }, + "followButton": { + "follow": "Folgen", + "following": "Folge Ich" + }, + "shoutButton": { + "shouted": "empfohlen" } -} +} \ No newline at end of file diff --git a/locales/en.json b/locales/en.json index 3102972d3..0087b20e7 100644 --- a/locales/en.json +++ b/locales/en.json @@ -1,13 +1,4 @@ { - "actions": { - "loading": "loading", - "loadMore": "load more", - "create": "Create", - "save": "Save", - "edit": "Edit", - "delete": "Delete", - "cancel": "Cancel" - }, "login": { "copy": "If you already have a human-connection account, login here.", "login": "Login", @@ -93,6 +84,48 @@ "name": "Settings" } }, + "post": { + "name": "Post", + "moreInfo": { + "name": "More info" + }, + "takeAction": { + "name": "Take action" + } + }, + "quotes": { + "african": { + "quote": "Many small people in many small places do many small things, that can alter the face of the world.", + "author": "African proverb" + } + }, + "common": { + "post": "Post ::: Posts", + "comment": "Comment ::: Comments", + "letsTalk": "Let`s Talk", + "versus": "Versus", + "moreInfo": "More Info", + "takeAction": "Take Action", + "shout": "Shout ::: Shouts", + "user": "User ::: Users", + "category": "Category ::: Categories", + "organization": "Organization ::: Organizations", + "project": "Project ::: Projects", + "tag": "Tag ::: Tags", + "name": "Name", + "loadMore": "load more", + "loading": "loading", + "reportContent": "Report" + }, + "actions": { + "loading": "loading", + "loadMore": "load more", + "create": "Create", + "save": "Save", + "edit": "Edit", + "delete": "Delete", + "cancel": "Cancel" + }, "moderation": { "name": "Moderation", "reports": { @@ -101,14 +134,6 @@ "submitter": "reported by" } }, - "contribution": { - "edit": "Edit Contribution", - "delete": "Delete Contribution" - }, - "comment": { - "edit": "Edit Comment", - "delete": "Delete Comment" - }, "disable": { "user": { "title": "Disable User", @@ -126,15 +151,6 @@ "message": "Do you really want to disable the comment from \"{name}\"?" } }, - "post": { - "name": "Post", - "moreInfo": { - "name": "More info" - }, - "takeAction": { - "name": "Take action" - } - }, "report": { "submit": "Send Report", "cancel": "Cancel", @@ -154,28 +170,19 @@ "message": "Do you really want to report the comment from \"{name}\"?" } }, - "quotes": { - "african": { - "quote": "Many small people in many small places do many small things, that can alter the face of the world.", - "author": "African proverb" - } + "contribution": { + "edit": "Edit Contribution", + "delete": "Delete Contribution" }, - "common": { - "reportContent": "Report", - "post": "Post ::: Posts", - "comment": "Comment ::: Comments", - "letsTalk": "Let`s Talk", - "versus": "Versus", - "moreInfo": "More Info", - "takeAction": "Take Action", - "shout": "Shout ::: Shouts", - "user": "User ::: Users", - "category": "Category ::: Categories", - "organization": "Organization ::: Organizations", - "project": "Project ::: Projects", - "tag": "Tag ::: Tags", - "name": "Name", - "loadMore": "load more", - "loading": "loading" + "comment": { + "edit": "Edit Comment", + "delete": "Delete Comment" + }, + "followButton": { + "follow": "Follow", + "following": "Following" + }, + "shoutButton": { + "shouted": "shouted" } -} +} \ No newline at end of file diff --git a/locales/es.json b/locales/es.json index 0ea3e440e..ba46f9ec1 100644 --- a/locales/es.json +++ b/locales/es.json @@ -13,7 +13,9 @@ "memberSince": "Miembro desde", "follow": "Seguir", "followers": "Seguidores", - "following": "Siguiendo" + "following": "Siguiendo", + "shouted": "Gritar", + "commented": "Comentado" }, "settings": { "name": "Configuración", diff --git a/locales/fr.json b/locales/fr.json index 1b8ca42b1..01c2614ac 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -3,7 +3,7 @@ "copy": "Si vous avez déjà un compte human-connection, connectez-vous ici.", "login": "Connexion", "logout": "Déconnexion", - "email": "Votre Message électronique", + "email": "Votre courriel", "password": "Votre mot de passe", "moreInfo": "Qu'est-ce que Human Connection?", "hello": "Bonjour" @@ -109,6 +109,61 @@ "tag": "Tag ::: Tags", "name": "Nom", "loadMore": "charger plus", - "loading": "chargement" + "loading": "chargement", + "reportContent": "Signaler" + }, + "moderation": { + "reports": { + "empty": "Félicitations, rien à modérer.", + "name": "Signalisations", + "reporter": "signalé par" + } + }, + "disable": { + "user": { + "title": "Désactiver l'utilisateur", + "type": "Utilisateur", + "message": "Souhaitez-vous vraiment désactiver l'utilisateur \" {name} \"?" + }, + "contribution": { + "title": "Désactiver l'apport", + "type": "apport", + "message": "Souhaitez-vous vraiment signaler l'entrée\" {name} \"?" + }, + "comment": { + "title": "Désactiver le commentaire", + "type": "Commentaire", + "message": "Souhaitez-vous vraiment désactiver le commentaire de \"{nom}\" ?" + } + }, + "report": { + "submit": "Envoyer le rapport", + "cancel": "Annuler", + "user": { + "title": "Signaler l'utilisateur", + "type": "Utilisateur", + "message": "Souhaitez-vous vraiment signaler l'utilisateur \" {name} \"?" + }, + "contribution": { + "title": "Signaler l'entrée", + "type": "Apport", + "message": "Souhaitez-vous vraiment signaler l'entrée\" {name} \"?" + }, + "comment": { + "title": "Signaler un commentaire", + "type": "Commentaire", + "message": "Souhaitez-vous vraiment signaler l'utilisateur \" {name} \"?" + } + }, + "actions": { + "cancel": "Annuler" + }, + "contribution": { + "edit": "Rédiger l'apport", + "delete": "Supprimer l'entrée" + }, + "comment": { + "edit": "Rédiger un commentaire", + "delete": "Supprimer le commentaire" } } \ No newline at end of file diff --git a/locales/it.json b/locales/it.json index d8c4fe35f..0225babad 100644 --- a/locales/it.json +++ b/locales/it.json @@ -1,6 +1,6 @@ { "login": { - "copy": "Se hai già un account di Human Connection, accedi qui.", + "copy": "Se sei gia registrato su Human Connection, accedi qui.", "login": "Accesso", "logout": "Logout", "email": "La tua email", @@ -12,13 +12,18 @@ "name": "Il mio profilo", "memberSince": "Membro dal", "follow": "Seguire", - "followers": "Seguaci", - "following": "Seguendo" + "followers": "Seguenti", + "following": "Seguendo", + "shouted": "Gridato", + "commented": "Commentato" }, "settings": { "name": "Impostazioni", "data": { - "name": "I tuoi dati" + "name": "I tuoi dati", + "labelName": "Nome", + "labelCity": "La tua città o regione", + "labelBio": "Su di te" }, "security": { "name": "Sicurezza" @@ -27,7 +32,7 @@ "name": "Inviti" }, "download": { - "name": "Scaricare i dati" + "name": "Scaricamento dati" }, "delete": { "name": "Elimina Account" @@ -51,7 +56,7 @@ "projects": "Progetti", "invites": "Inviti", "follows": "Segue", - "shouts": "Grida" + "shouts": "Gridi" }, "organizations": { "name": "Organizzazioni" @@ -90,25 +95,33 @@ }, "quotes": { "african": { - "quote": "Molte piccole persone in molti piccoli luoghi fanno molte piccole cose, che possono alterare la faccia del mondo.", + "quote": "Molte piccole persone in molti piccoli luoghi fanno molte piccole cose, che possono cambiare la faccia del mondo.", "author": "Proverbio africano" } }, "common": { "post": "Messaggio ::: Messaggi", "comment": "Commento ::: Commenti", - "letsTalk": "Parliamo", - "versus": "Contro", + "letsTalk": "Discutiamo", + "versus": "Verso", "moreInfo": "Ulteriori informazioni", "takeAction": "Agire", - "shout": "Grida ::: Grida", + "shout": "Grido ::: Gridi", "user": "Utente ::: Utenti", "category": "Categoria ::: Categorie", "organization": "Organizzazione ::: Organizzazioni", "project": "Progetto ::: Progetti", "tag": "Tag ::: Tag", "name": "Nome", - "loadMore": "caricare di più", - "loading": "caricamento" + "loadMore": "Caricare di più", + "loading": "Caricamento in corso" + }, + "actions": { + "loading": "Caricamento in corso", + "loadMore": "Carica di più", + "create": "Crea", + "save": "Salva", + "edit": "Modifica", + "delete": "Cancella" } } \ No newline at end of file diff --git a/locales/nl.json b/locales/nl.json index 593c7a91b..6c52877a4 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -109,6 +109,51 @@ "tag": "Tag ::: Tags", "name": "Naam", "loadMore": "meer laden", - "loading": "inlading" + "loading": "inlading", + "reportContent": "Melden" + }, + "disable": { + "comment": { + "title": "Commentaar uitschakelen", + "type": "Melding", + "message": "Wilt u de reactie van \" {name} \" echt uitschakelen ?" + } + }, + "report": { + "submit": "Verzenden", + "cancel": "Annuleren", + "user": { + "title": "Gebruiker melden", + "type": "Gebruiker", + "message": "Wilt u echt het commentaar van \"{name}\" melden?" + }, + "contribution": { + "title": "Bijdrage melden", + "type": "Bijdrage", + "message": "Wilt u echt het commentaar van \"{name}\" melden?" + }, + "comment": { + "title": "Reactie melden", + "type": "Melding", + "message": "Wilt u echt het commentaar van \"{name}\" melden?" + } + }, + "actions": { + "cancel": "Annuleren" + }, + "contribution": { + "edit": "Bijdrage bewerken", + "delete": "Bijdrage verwijderen" + }, + "comment": { + "edit": "Commentaar bewerken", + "delete": "Commentaar verwijderen" + }, + "followButton": { + "follow": "Volgen", + "following": "Volgt" + }, + "shoutButton": { + "shouted": "uitgeroepen" } } \ No newline at end of file diff --git a/locales/pl.json b/locales/pl.json index f3f4b3c76..0f2147996 100644 --- a/locales/pl.json +++ b/locales/pl.json @@ -13,12 +13,17 @@ "memberSince": "Członek od", "follow": "Obserwuj", "followers": "Obserwujący", - "following": "Obserwowani" + "following": "Obserwowani", + "shouted": "Krzyknij", + "commented": "Skomentuj" }, "settings": { "name": "Ustawienia", "data": { - "name": "Twoje dane" + "name": "Twoje dane", + "labelName": "Twoje dane", + "labelCity": "Twoje miasto lub region", + "labelBio": "O Tobie" }, "security": { "name": "Bezpieczeństwo" @@ -51,7 +56,7 @@ "projects": "Projekty", "invites": "Zaproszenia", "follows": "Obserwowań", - "shouts": " okrzyk" + "shouts": "Okrzyk" }, "organizations": { "name": "Organizacje" @@ -109,6 +114,75 @@ "tag": "Tag ::: Tagi", "name": "imię", "loadMore": "załaduj więcej", - "loading": "ładowanie" + "loading": "ładowanie", + "reportContent": "Raport" + }, + "actions": { + "loading": "ładowanie", + "loadMore": "załaduj więcej", + "create": "Stwórz", + "save": "Zapisz", + "edit": "Edytuj", + "delete": "Usuń", + "cancel": "Anuluj" + }, + "moderation": { + "name": "Moderacja", + "reports": { + "empty": "Gratulacje, moderacja nie jest potrzebna", + "name": "Raporty", + "reporter": "zgłoszone przez" + } + }, + "disable": { + "user": { + "title": "Ukryj użytkownika", + "type": "Użytkownik", + "message": "Czy na pewno chcesz wyłączyć użytkownika \" {name} \"?" + }, + "contribution": { + "title": "Ukryj wpis", + "type": "Wpis / Post", + "message": "Czy na pewno chcesz ukryć wpis \" tytuł} \"?" + }, + "comment": { + "title": "Ukryj wpis", + "type": "Komentarz", + "message": "Czy na pewno chcesz ukryć komentarz użytkownika\"(Imie/Avatar\"?" + } + }, + "report": { + "submit": "Wyślij raport", + "cancel": "Anuluj", + "user": { + "title": "Zgłoś użytkownika", + "type": "Użytkownik", + "message": "Czy na pewno chcesz zgłosić użytkownika \" {Imie} \"?" + }, + "contribution": { + "title": "Zgłoś wpis", + "type": "Wpis / Post", + "message": "Czy na pewno chcesz zgłosić ten wpis użytkownika \" {Imie} \"?" + }, + "comment": { + "title": "Zgłoś komentarz", + "type": "Komentarz", + "message": "Czy na pewno chcesz zgłosić komentarz użytkownika\"(Imie/Avatar\"?" + } + }, + "contribution": { + "edit": "Edytuj wpis", + "delete": "Usuń wpis" + }, + "comment": { + "edit": "Edytuj komentarz", + "delete": "Usuń komentarz" + }, + "followButton": { + "follow": "Obserwuj", + "following": "Obserwowani" + }, + "shoutButton": { + "shouted": "krzyczeć" } } \ No newline at end of file diff --git a/locales/pt.json b/locales/pt.json index ffdbd80b0..4151f49c7 100644 --- a/locales/pt.json +++ b/locales/pt.json @@ -1,7 +1,7 @@ { "login": { - "copy": "Se você já tem uma conta no Human Connection, faça o login aqui.", - "login": "Login", + "copy": "Se você já tem uma conta no Human Connection, entre aqui.", + "login": "Entrar", "logout": "Sair", "email": "Seu email", "password": "Sua senha", @@ -13,12 +13,17 @@ "memberSince": "Membro desde", "follow": "Seguir", "followers": "Seguidores", - "following": "Seguindo" + "following": "Seguindo", + "shouted": "Aclamou", + "commented": "Comentou" }, "settings": { "name": "Configurações", "data": { - "name": "Seus Dados" + "name": "Seus dados", + "labelName": "Seu nome", + "labelCity": "Sua cidade ou estado", + "labelBio": "Sobre você" }, "security": { "name": "Segurança" @@ -30,7 +35,7 @@ "name": "Baixar dados" }, "delete": { - "name": "Deletar conta" + "name": "Apagar conta" }, "organizations": { "name": "Minhas Organizações" @@ -40,18 +45,18 @@ } }, "admin": { - "name": "Administrator", + "name": "Administração", "dashboard": { "name": "Painel de controle", "users": "Usuários", - "posts": "Pastagens", + "posts": "Postagens", "comments": "Comentários", "notifications": "Notificações", "organizations": "Organizações", "projects": "Projetos", "invites": "Convites", - "follows": "Seguidores", - "shouts": "Gritos" + "follows": "Segue", + "shouts": "Aclamações" }, "organizations": { "name": "Organizações" @@ -68,12 +73,12 @@ "categories": { "name": "Categorias", "categoryName": "Nome", - "postCount": "Pastagens" + "postCount": "Postagens" }, "tags": { "name": "Etiquetas", "tagCountUnique": "Usuários", - "tagCount": "Pastagens" + "tagCount": "Postagens" }, "settings": { "name": "Configurações" @@ -90,25 +95,94 @@ }, "quotes": { "african": { - "quote": "Pequenos grupos de pessoas, em pequenos locais podem fazer várias coisas pequenas, mas que podem alterar o mundo ao nosso redor.", - "author": "Provérbio Africano" + "quote": "Muitas pessoas pequenas, em muitos lugares pequenos, fazem muitas coisas pequenas, que podem mudar a face do mundo.", + "author": "Provérbio africano" } }, "common": { - "post": "Post ::: Postagens", + "post": "Postagem ::: Postagens", "comment": "Comentário ::: Comentários", - "letsTalk": "Vamos falar", - "versus": "Versus", + "letsTalk": "Vamos Conversar", + "versus": "Contra", "moreInfo": "Mais informações", "takeAction": "Tomar uma ação", - "shout": "Grito ::: Gritos", + "shout": "Aclamação ::: Aclamações", "user": "Usuário ::: Usuários", "category": "Categoria ::: Categorias", "organization": "Organização ::: Organizações", "project": "Projeto ::: Projetos", - "tag": "Tag ::: Tags", + "tag": "Etiqueta ::: Etiquetas", "name": "Nome", - "loadMore": "carregar mais", - "loading": "carregando" + "loadMore": "Carregar mais", + "loading": "Carregando", + "reportContent": "Denunciar" + }, + "actions": { + "loading": "Carregando", + "loadMore": "Carregar mais", + "create": "Criar", + "save": "Salvar", + "edit": "Editar", + "delete": "Apagar", + "cancel": "Cancelar" + }, + "moderation": { + "name": "Moderação", + "reports": { + "empty": "Parabéns, nada a moderar.", + "name": "Denúncias", + "reporter": "Denunciado por" + } + }, + "disable": { + "user": { + "title": "Desativar usuário", + "type": "Usuário", + "message": "Você realmente deseja desativar o usuário \" {name} \"?" + }, + "contribution": { + "title": "Desativar Contribuição", + "type": "Contribuição", + "message": "Você realmente deseja desativar a contribuição \" {name} \"?" + }, + "comment": { + "title": "Desativar comentário", + "type": "Comentário", + "message": "Você realmente deseja desativar o comentário de \" {name} \"?" + } + }, + "report": { + "submit": "Enviar denúncia", + "cancel": "Cancelar", + "user": { + "title": "Denunciar usuário", + "type": "Usuário", + "message": "Você realmente deseja denunciar o usuário \" {name} \"?" + }, + "contribution": { + "title": "Denunciar Contribuição", + "type": "Contribuição", + "message": "Você realmente deseja denunciar a contribuição \" {name} \"?" + }, + "comment": { + "title": "Denunciar Comentário", + "type": "Comentário", + "message": "Você realmente deseja denunciar o comentário de \"{name}\"?" + } + }, + "contribution": { + "edit": "Editar Contribuição", + "delete": "Apagar Contribuição" + }, + "comment": { + "edit": "Editar Comentário", + "delete": "Apagar Comentário" + }, + "followButton": { + "follow": "Seguir", + "following": "Seguindo" + }, + "shoutButton": { + "shouted": "Aclamou" } } \ No newline at end of file diff --git a/package.json b/package.json index b699f88b3..b3b0dc9e9 100644 --- a/package.json +++ b/package.json @@ -54,8 +54,8 @@ "nuxt-env": "~0.1.0", "portal-vue": "~1.5.1", "string-hash": "^1.1.3", - "tiptap": "^1.13.0", - "tiptap-extensions": "^1.13.0", + "tiptap": "^1.14.0", + "tiptap-extensions": "^1.14.0", "v-tooltip": "~2.0.0-rc.33", "vue-count-to": "~1.0.13", "vue-izitoast": "1.1.2", @@ -71,7 +71,7 @@ "@vue/test-utils": "~1.0.0-beta.29", "babel-core": "~7.0.0-bridge.0", "babel-eslint": "~10.0.1", - "babel-jest": "~24.1.0", + "babel-jest": "~24.3.1", "cypress-cucumber-preprocessor": "~1.11.0", "eslint": "~5.15.1", "eslint-config-prettier": "~3.6.0", @@ -83,7 +83,7 @@ "nodemon": "~1.18.10", "prettier": "~1.14.3", "sass-loader": "~7.1.0", - "vue-jest": "~3.0.3", + "vue-jest": "~3.0.4", "vue-svg-loader": "~0.11.0" } } diff --git a/pages/index.vue b/pages/index.vue index 7bc85b3a4..f4785b3ac 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -108,6 +108,7 @@ export default { shoutedCount commentsCount followedByCount + followedByCurrentUser location { name: name${this.$i18n.locale().toUpperCase()} } diff --git a/pages/post/_slug/index.vue b/pages/post/_slug/index.vue index 68655a31f..074db5d7b 100644 --- a/pages/post/_slug/index.vue +++ b/pages/post/_slug/index.vue @@ -28,7 +28,9 @@ @@ -188,9 +190,10 @@ export default { contributionsCount commentsCount followedByCount + followedByCurrentUser location { - name: name${this.$i18n.locale().toUpperCase()} - } + name: name${this.$i18n.locale().toUpperCase()} + } badges { id key @@ -215,6 +218,7 @@ export default { contributionsCount commentsCount followedByCount + followedByCurrentUser location { name: name${this.$i18n.locale().toUpperCase()} } @@ -231,6 +235,7 @@ export default { icon } shoutedCount + shoutedByCurrentUser } } `) diff --git a/pages/post/_slug/more-info.vue b/pages/post/_slug/more-info.vue index 847975757..d4de5f6f3 100644 --- a/pages/post/_slug/more-info.vue +++ b/pages/post/_slug/more-info.vue @@ -109,6 +109,7 @@ export default { avatar contributionsCount followedByCount + followedByCurrentUser commentsCount location { name: name${this.$i18n.locale().toUpperCase()} diff --git a/pages/profile/_slug.vue b/pages/profile/_slug.vue index 98d3b9f48..614187004 100644 --- a/pages/profile/_slug.vue +++ b/pages/profile/_slug.vue @@ -61,7 +61,7 @@ - + - +