@@ -54,6 +54,7 @@ import { computed } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import AppShell from '@/components/shell/AppShell.vue';
import AppIcon from '@/components/ui/AppIcon.vue';
+import AppLogo from '@/components/brand/AppLogo.vue';
import ThemeToggle from '@/components/ui/ThemeToggle.vue';
import type { NavItem } from '@/types/icons';
import { useAuthStore } from '@/stores/auth';
diff --git a/src/router/index.ts b/src/router/index.ts
index 71edce4..66c6e91 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -60,7 +60,7 @@ const router = createRouter({
router.beforeEach(async (to) => {
const auth = useAuthStore();
- if (auth.token) {
+ if (auth.token && !auth.user) {
await auth.loadUser();
}
diff --git a/src/stores/auth.ts b/src/stores/auth.ts
index 32891b3..a39a509 100644
--- a/src/stores/auth.ts
+++ b/src/stores/auth.ts
@@ -26,10 +26,13 @@ export const useAuthStore = defineStore('auth', () => {
localStorage.removeItem(TOKEN_KEY);
}
- async function loadUser() {
+ async function loadUser(force = false) {
if (!token.value) {
return;
}
+ if (user.value && !force) {
+ return;
+ }
try {
user.value = await fetchMe(token.value);
} catch {
diff --git a/src/styles/main.css b/src/styles/main.css
index bbaa64b..9fcad6f 100644
--- a/src/styles/main.css
+++ b/src/styles/main.css
@@ -9,6 +9,7 @@
--color-border: #e2e8f0;
--color-text: #0f172a;
--color-muted: #64748b;
+ --color-placeholder: rgb(100 116 139 / 0.35);
}
.dark {
@@ -18,6 +19,7 @@
--color-border: #334155;
--color-text: #f1f5f9;
--color-muted: #94a3b8;
+ --color-placeholder: rgb(148 163 184 / 0.35);
}
@layer base {
diff --git a/src/views/app/AppHomeView.vue b/src/views/app/AppHomeView.vue
index fea1784..2662765 100644
--- a/src/views/app/AppHomeView.vue
+++ b/src/views/app/AppHomeView.vue
@@ -130,8 +130,7 @@ watch(selectedCategoryId, () => {
loadBusinesses();
});
-onMounted(async () => {
- await loadCategories();
- await loadBusinesses();
+onMounted(() => {
+ void Promise.all([loadCategories(), loadBusinesses()]);
});
diff --git a/src/views/auth/LoginView.vue b/src/views/auth/LoginView.vue
index c5f5661..750f0b9 100644
--- a/src/views/auth/LoginView.vue
+++ b/src/views/auth/LoginView.vue
@@ -1,46 +1,60 @@
-
-
- {{ error }}
-
+
+
+
+
+
+ نوبتدهی آنلاین برای مشتریان
+ مدیریت ساده برای کسبوکار شما
+
+
-
+
+
@@ -54,6 +68,7 @@ import AuthModeSwitch from '@/components/auth/AuthModeSwitch.vue';
import type { AuthLoginMode } from '@/components/auth/AuthModeSwitch.vue';
import AppButton from '@/components/ui/AppButton.vue';
import AppInput from '@/components/ui/AppInput.vue';
+import AppLogo from '@/components/brand/AppLogo.vue';
import AuthLayout from '@/layouts/AuthLayout.vue';
import { useAuthStore } from '@/stores/auth';
diff --git a/src/views/auth/VerifyOtpView.vue b/src/views/auth/VerifyOtpView.vue
index 1b18772..8d441d6 100644
--- a/src/views/auth/VerifyOtpView.vue
+++ b/src/views/auth/VerifyOtpView.vue
@@ -14,19 +14,14 @@
@@ -43,12 +38,12 @@