Proper addition of something like tag display in alerts (#2982)

* spacebar in presets and tags addition

* super mega spacebar remake

* style fix

* final name removal in ui

* replaceAll in ape removal

* using display above account chart

* create preset in command line addition

* testing removal

* one more testing removal

* create tag command line addition

* Update commandline-lists.ts

* moved add commands to the bottom
hiding if user is not signed in

* refactor

* hiding tags and presets when signed out

* fixed presets and tags display in alerts

Co-authored-by: Miodec <bartnikjack@gmail.com>
Co-authored-by: Vasiliy Novozhilov <vasya@192.168.1.3>
This commit is contained in:
aNOOBis 2022-05-16 09:49:33 -07:00 committed by GitHub
parent 57ce7554ef
commit 69810de9e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -94,7 +94,11 @@ async function apply(): Promise<void> {
const response = await Ape.presets.add(presetName, configChanges);
if (response.status !== 200) {
Notifications.add("Failed to add preset: " + response.message, -1);
Notifications.add(
"Failed to add preset: " +
response.message.replace(presetName, propPresetName),
-1
);
} else {
Notifications.add("Preset added", 1, 2);
snapshotPresets.push({

View file

@ -77,7 +77,10 @@ async function apply(): Promise<void> {
const response = await Ape.users.createTag(tagName);
if (response.status !== 200) {
Notifications.add("Failed to add tag: " + response.message, -1);
Notifications.add(
"Failed to add tag: " + response.message.replace(tagName, propTagName),
-1
);
} else {
Notifications.add("Tag added", 1);
DB.getSnapshot().tags?.push({