|
|
@@ -3,6 +3,8 @@
|
|
|
import { goto } from '$app/navigation';
|
|
|
import { userFlag } from '$lib/utils/store';
|
|
|
import beer_icon from '$lib/assets/beer_icon.svg';
|
|
|
+ import { browser } from '$app/environment';
|
|
|
+ import { logo_id } from '$lib/utils/store';
|
|
|
|
|
|
let username = '';
|
|
|
let password = '';
|
|
|
@@ -10,10 +12,23 @@
|
|
|
let error = '';
|
|
|
let data;
|
|
|
let currentUser = false;
|
|
|
+ let company;
|
|
|
+
|
|
|
+ if (browser) {
|
|
|
+ company = localStorage.getItem('company');
|
|
|
+ }
|
|
|
|
|
|
onMount(() => {
|
|
|
if (currentUser) {
|
|
|
- goto('/tables');
|
|
|
+ goto('/dashboard/tables');
|
|
|
+ }
|
|
|
+
|
|
|
+ switch (company) {
|
|
|
+ case '1':
|
|
|
+ logo_id.set(
|
|
|
+ 'https://i.postimg.cc/bNNBcTZj/Whats-App-Image-2025-07-29-at-19-59-16-removebg-preview.png'
|
|
|
+ );
|
|
|
+ break;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -82,7 +97,7 @@
|
|
|
<div class="flex min-h-screen items-center justify-center bg-[#1C1C1E] px-4">
|
|
|
<div class="w-full max-w-md space-y-8 rounded-lg bg-[#2C2C2E] p-8 shadow-lg">
|
|
|
<div class="flex flex-col items-center justify-center text-center">
|
|
|
- <img src={beer_icon} alt="Logo" class="h-20 w-20" />
|
|
|
+ <img src={$logo_id} alt="Logo" class="h-20 w-20" />
|
|
|
<h1 class="mt-4 text-3xl font-extrabold text-white">Bar do Ferlin</h1>
|
|
|
<p class="mt-2 text-[#A0A0A0]">Login</p>
|
|
|
</div>
|
|
|
@@ -97,7 +112,6 @@
|
|
|
<div>
|
|
|
<label for="username" class="block text-sm font-medium text-[#A0A0A0]"> Usuário </label>
|
|
|
<div class="relative mt-1">
|
|
|
- <!-- Aqui você pode colocar um ícone de usuário, se quiser -->
|
|
|
<!-- <img src="/user-icon.svg" class="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-[#A0A0A0]" alt="" /> -->
|
|
|
|
|
|
<input
|
|
|
@@ -113,7 +127,6 @@
|
|
|
<div>
|
|
|
<label for="password" class="block text-sm font-medium text-[#A0A0A0]"> Senha </label>
|
|
|
<div class="relative mt-1">
|
|
|
- <!-- Aqui você pode colocar um ícone de cadeado, se quiser -->
|
|
|
<!-- <img src="/lock-icon.svg" class="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-[#A0A0A0]" alt="" /> -->
|
|
|
|
|
|
<input
|