parent
4a447c74ef
commit
e4380632e0
2 changed files with 12 additions and 7 deletions
|
@ -60,7 +60,7 @@ export async function downloadSettingsBackup() {
|
|||
}
|
||||
}
|
||||
|
||||
const toast = (type: number, message: string) =>
|
||||
const toast = (type: string, message: string) =>
|
||||
Toasts.show({
|
||||
type,
|
||||
message,
|
||||
|
|
|
@ -71,10 +71,15 @@ export let Alerts: t.Alerts;
|
|||
waitFor(["show", "close"], m => Alerts = m);
|
||||
|
||||
const ToastType = {
|
||||
MESSAGE: 0,
|
||||
SUCCESS: 1,
|
||||
FAILURE: 2,
|
||||
CUSTOM: 3
|
||||
MESSAGE: "message",
|
||||
SUCCESS: "success",
|
||||
FAILURE: "failure",
|
||||
CUSTOM: "custom",
|
||||
CLIP: "clip",
|
||||
LINK: "link",
|
||||
FORWARD: "forward",
|
||||
BOOKMARK: "bookmark",
|
||||
CLOCK: "clock"
|
||||
};
|
||||
const ToastPosition = {
|
||||
TOP: 0,
|
||||
|
@ -87,7 +92,7 @@ export interface ToastData {
|
|||
/**
|
||||
* Toasts.Type
|
||||
*/
|
||||
type: number,
|
||||
type: string,
|
||||
options?: ToastOptions;
|
||||
}
|
||||
|
||||
|
@ -110,7 +115,7 @@ export const Toasts = {
|
|||
...{} as {
|
||||
show(data: ToastData): void;
|
||||
pop(): void;
|
||||
create(message: string, type: number, options?: ToastOptions): ToastData;
|
||||
create(message: string, type: string, options?: ToastOptions): ToastData;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue