mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-06 14:27:10 +02:00
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:
parent
9095ebdb1b
commit
5dd31685bb
@ -132,9 +132,9 @@ complete re-branding/private labeling, a more personalised experience can be ach
|
||||
download the app instead.
|
||||
8. `mobile_guide_app_variant`: Optional. The mobile app that the user is prompted to download from the `/mobile_guide` page. When omitted
|
||||
the mobile guide will be configured for the new Element X apps. Allowed values are as follows:
|
||||
1. `classic`: Element Android/iOS.
|
||||
2. `x`: Element X Android/iOS.
|
||||
3. `pro`: Element Pro Android/iOS.
|
||||
1. `element`: Element X Android/iOS.
|
||||
2. `element-classic`: Element Classic Android/iOS.
|
||||
3. `element-pro`: Element Pro Android/iOS.
|
||||
9. `update_base_url`: For the desktop app only, the URL where to acquire update packages. If specified, must be a path to a directory
|
||||
containing `macos` and `win32` directories, with the update packages within. Defaults to `https://packages.element.io/desktop/update/`
|
||||
in production.
|
||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
@ -81,7 +81,7 @@ export interface IConfigOptions {
|
||||
};
|
||||
|
||||
mobile_guide_toast?: boolean;
|
||||
mobile_guide_app_variant?: "classic" | "x" | "pro";
|
||||
mobile_guide_app_variant?: "element" | "element-classic" | "element-pro";
|
||||
|
||||
default_theme?: "light" | "dark" | string; // custom themes are strings
|
||||
default_country_code?: string; // ISO 3166 alpha2 country code
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user