mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-21 07:46:15 +08:00
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:
parent
57ce7554ef
commit
69810de9e0
|
@ -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({
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in a new issue