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({
|
Toasts.show({
|
||||||
type,
|
type,
|
||||||
message,
|
message,
|
||||||
|
|
|
@ -71,10 +71,15 @@ export let Alerts: t.Alerts;
|
||||||
waitFor(["show", "close"], m => Alerts = m);
|
waitFor(["show", "close"], m => Alerts = m);
|
||||||
|
|
||||||
const ToastType = {
|
const ToastType = {
|
||||||
MESSAGE: 0,
|
MESSAGE: "message",
|
||||||
SUCCESS: 1,
|
SUCCESS: "success",
|
||||||
FAILURE: 2,
|
FAILURE: "failure",
|
||||||
CUSTOM: 3
|
CUSTOM: "custom",
|
||||||
|
CLIP: "clip",
|
||||||
|
LINK: "link",
|
||||||
|
FORWARD: "forward",
|
||||||
|
BOOKMARK: "bookmark",
|
||||||
|
CLOCK: "clock"
|
||||||
};
|
};
|
||||||
const ToastPosition = {
|
const ToastPosition = {
|
||||||
TOP: 0,
|
TOP: 0,
|
||||||
|
@ -87,7 +92,7 @@ export interface ToastData {
|
||||||
/**
|
/**
|
||||||
* Toasts.Type
|
* Toasts.Type
|
||||||
*/
|
*/
|
||||||
type: number,
|
type: string,
|
||||||
options?: ToastOptions;
|
options?: ToastOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +115,7 @@ export const Toasts = {
|
||||||
...{} as {
|
...{} as {
|
||||||
show(data: ToastData): void;
|
show(data: ToastData): void;
|
||||||
pop(): 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