mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-18 09:24:07 +00:00
fix: copy token to search input if clipboard.writeText is not available (close #6)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user