From 44e0223ef92c4760d3cb502a21893605487b06a4 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 17 Mar 2024 15:28:22 +0100 Subject: [PATCH 1/4] fix(settings): Adjust appstore types as `releases` are not always set Signed-off-by: Ferdinand Thiessen --- apps/settings/src/app-types.ts | 2 +- apps/settings/src/components/AppStoreSidebar/AppReleasesTab.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/settings/src/app-types.ts b/apps/settings/src/app-types.ts index 99f0c1ef679c2..4c5c21a079d57 100644 --- a/apps/settings/src/app-types.ts +++ b/apps/settings/src/app-types.ts @@ -66,5 +66,5 @@ export interface IAppstoreApp { isCompatible: boolean appstoreData: Record - releases: IAppstoreAppRelease[] + releases?: IAppstoreAppRelease[] } diff --git a/apps/settings/src/components/AppStoreSidebar/AppReleasesTab.vue b/apps/settings/src/components/AppStoreSidebar/AppReleasesTab.vue index 8fe892211700b..13e6ecff28f58 100644 --- a/apps/settings/src/components/AppStoreSidebar/AppReleasesTab.vue +++ b/apps/settings/src/components/AppStoreSidebar/AppReleasesTab.vue @@ -50,7 +50,7 @@ import Markdown from '../Markdown.vue' // eslint-disable-next-line @typescript-eslint/no-unused-vars const props = defineProps<{ app: IAppstoreApp }>() -const hasChangelog = computed(() => Object.values(props.app.releases[0]?.translations ?? {}).some(({ changelog }) => !!changelog)) +const hasChangelog = computed(() => Object.values(props.app.releases?.[0]?.translations ?? {}).some(({ changelog }) => !!changelog)) const createChangelogFromRelease = (release: IAppstoreAppRelease) => release.translations?.[getLanguage()]?.changelog ?? release.translations?.en?.changelog ?? '' From 7b1d1b329e7c0eafa87d256d2c6a8c810e6d648d Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 17 Mar 2024 03:19:31 +0100 Subject: [PATCH 2/4] feat(settings): Allow app discover links to open app routes or the appstore page Signed-off-by: Ferdinand Thiessen --- .../components/AppStoreDiscover/AppLink.vue | 117 ++++++++++++++++++ .../components/AppStoreDiscover/PostType.vue | 14 ++- 2 files changed, 125 insertions(+), 6 deletions(-) create mode 100644 apps/settings/src/components/AppStoreDiscover/AppLink.vue diff --git a/apps/settings/src/components/AppStoreDiscover/AppLink.vue b/apps/settings/src/components/AppStoreDiscover/AppLink.vue new file mode 100644 index 0000000000000..88006b1d39b82 --- /dev/null +++ b/apps/settings/src/components/AppStoreDiscover/AppLink.vue @@ -0,0 +1,117 @@ + + + + diff --git a/apps/settings/src/components/AppStoreDiscover/PostType.vue b/apps/settings/src/components/AppStoreDiscover/PostType.vue index 443daa6287f03..df4755483f81b 100644 --- a/apps/settings/src/components/AppStoreDiscover/PostType.vue +++ b/apps/settings/src/components/AppStoreDiscover/PostType.vue @@ -23,18 +23,18 @@
- - {{ translatedHeadline }} + + {{ translatedHeadline }} +

{{ translatedText }}

-