mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-22 16:26:18 +08:00
parent
98b777dfcb
commit
e6eed80b97
|
@ -881,13 +881,17 @@ export async function init(): Promise<void> {
|
|||
}
|
||||
|
||||
if (Config.tapeMode !== "off" && !language.leftToRight) {
|
||||
Notifications.add("This language does not support tape mode.", 0);
|
||||
Notifications.add("This language does not support tape mode.", 0, {
|
||||
important: true,
|
||||
});
|
||||
UpdateConfig.setTapeMode("off");
|
||||
}
|
||||
|
||||
if (Config.lazyMode === true && language.noLazyMode) {
|
||||
rememberLazyMode = true;
|
||||
Notifications.add("This language does not support lazy mode.", 0);
|
||||
Notifications.add("This language does not support lazy mode.", 0, {
|
||||
important: true,
|
||||
});
|
||||
UpdateConfig.setLazyMode(false, true);
|
||||
} else if (rememberLazyMode === true && !language.noLazyMode) {
|
||||
UpdateConfig.setLazyMode(true, true);
|
||||
|
@ -1078,7 +1082,8 @@ export async function init(): Promise<void> {
|
|||
`No ${Config.language
|
||||
.replace(/_\d*k$/g, "")
|
||||
.replace(/_/g, " ")} quotes found`,
|
||||
0
|
||||
0,
|
||||
{ important: true }
|
||||
);
|
||||
if (Auth?.currentUser) {
|
||||
QuoteSubmitPopup.show(false);
|
||||
|
@ -1095,7 +1100,7 @@ export async function init(): Promise<void> {
|
|||
);
|
||||
if (targetQuote === undefined) {
|
||||
rq = <MonkeyTypes.Quote>quotesCollection.groups[0][0];
|
||||
Notifications.add("Quote Id Does Not Exist", 0);
|
||||
Notifications.add("Quote Id Does Not Exist", 0, { important: true });
|
||||
} else {
|
||||
rq = targetQuote;
|
||||
}
|
||||
|
@ -1105,7 +1110,7 @@ export async function init(): Promise<void> {
|
|||
);
|
||||
|
||||
if (randomQuote === null) {
|
||||
Notifications.add("No favorite quotes found", 0);
|
||||
Notifications.add("No favorite quotes found", 0, { important: true });
|
||||
UpdateConfig.setQuoteLength(-1);
|
||||
restart();
|
||||
return;
|
||||
|
@ -1115,7 +1120,9 @@ export async function init(): Promise<void> {
|
|||
} else {
|
||||
const randomQuote = QuotesController.getRandomQuote();
|
||||
if (randomQuote === null) {
|
||||
Notifications.add("No quotes found for selected quote length", 0);
|
||||
Notifications.add("No quotes found for selected quote length", 0, {
|
||||
important: true,
|
||||
});
|
||||
TestUI.setTestRestarting(false);
|
||||
return;
|
||||
}
|
||||
|
@ -1312,6 +1319,7 @@ export async function retrySavingResult(): Promise<void> {
|
|||
0,
|
||||
{
|
||||
duration: 5,
|
||||
important: true,
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -1668,6 +1676,7 @@ export async function finish(difficultyFailed = false): Promise<void> {
|
|||
CustomText.setCustomTextLongProgress(customTextName, newProgress);
|
||||
Notifications.add("Long custom text progress saved", 1, {
|
||||
duration: 5,
|
||||
important: true,
|
||||
});
|
||||
|
||||
let newText = CustomText.getCustomText(customTextName, true);
|
||||
|
@ -1679,6 +1688,7 @@ export async function finish(difficultyFailed = false): Promise<void> {
|
|||
CustomText.setText(CustomText.getCustomText(customTextName, true));
|
||||
Notifications.add("Long custom text completed", 1, {
|
||||
duration: 5,
|
||||
important: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1762,6 +1772,7 @@ async function saveResult(
|
|||
Notifications.add("Result not saved: disabled by user", -1, {
|
||||
duration: 3,
|
||||
customTitle: "Notice",
|
||||
important: true,
|
||||
});
|
||||
AccountButton.loading(false);
|
||||
return;
|
||||
|
@ -1771,6 +1782,7 @@ async function saveResult(
|
|||
Notifications.add("Result not saved: offline", -1, {
|
||||
duration: 2,
|
||||
customTitle: "Notice",
|
||||
important: true,
|
||||
});
|
||||
AccountButton.loading(false);
|
||||
retrySaving.canRetry = true;
|
||||
|
@ -1892,7 +1904,7 @@ async function saveResult(
|
|||
|
||||
$("#retrySavingResultButton").addClass("hidden");
|
||||
if (isRetrying) {
|
||||
Notifications.add("Result saved", 1);
|
||||
Notifications.add("Result saved", 1, { important: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue