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.
		
		
		
		
		
			
		
			
				
					
					
						
							78 lines
						
					
					
						
							2.7 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							78 lines
						
					
					
						
							2.7 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",
							 | 
						|
								  APP_NAME_NO_SPACES = "TimeSafari",
							 | 
						|
								
							 | 
						|
								  PROD_ENDORSER_API_SERVER = "https://api.endorser.ch",
							 | 
						|
								  TEST_ENDORSER_API_SERVER = "https://test-api.endorser.ch",
							 | 
						|
								  LOCAL_ENDORSER_API_SERVER = "http://127.0.0.1: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://127.0.0.1:3001",
							 | 
						|
								
							 | 
						|
								  PROD_PARTNER_API_SERVER = "https://partner-api.endorser.ch",
							 | 
						|
								  TEST_PARTNER_API_SERVER = "https://test-partner-api.endorser.ch",
							 | 
						|
								  // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
							 | 
						|
								  LOCAL_PARTNER_API_SERVER = "http://127.0.0.1:3000",
							 | 
						|
								
							 | 
						|
								  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.PROD_ENDORSER_API_SERVER;
							 | 
						|
								
							 | 
						|
								export const DEFAULT_IMAGE_API_SERVER =
							 | 
						|
								  import.meta.env.VITE_DEFAULT_IMAGE_API_SERVER ||
							 | 
						|
								  AppString.PROD_IMAGE_API_SERVER;
							 | 
						|
								
							 | 
						|
								export const DEFAULT_PARTNER_API_SERVER =
							 | 
						|
								  import.meta.env.VITE_DEFAULT_PARTNER_API_SERVER ||
							 | 
						|
								  AppString.PROD_PARTNER_API_SERVER;
							 | 
						|
								
							 | 
						|
								export const DEFAULT_PUSH_SERVER =
							 | 
						|
								  import.meta.env.VITE_DEFAULT_PUSH_SERVER || AppString.PROD_PUSH_SERVER;
							 | 
						|
								
							 | 
						|
								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;
							 | 
						|
								  membersData?: Array<{
							 | 
						|
								    member: { admitted: boolean; content: string; memberId: number };
							 | 
						|
								    name: string;
							 | 
						|
								    did: string;
							 | 
						|
								    isContact: boolean;
							 | 
						|
								    contact?: { did: string; name?: string; seesMe?: boolean };
							 | 
						|
								  }>; // For passing member data to visibility dialog
							 | 
						|
								}
							 | 
						|
								
							 |