Continue second pass

This commit is contained in:
Manav Rathi
2024-06-30 17:58:52 +05:30
parent 6f073b007b
commit 67e054a26d
4 changed files with 7 additions and 11 deletions

View File

@@ -94,8 +94,6 @@ export const openPasskeyVerificationURL = ({
/**
* Open a new window showing a page on the Ente accounts app where the user can
* see and their manage their passkeys.
*
* @param appName The {@link AppName} of the app which is calling this function.
*/
export const openAccountsManagePasskeysPage = async () => {
// Check if the user has passkey recovery enabled

View File

@@ -47,12 +47,6 @@ export const staticAppTitle = {
photos: "Ente Photos",
}[appName];
export const _clientPackageName: Record<AppName, string> = {
accounts: "io.ente.accounts.web",
auth: "io.ente.auth.web",
photos: "io.ente.photos.web",
};
/** Client package name for the Photos desktop app */
export const clientPackageNamePhotosDesktop = "io.ente.photos.desktop";
@@ -71,7 +65,11 @@ export const clientPackageName = (() => {
throw new Error(`Unsupported desktop appName ${appName}`);
return clientPackageNamePhotosDesktop;
}
return _clientPackageName[appName];
return {
accounts: "io.ente.accounts.web",
auth: "io.ente.auth.web",
photos: "io.ente.photos.web",
}[appName];
})();
/**

View File

@@ -1,5 +1,5 @@
import { clientPackageName } from "./app";
import { ensureAuthToken } from "./local-user";
import { clientPackageName } from "./types/app";
/**
* Return headers that should be passed alongwith (almost) all authenticated

View File

@@ -1,6 +1,6 @@
import { isDevBuild } from "@/next/env";
import log from "@/next/log";
import { appName, appNames } from "./types/app";
import { appName, appNames } from "./app";
/**
* Log a standard startup banner.