feat: enhance employee and symbol management with new features, improved UI components, and backend schema updates
This commit is contained in:
22
apps/web/src/lib/stores/loginModal.svelte.ts
Normal file
22
apps/web/src/lib/stores/loginModal.svelte.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { browser } from "$app/environment";
|
||||
|
||||
/**
|
||||
* Store global para controlar o modal de login
|
||||
*/
|
||||
class LoginModalStore {
|
||||
showModal = $state(false);
|
||||
redirectAfterLogin = $state<string | null>(null);
|
||||
|
||||
open(redirectTo?: string) {
|
||||
this.showModal = true;
|
||||
this.redirectAfterLogin = redirectTo || null;
|
||||
}
|
||||
|
||||
close() {
|
||||
this.showModal = false;
|
||||
this.redirectAfterLogin = null;
|
||||
}
|
||||
}
|
||||
|
||||
export const loginModalStore = new LoginModalStore();
|
||||
|
||||
Reference in New Issue
Block a user