Path: blob/master/cheatGUI/src/utils/swal.ts
2582 views
import swal from "sweetalert2";1export const Swal = swal;23// Text Input4export const Input = Swal.mixin({5input: "text",6showCancelButton: true,7showConfirmButton: true,8toast: false,9});10// Text Input11121314// Number Input15export const NumberInput = Input.mixin({16toast: false,17input: "number"18});19// Number Input202122// Toast23export const Toast = Swal.mixin({24toast: true,25position: "bottom"26});27// Toast282930// Confirm31export const Confirm = Swal.mixin({32icon: "warning",33showCancelButton: true,34toast: false,35confirmButtonText: "Confirm",36cancelButtonText: "Cancel"37});38// Confirm394041// Info popup42export const Info = Swal.mixin({43icon: "info",44showCancelButton: false,45toast: false46});47// Info popup484950// License popup51export const License = Swal.mixin({52icon: "info",53showCancelButton: true,54toast: false,55confirmButtonText: "Agree",56cancelButtonText: "Disagree"57});585960// Disagreed to license popup61export const NoLicense = Swal.mixin({62icon: "error",63showCancelButton: true,64toast: false,65confirmButtonText: "Reload",66cancelButtonText: "Play without hacks"67});68// Disagreed to license popup6970// @ts-expect-error allow accessing swal from devtools71window.Swal = Swal;7273