-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Announcement Banner Schema and JSON (#7)
* feat: add announcement banner schema and json * feat: set is chain halted as true * feat: add start and end date to top announcement banner * feat: add 'isChainHalted' to top announcement banner * feat: remove "isChainHalted" property from "swap-rotating-banner" schema and add "isChainHalted" property to "top-announcement-banner" schema * Update top announcement banner settings * Remove unnecessary code in top-announcement-banner.json
- Loading branch information
1 parent
bdcbc27
commit fc63454
Showing
2 changed files
with
80 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"$schema": "../schemas/top-announcement-banner.schema.json", | ||
"isChainHalted": false, | ||
"banner": { | ||
"enTextOrLocalizationPath": "This is a test of the top announcement banner.", | ||
"link": { | ||
"enTextOrLocalizationKey": "Click here to learn more.", | ||
"isExternal": true, | ||
"url": "https://www.google.com" | ||
}, | ||
"localStorageKey": "top-announcement-banner-test" | ||
} | ||
} |
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,67 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"properties": { | ||
"isChainHalted": { | ||
"type": "boolean" | ||
}, | ||
"banner": { | ||
"type": ["object", "null"], | ||
"properties": { | ||
"localStorageKey": { | ||
"type": "string" | ||
}, | ||
"pageRoute": { | ||
"type": "string", | ||
"$comment": "Leave undefined to include all pages." | ||
}, | ||
"enTextOrLocalizationPath": { | ||
"type": "string", | ||
"$comment": "English text or key into localization jsons." | ||
}, | ||
"link": { | ||
"type": "object", | ||
"properties": { | ||
"enTextOrLocalizationKey": { | ||
"type": "string", | ||
"$comment": "English text or key into localization jsons." | ||
}, | ||
"url": { | ||
"type": "string" | ||
}, | ||
"isExternal": { | ||
"type": "boolean", | ||
"$comment": "External to Osmosis. Show disclaimer before linking out of app." | ||
} | ||
}, | ||
"$comment": "Link to external page.", | ||
"required": ["url"] | ||
}, | ||
"isWarning": { | ||
"type": "boolean", | ||
"$comment": "Use orange styling, persist on page reloads." | ||
}, | ||
"persistent": { | ||
"type": "boolean", | ||
"$comment": "Will always show on page reload. Use with caution. (Warnings persist)" | ||
}, | ||
"bg": { | ||
"type": "string", | ||
"$comment": "Custom Background color." | ||
}, | ||
"startDate": { | ||
"type": "string", | ||
"format": "date-time", | ||
"$comment": "ISO 8601 date-time string. Banner will not show until this date." | ||
}, | ||
"endDate": { | ||
"type": "string", | ||
"format": "date-time", | ||
"$comment": "ISO 8601 date-time string. Banner will not show after this date." | ||
} | ||
}, | ||
"required": ["enTextOrLocalizationPath"] | ||
} | ||
}, | ||
"required": ["banner", "isChainHalted"] | ||
} |