Rename the mobile_guide_app_variant config values to be clearer. (#30258)
* Fix the default mobile_guide links. Whilst the script should update these if it fails these should link to Element X which is now the default app that we link out to from this page. * Rename the mobile_guide_app_variant values to be clearer. Also handle invalid config values by defaulting to Element X. * Rename snapshots to match new app variant identifiers.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<head>
|
||||
<title>Element Mobile Guide</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="apple-itunes-app" content="app-id=id1083446067" />
|
||||
<meta name="apple-itunes-app" content="app-id=id1631335820" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -44,7 +44,7 @@
|
||||
<h1 id="step1_heading">Download Element</h1>
|
||||
<div class="mx_StoreLinks">
|
||||
<a
|
||||
href="https://apps.apple.com/app/element-messenger/id1083446067"
|
||||
href="https://apps.apple.com/app/element-x-secure-chat-call/id1631335820"
|
||||
target="_blank"
|
||||
class="mx_StoreBadge"
|
||||
id="app_store_link"
|
||||
@@ -57,7 +57,7 @@
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
href="https://play.google.com/store/apps/details?id=im.vector.app"
|
||||
href="https://play.google.com/store/apps/details?id=io.element.android.x"
|
||||
target="_blank"
|
||||
class="mx_StoreBadge"
|
||||
id="play_store_link"
|
||||
@@ -73,7 +73,7 @@
|
||||
<p id="f_droid_section">
|
||||
Also available on
|
||||
<a
|
||||
href="https://f-droid.org/packages/im.vector.app"
|
||||
href="https://f-droid.org/packages/io.element.android.x"
|
||||
target="_blank"
|
||||
class="mx_ClearDecoration"
|
||||
id="f_droid_link"
|
||||
|
||||
@@ -12,7 +12,7 @@ import "@fontsource/inter/600.css";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { getVectorConfig } from "../getconfig";
|
||||
import { type MobileAppVariant, mobileApps, updateMobilePage } from "./mobile-apps.ts";
|
||||
import { MobileAppVariant, mobileApps, updateMobilePage } from "./mobile-apps.ts";
|
||||
|
||||
function onBackToElementClick(): void {
|
||||
// Cookie should expire in 4 hours
|
||||
@@ -53,8 +53,8 @@ async function initPage(): Promise<void> {
|
||||
const defaultHsUrl = config?.["default_hs_url"];
|
||||
const defaultIsUrl = config?.["default_is_url"];
|
||||
|
||||
const appVariant = (config?.["mobile_guide_app_variant"] ?? "x") as MobileAppVariant;
|
||||
const metadata = mobileApps[appVariant];
|
||||
const appVariant = (config?.["mobile_guide_app_variant"] as MobileAppVariant) ?? MobileAppVariant.X;
|
||||
const metadata = mobileApps[appVariant] ?? mobileApps[MobileAppVariant.X]; // Additional fallback in case mobile_guide_app_variant has an unexpected value.
|
||||
|
||||
const incompatibleOptions = [wkConfig, serverName, defaultHsUrl].filter((i) => !!i);
|
||||
if (defaultHsUrl && (wkConfig || serverName)) {
|
||||
|
||||
@@ -10,9 +10,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
export enum MobileAppVariant {
|
||||
Classic = "classic",
|
||||
X = "x",
|
||||
Pro = "pro",
|
||||
Classic = "element-classic",
|
||||
X = "element",
|
||||
Pro = "element-pro",
|
||||
}
|
||||
|
||||
export interface MobileAppMetadata {
|
||||
|
||||
Reference in New Issue
Block a user