diff --git a/.env b/.env index e7c2b7f..15a7229 100644 --- a/.env +++ b/.env @@ -1,3 +1,6 @@ +NUXT_PUBLIC_API_NAME=api/ +NUXT_PUBLIC_BASE_URL=/ + # For more information refere to documents: https://cli.vuejs.org/guide/mode-and-env.html#example-staging-mode VITE_GOOGLECLIENTID="1044522269248-903n0gpd6kv9slmmr7cp2o8u04ru78qv.apps.googleusercontent.com" diff --git a/.env.haditha b/.env.haditha index 87f6d00..0cd8d87 100644 --- a/.env.haditha +++ b/.env.haditha @@ -1,5 +1,4 @@ -NUXT_PUBLIC_API_NAME=api/ -NUXT_PUBLIC_BASE_URL=http://192.168.23.60/ +NUXT_PUBLIC_BASE_URL=http://192.168.23.161/ VITE_APP_NAME=Hadith diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..3227324 --- /dev/null +++ b/dockerfile @@ -0,0 +1,14 @@ +FROM node:22 + +WORKDIR /app + + +COPY package*.json ./ +RUN npm install + +COPY . . +RUN npm run build-haditha + +EXPOSE 3000 + +CMD ["node", ".output/server/index.mjs"] \ No newline at end of file diff --git a/nuxt.config.ts b/nuxt.config.ts index 547dcd7..4173a0b 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -51,7 +51,7 @@ export default defineNuxtConfig({ nitro: { compressPublicAssets: true, prerender: { - routes: ["/haditha/about-us", "/haditha/contact"], // Pre-render these routes + routes: ["/haditha/about-us", "/haditha/contact-us"], // Pre-render these routes }, }, diff --git a/plugins/api.ts b/plugins/api.ts index 6c62317..fe822a1 100644 --- a/plugins/api.ts +++ b/plugins/api.ts @@ -6,14 +6,16 @@ import { useStorage } from "@vueuse/core"; // lsToken = "GuestAccess"; export default defineNuxtPlugin((nuxtApp) => { + const config = useRuntimeConfig(); + // const { session } = useUserSession(); // const authStore = useAuthStore(); let token = useStorage("id_token", "GuestAccess").value; const api = $fetch.create({ onRequest({ request, options, error }) { options.baseURL = - import.meta.env.VITE_BASE_URL + - import.meta.env.NUXT_PUBLIC_API_NAME+ + config.public.NUXT_PUBLIC_BASE_URL + + config.public.NUXT_PUBLIC_API_NAME + options.baseURL; if (token) { diff --git a/public/img/haditha/background-1.webp b/public/img/haditha/background-1.webp new file mode 100644 index 0000000..9cd5100 Binary files /dev/null and b/public/img/haditha/background-1.webp differ diff --git a/public/img/haditha/background.png b/public/img/haditha/background.png deleted file mode 100644 index 7ec7756..0000000 Binary files a/public/img/haditha/background.png and /dev/null differ diff --git a/public/img/haditha/background.svg b/public/img/haditha/background.svg deleted file mode 100644 index 82fef6b..0000000 --- a/public/img/haditha/background.svg +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/img/haditha/background.webp b/public/img/haditha/background.webp new file mode 100644 index 0000000..f08545d Binary files /dev/null and b/public/img/haditha/background.webp differ diff --git a/public/img/haditha/box-1-bgi.svg b/public/img/haditha/box-1-bgi.svg deleted file mode 100644 index 12f51e8..0000000 --- a/public/img/haditha/box-1-bgi.svg +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/public/img/haditha/card-one-bgi.webp b/public/img/haditha/card-one-bgi.webp new file mode 100644 index 0000000..bb918b3 Binary files /dev/null and b/public/img/haditha/card-one-bgi.webp differ diff --git a/public/img/haditha/card-one.webp b/public/img/haditha/card-one.webp new file mode 100644 index 0000000..6706581 Binary files /dev/null and b/public/img/haditha/card-one.webp differ diff --git a/public/img/haditha/card-three-bgi.webp b/public/img/haditha/card-three-bgi.webp new file mode 100644 index 0000000..aba5d6b Binary files /dev/null and b/public/img/haditha/card-three-bgi.webp differ diff --git a/public/img/haditha/card-three.webp b/public/img/haditha/card-three.webp new file mode 100644 index 0000000..7d5e991 Binary files /dev/null and b/public/img/haditha/card-three.webp differ diff --git a/public/img/haditha/card-two-bgi.webp b/public/img/haditha/card-two-bgi.webp new file mode 100644 index 0000000..4b64a18 Binary files /dev/null and b/public/img/haditha/card-two-bgi.webp differ diff --git a/public/img/haditha/card-two.webp b/public/img/haditha/card-two.webp new file mode 100644 index 0000000..523072d Binary files /dev/null and b/public/img/haditha/card-two.webp differ diff --git a/public/img/haditha/location.webp b/public/img/haditha/location.webp new file mode 100644 index 0000000..3fa6374 Binary files /dev/null and b/public/img/haditha/location.webp differ diff --git a/public/img/haditha/logo.svg b/public/img/haditha/logo.svg deleted file mode 100644 index 5cad894..0000000 --- a/public/img/haditha/logo.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/public/img/haditha/logo.webp b/public/img/haditha/logo.webp new file mode 100644 index 0000000..62c2a06 Binary files /dev/null and b/public/img/haditha/logo.webp differ diff --git a/public/img/haditha/modal-bottom-left-bgi.webp b/public/img/haditha/modal-bottom-left-bgi.webp new file mode 100644 index 0000000..525fa39 Binary files /dev/null and b/public/img/haditha/modal-bottom-left-bgi.webp differ diff --git a/public/img/haditha/modal-bttom-right-bgi.webp b/public/img/haditha/modal-bttom-right-bgi.webp new file mode 100644 index 0000000..81ded2e Binary files /dev/null and b/public/img/haditha/modal-bttom-right-bgi.webp differ diff --git a/public/img/haditha/modal-top-bgi.webp b/public/img/haditha/modal-top-bgi.webp new file mode 100644 index 0000000..f0470f3 Binary files /dev/null and b/public/img/haditha/modal-top-bgi.webp differ diff --git a/public/img/haditha/section-three-bgi.png b/public/img/haditha/section-three-bgi.png deleted file mode 100644 index 4e45d9e..0000000 Binary files a/public/img/haditha/section-three-bgi.png and /dev/null differ diff --git a/public/img/haditha/section-three-bgi.svg b/public/img/haditha/section-three-bgi.svg deleted file mode 100644 index 4c6fd5c..0000000 --- a/public/img/haditha/section-three-bgi.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/public/img/haditha/section-three-bgi.webp b/public/img/haditha/section-three-bgi.webp new file mode 100644 index 0000000..a7ea6cd Binary files /dev/null and b/public/img/haditha/section-three-bgi.webp differ diff --git a/public/img/haditha/sub-header-bgi.webp b/public/img/haditha/sub-header-bgi.webp new file mode 100644 index 0000000..10f2b4f Binary files /dev/null and b/public/img/haditha/sub-header-bgi.webp differ diff --git a/routes/haditha.ts b/routes/haditha.ts index 4a6c740..69fda5e 100644 --- a/routes/haditha.ts +++ b/routes/haditha.ts @@ -43,7 +43,7 @@ export default [ { name: "hadithaContact", path: "/haditha/contact-us", - file: "~/systems/hadith_ui/pages/haditha/public-pages/ContactUs.vue", + file: "~/systems/hadith_ui/pages/haditha/public-pages/contactus.vue", }, { name: "hadithaRules", diff --git a/systems/chat_ui b/systems/chat_ui index be90244..74e556e 160000 --- a/systems/chat_ui +++ b/systems/chat_ui @@ -1 +1 @@ -Subproject commit be90244a87e87eb66759bd10fabf5e881998b055 +Subproject commit 74e556e300ec5cd6430c1ff286eb20e6e349ab47 diff --git a/systems/hadith_ui b/systems/hadith_ui index 29e3034..4745294 160000 --- a/systems/hadith_ui +++ b/systems/hadith_ui @@ -1 +1 @@ -Subproject commit 29e3034e3fa2e28142ae58934b9bad4dc2ce98f4 +Subproject commit 4745294ffc3af3b851dfcf43bca549986557a6f5 diff --git a/utils/globalMixin.ts b/utils/globalMixin.ts index 69cfc77..9b151af 100644 --- a/utils/globalMixin.ts +++ b/utils/globalMixin.ts @@ -169,6 +169,8 @@ export const copyToClipboard = async ( id = undefined, domainUrl = undefined ) => { + const toast = useToast(); + try { const _id = id ? "/" + id : ""; let url = location.href; @@ -177,27 +179,37 @@ export const copyToClipboard = async ( } await navigator.clipboard.writeText(url + _id); - mySwalToast({ - html: "نشانی پیوند کپی شد.", + toast.add({ + title: "انجام شد.", + description: "نشانی پیوند کپی شد.", + color: "success", }); } catch (err) { console.log(err.message); - mySwalToast({ - html: "خطایی رخ داد.لطفا دوباره امتحان کنید.", + toast.add({ + title: "انجام شد.", + description: "خطایی رخ داد.لطفا دوباره امتحان کنید.", + color: "error", }); } }; export const copyTextToClipboard = async (text) => { + const toast = useToast(); + try { await navigator.clipboard.writeText(text); - mySwalToast({ - html: "متن کپی شد.", + toast.add({ + title: "انجام شد.", + description: "متن کپی شد.", + color: "success", }); } catch (err) { console.log(err.message); - mySwalToast({ - html: "خطایی رخ داد.لطفا دوباره امتحان کنید.", + toast.add({ + title: "انجام شد.", + description: "خطایی رخ داد.لطفا دوباره امتحان کنید.", + color: "error", }); } }; @@ -275,7 +287,7 @@ export const userAvatar = (user = undefined) => { if (user?.avatar && user?.avatar?.length) { return ( import.meta.env.VITE_BASE_URL + - import.meta.env.NUXT_PUBLIC_API_NAME+ + import.meta.env.NUXT_PUBLIC_API_NAME + fileUrl() + user.avatar );