mirror of
https://github.com/imputnet/cobalt.git
synced 2025-01-04 06:06:07 +00:00
web/safety-warning: early returns
This commit is contained in:
parent
002e70cb89
commit
b4599e68bb
|
@ -7,7 +7,10 @@ import settings, { updateSetting } from "$lib/state/settings";
|
||||||
import { createDialog } from "$lib/dialogs";
|
import { createDialog } from "$lib/dialogs";
|
||||||
|
|
||||||
export const apiOverrideWarning = async () => {
|
export const apiOverrideWarning = async () => {
|
||||||
if (env.DEFAULT_API && !get(settings).processing.seenOverrideWarning) {
|
if (!env.DEFAULT_API || get(settings).processing.seenOverrideWarning) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let _actions: {
|
let _actions: {
|
||||||
resolve: () => void;
|
resolve: () => void;
|
||||||
reject: () => void;
|
reject: () => void;
|
||||||
|
@ -59,10 +62,12 @@ export const apiOverrideWarning = async () => {
|
||||||
|
|
||||||
await promise;
|
await promise;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export const customInstanceWarning = async () => {
|
export const customInstanceWarning = async () => {
|
||||||
if (!get(settings).processing.seenCustomWarning) {
|
if (get(settings).processing.seenCustomWarning) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let _actions: {
|
let _actions: {
|
||||||
resolve: () => void;
|
resolve: () => void;
|
||||||
reject: () => void;
|
reject: () => void;
|
||||||
|
@ -108,4 +113,3 @@ export const customInstanceWarning = async () => {
|
||||||
|
|
||||||
await promise;
|
await promise;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue