From edb4708407c2d3a28a8f8ce729a22ab8c7159fed Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Jun 2019 11:35:25 +0200 Subject: [PATCH] Update home latest news title --- app/components/pages/Home.vue | 26 +++++++++++++++++++++++++- app/locales/de.yml | 2 -- app/locales/en.yml | 2 -- app/locales/es.yml | 2 -- app/locales/fr.yml | 1 - app/locales/it.yml | 2 -- app/locales/ja.yml | 1 - app/locales/ru.yml | 2 -- app/locales/sq.yml | 2 -- app/locales/sv.yml | 2 -- app/locales/zh_Hant_TW.yml | 2 -- 11 files changed, 25 insertions(+), 19 deletions(-) diff --git a/app/components/pages/Home.vue b/app/components/pages/Home.vue index a913034..966635a 100644 --- a/app/components/pages/Home.vue +++ b/app/components/pages/Home.vue @@ -18,7 +18,8 @@ > -->

- PeerTube + PeerTube + {{ getLatestNews.title }}

@@ -162,6 +163,29 @@ import InstancesComponent from '../partials/Instances.vue' export default { components: { InstancesComponent + }, + computed: { + getLatestNews: function () { + const blocs = this.$t('news.blocs') + if (typeof blocs !== 'object') return undefined + + let latest + for (const key of Object.keys(blocs)) { + const bloc = blocs[key] + Object.assign(bloc, { url: 'news#' + key }) + + if (!latest) { + latest = bloc + continue + } + + if (latest.date.data < bloc.date.data) { + latest = bloc + } + } + + return latest + } } } diff --git a/app/locales/de.yml b/app/locales/de.yml index 064cece..37a66a3 100644 --- a/app/locales/de.yml +++ b/app/locales/de.yml @@ -22,8 +22,6 @@ home: getting-started: loslegen how-it-works: Wie es funktioniert banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/en.yml b/app/locales/en.yml index 45aa791..4af79f9 100644 --- a/app/locales/en.yml +++ b/app/locales/en.yml @@ -22,8 +22,6 @@ home: getting-started: Get started how-it-works: How it works banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/es.yml b/app/locales/es.yml index c87e88b..eef19b0 100644 --- a/app/locales/es.yml +++ b/app/locales/es.yml @@ -22,8 +22,6 @@ home: getting-started: Get started how-it-works: Como funciona banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/fr.yml b/app/locales/fr.yml index 9d226ff..c67711a 100644 --- a/app/locales/fr.yml +++ b/app/locales/fr.yml @@ -22,7 +22,6 @@ home: getting-started: Pour commencer how-it-works: Comment ça fonctionne banner: - title: Rétrospective et nouvelles fonctionnalités ! subtitle: Découvrez nos progrès de ces derniers mois ainsi que les fonctionnalités à venir. button: Soutenir diff --git a/app/locales/it.yml b/app/locales/it.yml index 6baa495..f90dd0c 100644 --- a/app/locales/it.yml +++ b/app/locales/it.yml @@ -22,8 +22,6 @@ home: getting-started: Get started how-it-works: Come funziona banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/ja.yml b/app/locales/ja.yml index 0b54d48..0858dad 100644 --- a/app/locales/ja.yml +++ b/app/locales/ja.yml @@ -22,7 +22,6 @@ home: getting-started: 始めよう how-it-works: 使い方 banner: - title: 回顧展、新機能など subtitle: 私たちは、先月の私たちの進歩について話しています。そして次に何が起こっていますか。 button: サポート install: PeerTube をインストール diff --git a/app/locales/ru.yml b/app/locales/ru.yml index 98c98f9..d43d7e6 100644 --- a/app/locales/ru.yml +++ b/app/locales/ru.yml @@ -22,8 +22,6 @@ home: getting-started: Начать how-it-works: Как это работает banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/sq.yml b/app/locales/sq.yml index 9dceb7c..eb5b62a 100644 --- a/app/locales/sq.yml +++ b/app/locales/sq.yml @@ -22,8 +22,6 @@ home: getting-started: Nisjani how-it-works: Si funksionon banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/sv.yml b/app/locales/sv.yml index 8377b50..722c5c9 100644 --- a/app/locales/sv.yml +++ b/app/locales/sv.yml @@ -22,8 +22,6 @@ home: getting-started: Kom igång how-it-works: Hur det funkar banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support diff --git a/app/locales/zh_Hant_TW.yml b/app/locales/zh_Hant_TW.yml index 60d8bec..a58a7cb 100644 --- a/app/locales/zh_Hant_TW.yml +++ b/app/locales/zh_Hant_TW.yml @@ -22,8 +22,6 @@ home: getting-started: Get started how-it-works: 它是如何運作的 banner: - title: Retrospective, new features and more - to come! subtitle: We're talking about our progress these last months and what's coming next. button: Support