feat: warn user if it doesn't have message persistence permission

This commit is contained in:
JustSong
2023-04-16 18:51:58 +08:00
parent 3fca905b1e
commit dfdddc1064
6 changed files with 51 additions and 6 deletions
+5
View File
@@ -31,6 +31,7 @@ export function isMobile() {
}
let showErrorOptions = { autoClose: toastConstants.ERROR_TIMEOUT };
let showWarningOptions = { autoClose: toastConstants.WARNING_TIMEOUT };
let showSuccessOptions = { autoClose: toastConstants.SUCCESS_TIMEOUT };
let showInfoOptions = { autoClose: toastConstants.INFO_TIMEOUT };
let showNoticeOptions = { autoClose: false };
@@ -74,6 +75,10 @@ export function showError(error) {
}
}
export function showWarning(message) {
toast.warn(message, showWarningOptions);
}
export function showSuccess(message) {
toast.success(message, showSuccessOptions);
}