-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2320 from IDEMSInternational/refactor/app-fields
Refactor!: app field settings
- Loading branch information
Showing
19 changed files
with
205 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* Protected fields can be set by field service and will be prefixed with an underscore | ||
* They are used to store store computed or exported variables and are not user overridable | ||
*/ | ||
enum PROTECTED_FIELDS { | ||
APP_AUTH_USER = "app_auth_user", | ||
APP_FIRST_LAUNCH = "app_first_launch", | ||
APP_LANGUAGE = "app_language", | ||
APP_SKIN = "app_skin", | ||
APP_THEME = "app_theme", | ||
/** Track whether an update is available for download */ | ||
APP_UPDATE_AVAILABLE = "app_update_available", | ||
/** Track whether an update has been downloaded and is available for install */ | ||
APP_UPDATE_DOWNLOADED = "app_update_downloaded", | ||
APP_USER_ID = "app_user_id", | ||
APP_VERSION = "app_version", | ||
CONTENT_VERSION = "content_version", | ||
DEPLOYMENT_NAME = "deployment_name", | ||
FEEDBACK_SELECTED_TEXT = "feedback_selected_text", | ||
FEEDBACK_SIDEBAR_OPEN = "feedback_sidebar_open", | ||
SERVER_SYNC_LATEST = "server_sync_latest", | ||
} | ||
|
||
/** Whenever retrieving a protected field make sure to include underscore prefix */ | ||
export const getProtectedFieldName = (key: IProtectedFieldName) => `_${PROTECTED_FIELDS[key]}`; | ||
|
||
export type IProtectedFieldName = keyof typeof PROTECTED_FIELDS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export * from "./appConfig"; | ||
export * from "./db.model"; | ||
export * from "./deployment.model"; | ||
export * from "./fields"; | ||
export * from "./flowTypes"; | ||
export * from "./functions"; | ||
export * from "./skin.model"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.