Update and refactor.
This commit is contained in:
parent
d3fc0d9eee
commit
7f9a432b47
|
@ -14,14 +14,15 @@
|
||||||
@import "@nuxt/ui";
|
@import "@nuxt/ui";
|
||||||
|
|
||||||
/* custom imports */
|
/* custom imports */
|
||||||
@import "../../../../../assets/common/scss/_IRANSansX.scss";
|
/* @import "../../../../../assets/common/scss/_IRANSansX.scss"; */
|
||||||
@import "../../../../../assets/common/scss/_takrim.scss";
|
@import "../../../../../assets/common/scss/_takrim.scss";
|
||||||
@import "../../../../../assets/common/scss/_vazir.scss";
|
@import "../../../../../assets/common/scss/_vazir.scss";
|
||||||
@import "../../../../../assets/common/scss/_estedad.scss";
|
/* @import "../../../../../assets/common/scss/_estedad.scss"; */
|
||||||
@import "../../../../../assets/common/scss/_sahel-single-font-weight.scss";
|
/* @import "../../../../../assets/common/scss/_sahel-single-font-weight.scss"; */
|
||||||
|
|
||||||
@theme {
|
@theme {
|
||||||
--font: vazir, sahel, estadad, IRANSansX, "Public Sans", sans-serif;
|
/* --font: vazir, sahel, estadad, IRANSansX, "Public Sans", sans-serif; */
|
||||||
|
--font: vazir, "Public Sans", sans-serif;
|
||||||
--ar-font: Takrim;
|
--ar-font: Takrim;
|
||||||
--breakpoint-sm: 360px;
|
--breakpoint-sm: 360px;
|
||||||
--breakpoint-md: 720px;
|
--breakpoint-md: 720px;
|
||||||
|
@ -38,17 +39,6 @@
|
||||||
} */
|
} */
|
||||||
/* @source */
|
/* @source */
|
||||||
|
|
||||||
/* @import "../../../../../assets/common/scss/customizations/_variables.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/customizations/_list-variables.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/customizations/_monir-variables.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/components/components.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/plugins/plugins.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/mixin.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/placeholder.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/layouts/layouts.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/common.scss"; */
|
|
||||||
/* @import "../../../../../assets/common/scss/responsive/responsive.scss"; */
|
|
||||||
|
|
||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
|
@ -108,4 +98,4 @@ html {
|
||||||
scrollbar-color: #ccc #eee;
|
scrollbar-color: #ccc #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
@import "./responsive/responsive.css";
|
/* @import "./responsive/responsive.css"; */
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAuthStore } from "@stores/authStore";
|
import { useAuthStore } from "@stores/authStore";
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
// {
|
// {
|
||||||
// label: "چت بات",
|
// label: "چت بات",
|
||||||
// icon: "haditha:chat-bot",
|
// icon: "haditha:chat-bot",
|
||||||
|
@ -80,7 +81,7 @@ const items = ref([
|
||||||
type: "button" as const,
|
type: "button" as const,
|
||||||
onSelect(e: Event) {
|
onSelect(e: Event) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
logout();
|
localLogout();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -125,7 +126,7 @@ const desktopLeftMenu = ref([
|
||||||
type: "button" as const,
|
type: "button" as const,
|
||||||
onSelect(e: Event) {
|
onSelect(e: Event) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
logout();
|
localLogout();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -134,7 +135,7 @@ const desktopLeftMenu = ref([
|
||||||
|
|
||||||
const isMobile = ref(false);
|
const isMobile = ref(false);
|
||||||
const rerenderNavigation = ref(1);
|
const rerenderNavigation = ref(1);
|
||||||
const { isAuthenticatedGetter, isRealUserGetter } = useAuthStore();
|
const { isAuthenticatedGetter,logout } = useAuthStore();
|
||||||
|
|
||||||
const filterLeftItem = () => {
|
const filterLeftItem = () => {
|
||||||
if (isAuthenticatedGetter) {
|
if (isAuthenticatedGetter) {
|
||||||
|
@ -182,9 +183,24 @@ const setMenu = () => {
|
||||||
|
|
||||||
setMenu();
|
setMenu();
|
||||||
|
|
||||||
|
const localLogout = () => {
|
||||||
|
logout();
|
||||||
|
|
||||||
|
router.push({
|
||||||
|
name: "hadithaLogin",
|
||||||
|
});
|
||||||
|
};
|
||||||
// if(!(isAuthenticatedGetter && isRealUserGetter))
|
// if(!(isAuthenticatedGetter && isRealUserGetter))
|
||||||
// items.value = items.value.filter((item) => item.to != "/haditha/favorites");
|
// items.value = items.value.filter((item) => item.to != "/haditha/favorites");
|
||||||
|
|
||||||
|
// watch(
|
||||||
|
// () => isAuthenticatedGetter,
|
||||||
|
// (newVal) => {
|
||||||
|
// setMenu();
|
||||||
|
// },
|
||||||
|
// { immediate: true }
|
||||||
|
// );
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (window?.outerWidth < 991) {
|
if (window?.outerWidth < 991) {
|
||||||
isMobile.value = true;
|
isMobile.value = true;
|
||||||
|
@ -195,7 +211,9 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="fixed bottom-2 main-navbar lg:bottom-auto lg:top-2 right-0 left-0 pt-2">
|
<div
|
||||||
|
class="fixed bottom-2 main-navbar lg:bottom-auto lg:top-2 right-0 left-0 pt-2"
|
||||||
|
>
|
||||||
<UContainer class="flex my-navbar mx-3 lg:mx-auto">
|
<UContainer class="flex my-navbar mx-3 lg:mx-auto">
|
||||||
<!-- :disableHoverTrigge="isMobile" -->
|
<!-- :disableHoverTrigge="isMobile" -->
|
||||||
<UNavigationMenu
|
<UNavigationMenu
|
||||||
|
|
|
@ -42,7 +42,8 @@ const AutoComplation = defineAsyncComponent(() =>
|
||||||
<navigation-menu></navigation-menu>
|
<navigation-menu></navigation-menu>
|
||||||
|
|
||||||
<div class="logo-container flex justify-center flex-col items-center">
|
<div class="logo-container flex justify-center flex-col items-center">
|
||||||
<img fit="auto" quality="80" placeholder src="/img/haditha/logo.png" />
|
<!-- <img fit="auto" quality="80" placeholder src="/img/haditha/logo.png" /> -->
|
||||||
|
<NuxtImg src="/img/haditha/logo.png" />
|
||||||
<div class="title">
|
<div class="title">
|
||||||
کاوش با
|
کاوش با
|
||||||
<span class="badge-style me-1"> هوش مصنوعی </span>
|
<span class="badge-style me-1"> هوش مصنوعی </span>
|
||||||
|
|
|
@ -95,8 +95,8 @@ const loadMore = async () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// const { isFetching } = useInfiniteScroll(loadMore, "favoriteInfiniteScroll");
|
// const { isFetching } = useCustomInfiniteScroll(loadMore, "favoriteInfiniteScroll");
|
||||||
const { isFetching } = useInfiniteScroll(async () => {
|
const { isFetching } = useCustomInfiniteScroll(async () => {
|
||||||
await loadMore();
|
await loadMore();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ const loadMore = async () => {
|
||||||
};
|
};
|
||||||
// const { isFetching } = useInfiniteScroll(loadMore, "libraryInfiniteScroll");
|
// const { isFetching } = useInfiniteScroll(loadMore, "libraryInfiniteScroll");
|
||||||
|
|
||||||
const { isFetching } = useInfiniteScroll(async () => {
|
const { isFetching } = useCustomInfiniteScroll(async () => {
|
||||||
await loadMore();
|
await loadMore();
|
||||||
});
|
});
|
||||||
// #endregion methods
|
// #endregion methods
|
||||||
|
|
|
@ -27,7 +27,7 @@ const NavigationMenu = defineAsyncComponent(() =>
|
||||||
<HadithaLayout>
|
<HadithaLayout>
|
||||||
<div class="page-container h-full">
|
<div class="page-container h-full">
|
||||||
<!-- max-w-[var(--ui-container-two)] -->
|
<!-- max-w-[var(--ui-container-two)] -->
|
||||||
<UContainer class="page-inner-container sm:px-6 lg:px-4">
|
<UContainer class="page-inner-container mx-auto max-w-[var(--ui-container-two)] sm:px-6 lg:px-4">
|
||||||
<navigation-menu></navigation-menu>
|
<navigation-menu></navigation-menu>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -27,7 +27,7 @@ const NavigationMenu = defineAsyncComponent(() =>
|
||||||
<HadithaLayout>
|
<HadithaLayout>
|
||||||
<div class="page-container h-full">
|
<div class="page-container h-full">
|
||||||
<!-- max-w-[var(--ui-container-two)] -->
|
<!-- max-w-[var(--ui-container-two)] -->
|
||||||
<UContainer class="page-inner-container sm:px-6 lg:px-4">
|
<UContainer class="page-inner-container mx-auto max-w-[var(--ui-container-two)] sm:px-6 lg:px-4">
|
||||||
<span class="top-left-bgi z-0"></span>
|
<span class="top-left-bgi z-0"></span>
|
||||||
|
|
||||||
<navigation-menu></navigation-menu>
|
<navigation-menu></navigation-menu>
|
||||||
|
|
|
@ -129,7 +129,8 @@ onMounted(() => {
|
||||||
<HadithaLayout>
|
<HadithaLayout>
|
||||||
<div class="page-container h-full">
|
<div class="page-container h-full">
|
||||||
<!-- max-w-[var(--ui-container-two)] -->
|
<!-- max-w-[var(--ui-container-two)] -->
|
||||||
<UContainer class="page-inner-container sm:px-6 lg:px-4">
|
<UContainer
|
||||||
|
class="page-inner-container mx-auto max-w-[var(--ui-container-two)] sm:px-6 lg:px-4">
|
||||||
<navigation-menu></navigation-menu>
|
<navigation-menu></navigation-menu>
|
||||||
|
|
||||||
<div class="page-header pt-38 pb-4 flex justify-between items-center">
|
<div class="page-header pt-38 pb-4 flex justify-between items-center">
|
||||||
|
|
|
@ -27,7 +27,7 @@ const NavigationMenu = defineAsyncComponent(() =>
|
||||||
<HadithaLayout>
|
<HadithaLayout>
|
||||||
<div class="page-container h-full">
|
<div class="page-container h-full">
|
||||||
<!-- max-w-[var(--ui-container-two)] -->
|
<!-- max-w-[var(--ui-container-two)] -->
|
||||||
<UContainer class="page-inner-container sm:px-6 lg:px-4">
|
<UContainer class="page-inner-container mx-auto max-w-[var(--ui-container-two)] sm:px-6 lg:px-4">
|
||||||
<navigation-menu></navigation-menu>
|
<navigation-menu></navigation-menu>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -523,7 +523,7 @@ const loadMore = async () => {
|
||||||
// } else status.value = "idle";
|
// } else status.value = "idle";
|
||||||
};
|
};
|
||||||
// For window scrolling
|
// For window scrolling
|
||||||
const { isFetching } = useInfiniteScroll(async () => {
|
const { isFetching } = useCustomInfiniteScroll(async () => {
|
||||||
await loadMore();
|
await loadMore();
|
||||||
});
|
});
|
||||||
// For a specific element
|
// For a specific element
|
||||||
|
|
Loading…
Reference in New Issue
Block a user