-
-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app/permissions: draft new 'core' app config panel to edit the permis…
…sion stuff and upgrade/change_url/uninstall the app
- Loading branch information
Showing
6 changed files
with
341 additions
and
42 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
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,96 @@ | ||
version = "1.0" | ||
i18n = "app_config" | ||
|
||
[_core] | ||
|
||
# This is duplicated for each permission and named "permission_main", "permission_admin" etc. | ||
# Keys are also made unique by prefixing them with "permission_main" / "permission_admin", | ||
# for example the label key is "permission_{permid}_label" | ||
[_core.permissions] | ||
|
||
[_core.permissions.url] | ||
type = "url" | ||
visible = false | ||
|
||
[_core.permissions.location] | ||
type = "markdown" | ||
# Core automatically add a "visible=false" if url is empty (but since the keys are dynamic, can't do it here) | ||
|
||
[_core.permissions.label] | ||
type = "string" | ||
|
||
[_core.permissions.description] | ||
type = "text" | ||
|
||
[_core.permissions.show_tile] | ||
type = "boolean" | ||
# Core automatically add a "visible=false" if url is empty (but since the keys are dynamic, can't do it here) | ||
|
||
[_core.permissions.logo] | ||
type = "file" | ||
accept = ["image/png"] | ||
|
||
[_core.permissions.allowed] | ||
type = "tags" | ||
# Core automatically add a "readonly" if protected is true | ||
|
||
[_core.operations] | ||
|
||
[_core.operations.upgradable] | ||
type = "string" | ||
# can be 'yes', 'no', 'bad_quality' or 'url_required | ||
visible = false | ||
|
||
[_core.operations.upgradable_msg] | ||
type = "alert" | ||
# upgrade = no : success ? | ||
# but advertise testing ? | ||
# upgrade = yes : info ? | ||
# upgrade = url_required : hmmmmmwarning ? "must be upgraded from CLI" | ||
# upgrade = bad quality : hmmmmwarning ? "upgrade disabled" | ||
|
||
[_core.operations.upgrade] | ||
type = "button" | ||
icon = "arrow-up" | ||
style = "success" | ||
visible = "upgradable == 'yes'" | ||
|
||
[_core.operations.force_upgrade_explain] | ||
type = "markdown" | ||
visible = "upgradable == 'no'" | ||
|
||
[_core.operations.force_upgrade] | ||
type = "button" | ||
icon = "refresh" | ||
style = "info" | ||
visible = "upgradable == 'no'" | ||
|
||
[_core.operations.change_url_supported] | ||
type = "string" | ||
# can be 'yes', 'no' or 'not_relevant' | ||
visible = false | ||
|
||
[_core.operations.change_url_unsupported_msg] | ||
type = "alert" | ||
visible = "change_url_supported == 'no'" | ||
|
||
[_core.operations.change_url_domain] | ||
type = "domain" | ||
visible = "change_url_supported == 'yes'" | ||
|
||
[_core.operations.change_url_path] | ||
type = "path" | ||
visible = "change_url_supported == 'yes'" | ||
|
||
[_core.operations.change_url] | ||
type = "button" | ||
icon = "truck" | ||
style = "info" | ||
visible = "change_url_supported == 'yes'" | ||
|
||
# FIXME: "make default" ? meh | ||
|
||
[_core.operations.uninstall] | ||
type = "button" | ||
icon = "trash" | ||
style = "danger" |
Oops, something went wrong.