You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.3 KiB
69 lines
2.3 KiB
/**
|
|
* Generic strings that could be used throughout the app.
|
|
*
|
|
* See also ../libs/veramo/setup.ts
|
|
*/
|
|
export enum AppString {
|
|
// This is used in titles and verbiage inside the app.
|
|
// There is also an app name without spaces, for packaging in the package.json file used in the manifest.
|
|
APP_NAME = "Time Safari",
|
|
|
|
PROD_ENDORSER_API_SERVER = "https://api.endorser.ch",
|
|
TEST_ENDORSER_API_SERVER = "https://test-api.endorser.ch",
|
|
LOCAL_ENDORSER_API_SERVER = "http://localhost:3000",
|
|
|
|
PROD_IMAGE_API_SERVER = "https://image-api.timesafari.app",
|
|
TEST_IMAGE_API_SERVER = "https://test-image-api.timesafari.app",
|
|
LOCAL_IMAGE_API_SERVER = "http://localhost:3001",
|
|
|
|
PROD_PARTNER_API_SERVER = "https://partner-api.endorser.ch",
|
|
TEST_PARTNER_API_SERVER = "https://test-partner-api.endorser.ch",
|
|
LOCAL_PARTNER_API_SERVER = LOCAL_ENDORSER_API_SERVER,
|
|
|
|
PROD_PUSH_SERVER = "https://timesafari.app",
|
|
TEST1_PUSH_SERVER = "https://test.timesafari.app",
|
|
TEST2_PUSH_SERVER = "https://timesafari-pwa.anomalistlabs.com",
|
|
|
|
NO_CONTACT_NAME = "(no name)",
|
|
}
|
|
|
|
export const APP_SERVER =
|
|
import.meta.env.VITE_APP_SERVER || "https://timesafari.app";
|
|
|
|
export const DEFAULT_ENDORSER_API_SERVER =
|
|
import.meta.env.VITE_DEFAULT_ENDORSER_API_SERVER ||
|
|
AppString.TEST_ENDORSER_API_SERVER;
|
|
|
|
export const DEFAULT_IMAGE_API_SERVER =
|
|
import.meta.env.VITE_DEFAULT_IMAGE_API_SERVER ||
|
|
AppString.TEST_IMAGE_API_SERVER;
|
|
|
|
export const DEFAULT_PARTNER_API_SERVER =
|
|
import.meta.env.VITE_DEFAULT_PARTNER_API_SERVER ||
|
|
AppString.TEST_PARTNER_API_SERVER;
|
|
|
|
export const DEFAULT_PUSH_SERVER =
|
|
window.location.protocol + "//" + window.location.host;
|
|
|
|
export const IMAGE_TYPE_PROFILE = "profile";
|
|
|
|
export const PASSKEYS_ENABLED =
|
|
!!import.meta.env.VITE_PASSKEYS_ENABLED || false;
|
|
|
|
/**
|
|
* The possible values for "group" and "type" are in App.vue.
|
|
* Some of this comes from the notiwind package, some is custom.
|
|
*/
|
|
export interface NotificationIface {
|
|
group: string; // "alert" | "modal"
|
|
type: string; // "toast" | "info" | "success" | "warning" | "danger"
|
|
title: string;
|
|
text?: string;
|
|
callback?: (success: boolean) => Promise<void>; // if this triggered an action
|
|
noText?: string;
|
|
onCancel?: (stopAsking?: boolean) => Promise<void>;
|
|
onNo?: (stopAsking?: boolean) => Promise<void>;
|
|
onYes?: () => Promise<void>;
|
|
promptToStopAsking?: boolean;
|
|
yesText?: string;
|
|
}
|
|
|