forked from trent_larson/crowd-funder-for-time-pwa
fix top warnings when on prod or non-prod servers
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user