diff --git a/src/components/TopMessage.vue b/src/components/TopMessage.vue index 82dadc7..8433741 100644 --- a/src/components/TopMessage.vue +++ b/src/components/TopMessage.vue @@ -30,15 +30,15 @@ export default class TopMessage extends Vue { const settings = await db.settings.get(MASTER_SETTINGS_KEY); if ( settings?.warnIfTestServer && - window.location.hostname !== AppString.PROD_TIME_SAFARI_SERVER_HOST + settings.apiServer !== AppString.PROD_ENDORSER_API_SERVER ) { - const didPrefix = settings.activeDid?.slice(11, 14); - this.message = "You're linked to a test server, user " + didPrefix; + const didPrefix = settings.activeDid?.slice(11, 15); + this.message = "You're linked to a non-prod server, user " + didPrefix; } else if ( settings?.warnIfProdServer && - window.location.hostname === AppString.PROD_TIME_SAFARI_SERVER_HOST + settings.apiServer === AppString.PROD_ENDORSER_API_SERVER ) { - const didPrefix = settings.activeDid?.slice(1, 14); + const didPrefix = settings.activeDid?.slice(11, 15); this.message = "You're linked to the production server, user " + didPrefix; } diff --git a/src/constants/app.ts b/src/constants/app.ts index 2d7d372..c92709b 100644 --- a/src/constants/app.ts +++ b/src/constants/app.ts @@ -6,9 +6,6 @@ export enum AppString { APP_NAME = "Time Safari", - PROD_TIME_SAFARI_SERVER_HOST = "timesafari.app", - PROD_TIME_SAFARI_SERVER = "https://" + PROD_TIME_SAFARI_SERVER_HOST, - PROD_ENDORSER_API_SERVER = "https://api.endorser.ch", TEST_ENDORSER_API_SERVER = "https://test-api.endorser.ch", LOCAL_ENDORSER_API_SERVER = "http://localhost:3000", diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index cb153bd..916d1fb 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -390,7 +390,7 @@ @click="toggleTestWarning" > -

Show warning if on test server

+

Show warning if on non-prod server