+
-
-
{{ $t("general.show_more") }}
-
-
-
{{ $t("general.show_more") }}
Date: Fri, 26 Jun 2020 14:47:02 +0300
Subject: [PATCH 11/17] add basic preloading for nodeinfo/config
---
src/boot/after_store.js | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index 0db03547..0c213ea3 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -8,9 +8,34 @@ import backendInteractorService from '../services/backend_interactor_service/bac
import { CURRENT_VERSION } from '../services/theme_data/theme_data.service.js'
import { applyTheme } from '../services/style_setter/style_setter.js'
+let staticInitialResults = null
+
+const parsedInitialResults = () => {
+ if (!document.getElementById('initial-results')) {
+ return null
+ }
+ if (!staticInitialResults) {
+ staticInitialResults = JSON.parse(document.getElementById('initial-results').textContent)
+ }
+ return staticInitialResults
+}
+
+const preloadFetch = async (request) => {
+ const data = parsedInitialResults()
+ if (!data || !data[request]) {
+ return window.fetch(request)
+ }
+ const requestJson = atob(data[request])
+ return {
+ ok: true,
+ json: () => JSON.parse(requestJson),
+ text: () => requestJson
+ }
+}
+
const getStatusnetConfig = async ({ store }) => {
try {
- const res = await window.fetch('/api/statusnet/config.json')
+ const res = await preloadFetch('/api/statusnet/config.json')
if (res.ok) {
const data = await res.json()
const { name, closed: registrationClosed, textlimit, uploadlimit, server, vapidPublicKey, safeDMMentionsEnabled } = data.site
@@ -132,7 +157,7 @@ const getTOS = async ({ store }) => {
const getInstancePanel = async ({ store }) => {
try {
- const res = await window.fetch('/instance/panel.html')
+ const res = await preloadFetch('/instance/panel.html')
if (res.ok) {
const html = await res.text()
store.dispatch('setInstanceOption', { name: 'instanceSpecificPanelContent', value: html })
@@ -195,7 +220,7 @@ const resolveStaffAccounts = ({ store, accounts }) => {
const getNodeInfo = async ({ store }) => {
try {
- const res = await window.fetch('/nodeinfo/2.0.json')
+ const res = await preloadFetch('/nodeinfo/2.0.json')
if (res.ok) {
const data = await res.json()
const metadata = data.metadata
From 8c3106c588f964a8e26c69784d5808ad1f72625c Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson
Date: Fri, 26 Jun 2020 18:20:32 +0300
Subject: [PATCH 12/17] Change the show/hide strings about, remove subjected
status toggle when 'collapse' option not used
---
src/components/status_content/status_content.js | 4 ++--
src/components/status_content/status_content.vue | 10 ++++++----
src/i18n/en.json | 6 +++++-
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js
index 66501b3e..09ea3a20 100644
--- a/src/components/status_content/status_content.js
+++ b/src/components/status_content/status_content.js
@@ -48,10 +48,10 @@ const StatusContent = {
},
// When a status has a subject and is also tall, we should only have one show more/less button. If the default is to collapse statuses with subjects, we just treat it like a status with a subject; otherwise, we just treat it like a tall status.
mightHideBecauseSubject () {
- return this.status.summary && (!this.tallStatus || this.localCollapseSubjectDefault)
+ return !!this.status.summary && this.localCollapseSubjectDefault
},
mightHideBecauseTall () {
- return this.tallStatus && (!this.status.summary || !this.localCollapseSubjectDefault)
+ return this.tallStatus && !(this.status.summary && this.localCollapseSubjectDefault)
},
hideSubjectStatus () {
return this.mightHideBecauseSubject && !this.expandingSubject
diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue
index 5698b4c0..3460c2fa 100644
--- a/src/components/status_content/status_content.vue
+++ b/src/components/status_content/status_content.vue
@@ -17,7 +17,7 @@
href="#"
class="tall-subject-hider"
@click.prevent="showingLongSubject=false"
- >{{ $t("general.show_less") }}
+ >{{ $t("status.hide_full_subject") }}
- {{ $t("general.show_more") }}
+ {{ $t("status.show_full_subject") }}
- {{ $t("general.show_more") }}
+ {{ $t("status.show_content") }}
{{ $t("general.show_less") }}
+ >
+ {{ tallStatus ? $t("general.show_less") : $t("status.hide_content") }}
+
diff --git a/src/i18n/en.json b/src/i18n/en.json
index eefe10e5..ede8c3d8 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -629,7 +629,11 @@
"status_unavailable": "Status unavailable",
"copy_link": "Copy link to status",
"thread_muted": "Thread muted",
- "thread_muted_and_words": ", has words:"
+ "thread_muted_and_words": ", has words:",
+ "show_full_subject": "Show full subject",
+ "hide_full_subject": "Hide full subject",
+ "show_content": "Show content",
+ "hide_content": "Hide content"
},
"user_card": {
"approve": "Approve",
From 4528b31256cc719c4f17ab5103af0d345ba5181a Mon Sep 17 00:00:00 2001
From: translate
Date: Sat, 27 Jun 2020 07:21:32 +0000
Subject: [PATCH 13/17] Translated using Weblate (Italian)
Currently translated at 72.7% (452 of 621 strings)
Translation: Pleroma/Pleroma-FE
Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/it/
---
src/i18n/it.json | 3 ++-
src/i18n/nl.json | 20 ++++++++++++++------
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/i18n/it.json b/src/i18n/it.json
index 6c8be351..7311f0b6 100644
--- a/src/i18n/it.json
+++ b/src/i18n/it.json
@@ -255,7 +255,8 @@
"top_bar": "Barra superiore",
"panel_header": "Titolo pannello",
"badge_notification": "Notifica",
- "popover": "Suggerimenti, menù, sbalzi"
+ "popover": "Suggerimenti, menù, sbalzi",
+ "toggled": "Scambiato"
},
"common_colors": {
"rgbo": "Icone, accenti, medaglie",
diff --git a/src/i18n/nl.json b/src/i18n/nl.json
index af728b6e..15ce5cbe 100644
--- a/src/i18n/nl.json
+++ b/src/i18n/nl.json
@@ -28,7 +28,12 @@
"enable": "Inschakelen",
"confirm": "Bevestigen",
"verify": "Verifiëren",
- "generic_error": "Er is een fout opgetreden"
+ "generic_error": "Er is een fout opgetreden",
+ "peek": "Spiek",
+ "close": "Sluiten",
+ "retry": "Opnieuw proberen",
+ "error_retry": "Probeer het opnieuw",
+ "loading": "Laden…"
},
"login": {
"login": "Log in",
@@ -90,7 +95,7 @@
"text/bbcode": "BBCode"
},
"content_warning": "Onderwerp (optioneel)",
- "default": "Zojuist geland in L.A.",
+ "default": "Tijd voor anime!",
"direct_warning": "Deze post zal enkel zichtbaar zijn voor de personen die genoemd zijn.",
"posting": "Plaatsen",
"scope": {
@@ -377,7 +382,7 @@
"button": "Knop",
"text": "Nog een boel andere {0} en {1}",
"mono": "inhoud",
- "input": "Zojuist geland in L.A.",
+ "input": "Tijd voor anime!",
"faint_link": "handige gebruikershandleiding",
"fine_print": "Lees onze {0} om niets nuttig te leren!",
"header_faint": "Alles komt goed",
@@ -451,7 +456,7 @@
"user_mutes": "Gebruikers",
"useStreamingApi": "Berichten en meldingen in real-time ontvangen",
"useStreamingApiWarning": "(Afgeraden, experimenteel, kan berichten overslaan)",
- "type_domains_to_mute": "Voer domeinen in om te negeren",
+ "type_domains_to_mute": "Zoek domeinen om te negeren",
"upload_a_photo": "Upload een foto",
"fun": "Plezier",
"greentext": "Meme pijlen",
@@ -470,7 +475,8 @@
"frontend_version": "Frontend Versie",
"backend_version": "Backend Versie",
"title": "Versie"
- }
+ },
+ "mutes_and_blocks": "Negeringen en Blokkades"
},
"timeline": {
"collapse": "Inklappen",
@@ -708,7 +714,9 @@
"unpin": "Van profiel losmaken",
"delete": "Status verwijderen",
"repeats": "Herhalingen",
- "favorites": "Favorieten"
+ "favorites": "Favorieten",
+ "thread_muted_and_words": ", heeft woorden:",
+ "thread_muted": "Thread genegeerd"
},
"time": {
"years_short": "{0}j",
From 3113d904b921b1258c3709101d7e688767037079 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson
Date: Sat, 27 Jun 2020 10:34:28 +0300
Subject: [PATCH 14/17] update changelog with profile fields
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index feabbf06..887588f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- 'Copy link' button for statuses (in the ellipsis menu)
- Autocomplete domains from list of known instances
- 'Bot' settings option and badge
+- Added profile meta data fields that can be set in profile settings
### Changed
- Registration page no longer requires email if the server is configured not to require it
From a8cb5e71d9ab3025786838d7123ad676a1e7fb66 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson
Date: Sat, 27 Jun 2020 12:32:01 +0300
Subject: [PATCH 15/17] don't block ui with stickers or tos
---
src/boot/after_store.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index 01074b8c..de7c3ef4 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -340,17 +340,18 @@ const afterStoreSetup = async ({ store, i18n }) => {
}
// Now we can try getting the server settings and logging in
+ // Most of these are preloaded into the index.html so blocking is minimized
await Promise.all([
checkOAuthToken({ store }),
- getTOS({ store }),
getInstancePanel({ store }),
- getStickers({ store }),
getNodeInfo({ store }),
getInstanceConfig({ store })
])
// Start fetching things that don't need to block the UI
store.dispatch('fetchMutes')
+ getTOS({ store })
+ getStickers({ store })
const router = new VueRouter({
mode: 'history',
From 46cf50a4d653b9f9b2b9d3f13d88a7af7b950d18 Mon Sep 17 00:00:00 2001
From: Shpuld Shpuldson
Date: Sat, 27 Jun 2020 12:59:24 +0300
Subject: [PATCH 16/17] rename variable requestJson when it's not actually json
---
src/boot/after_store.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index de7c3ef4..1796eb1b 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -25,11 +25,11 @@ const preloadFetch = async (request) => {
if (!data || !data[request]) {
return window.fetch(request)
}
- const requestJson = atob(data[request])
+ const requestData = atob(data[request])
return {
ok: true,
- json: () => JSON.parse(requestJson),
- text: () => requestJson
+ json: () => JSON.parse(requestData),
+ text: () => requestData
}
}
From 195e83d0c8ab660a1dd6b29137295c2a6a36dca9 Mon Sep 17 00:00:00 2001
From: Fristi
Date: Sat, 27 Jun 2020 15:04:52 +0000
Subject: [PATCH 17/17] Translated using Weblate (Dutch)
Currently translated at 100.0% (626 of 626 strings)
Translation: Pleroma/Pleroma-FE
Translate-URL: https://translate.pleroma.social/projects/pleroma/pleroma-fe/nl/
---
src/i18n/nl.json | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/i18n/nl.json b/src/i18n/nl.json
index 15ce5cbe..bf270f87 100644
--- a/src/i18n/nl.json
+++ b/src/i18n/nl.json
@@ -476,7 +476,14 @@
"backend_version": "Backend Versie",
"title": "Versie"
},
- "mutes_and_blocks": "Negeringen en Blokkades"
+ "mutes_and_blocks": "Negeringen en Blokkades",
+ "profile_fields": {
+ "value": "Inhoud",
+ "name": "Label",
+ "add_field": "Veld Toevoegen",
+ "label": "Profiel metadata"
+ },
+ "bot": "Dit is een bot account"
},
"timeline": {
"collapse": "Inklappen",