Compare commits
No commits in common. "aa40ac3ae60031dee97b0bccc3d4d703801c6820" and "b30ecc26c2302800ade5f862953859bd72e39cf1" have entirely different histories.
aa40ac3ae6
...
b30ecc26c2
3
.env
|
@ -1,6 +1,3 @@
|
||||||
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
|
# 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"
|
VITE_GOOGLECLIENTID="1044522269248-903n0gpd6kv9slmmr7cp2o8u04ru78qv.apps.googleusercontent.com"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
NUXT_PUBLIC_BASE_URL=http://192.168.23.161/
|
NUXT_PUBLIC_API_NAME=api/
|
||||||
|
NUXT_PUBLIC_BASE_URL=http://192.168.23.60/
|
||||||
|
|
||||||
VITE_APP_NAME=Hadith
|
VITE_APP_NAME=Hadith
|
||||||
|
|
||||||
|
|
14
dockerfile
|
@ -1,14 +0,0 @@
|
||||||
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"]
|
|
|
@ -51,7 +51,7 @@ export default defineNuxtConfig({
|
||||||
nitro: {
|
nitro: {
|
||||||
compressPublicAssets: true,
|
compressPublicAssets: true,
|
||||||
prerender: {
|
prerender: {
|
||||||
routes: ["/haditha/about-us", "/haditha/contact-us"], // Pre-render these routes
|
routes: ["/haditha/about-us", "/haditha/contact"], // Pre-render these routes
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -6,16 +6,14 @@ import { useStorage } from "@vueuse/core";
|
||||||
// lsToken = "GuestAccess";
|
// lsToken = "GuestAccess";
|
||||||
|
|
||||||
export default defineNuxtPlugin((nuxtApp) => {
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
const config = useRuntimeConfig();
|
|
||||||
|
|
||||||
// const { session } = useUserSession();
|
// const { session } = useUserSession();
|
||||||
// const authStore = useAuthStore();
|
// const authStore = useAuthStore();
|
||||||
let token = useStorage("id_token", "GuestAccess").value;
|
let token = useStorage("id_token", "GuestAccess").value;
|
||||||
const api = $fetch.create({
|
const api = $fetch.create({
|
||||||
onRequest({ request, options, error }) {
|
onRequest({ request, options, error }) {
|
||||||
options.baseURL =
|
options.baseURL =
|
||||||
config.public.NUXT_PUBLIC_BASE_URL +
|
import.meta.env.VITE_BASE_URL +
|
||||||
config.public.NUXT_PUBLIC_API_NAME +
|
import.meta.env.NUXT_PUBLIC_API_NAME+
|
||||||
options.baseURL;
|
options.baseURL;
|
||||||
|
|
||||||
if (token) {
|
if (token) {
|
||||||
|
|
Before Width: | Height: | Size: 129 KiB |
BIN
public/img/haditha/background.png
Normal file
After Width: | Height: | Size: 490 KiB |
46
public/img/haditha/background.svg
Normal file
After Width: | Height: | Size: 783 KiB |
Before Width: | Height: | Size: 142 KiB |
16
public/img/haditha/box-1-bgi.svg
Normal file
After Width: | Height: | Size: 263 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 37 KiB |
77
public/img/haditha/logo.svg
Normal file
After Width: | Height: | Size: 304 KiB |
Before Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 352 KiB |
Before Width: | Height: | Size: 175 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 39 KiB |
BIN
public/img/haditha/section-three-bgi.png
Normal file
After Width: | Height: | Size: 1.1 MiB |
11
public/img/haditha/section-three-bgi.svg
Normal file
After Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 24 KiB |
|
@ -43,7 +43,7 @@ export default [
|
||||||
{
|
{
|
||||||
name: "hadithaContact",
|
name: "hadithaContact",
|
||||||
path: "/haditha/contact-us",
|
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",
|
name: "hadithaRules",
|
||||||
|
|
|
@ -69,7 +69,7 @@ export const useAuthStore = defineStore("authStore", {
|
||||||
isGuest(state) {
|
isGuest(state) {
|
||||||
return !state.isRealUser;
|
return !state.isRealUser;
|
||||||
},
|
},
|
||||||
isAuthenticatedGetter(state) {
|
async isAuthenticatedGetter(state) {
|
||||||
let isAuthenticated = useStorage("id_token", "GuestAccess").value;
|
let isAuthenticated = useStorage("id_token", "GuestAccess").value;
|
||||||
// updating value sample
|
// updating value sample
|
||||||
// isAuthenticated.value = null
|
// isAuthenticated.value = null
|
||||||
|
@ -266,6 +266,8 @@ export const useAuthStore = defineStore("authStore", {
|
||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
async login(credentials) {
|
async login(credentials) {
|
||||||
|
console.info(import.meta.env.VITE_AUTH_BASE_URL)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { $api } = useNuxtApp();
|
const { $api } = useNuxtApp();
|
||||||
const response = await $api(apis.login, {
|
const response = await $api(apis.login, {
|
||||||
|
|
|
@ -1,32 +1,24 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
prefix: "tw-",
|
prefix: 'tw-',
|
||||||
content: [
|
|
||||||
"./components/**/*.{js,vue,ts}",
|
|
||||||
"./layouts/**/*.vue",
|
|
||||||
"./pages/**/*.vue",
|
|
||||||
"./plugins/**/*.{js,ts}",
|
|
||||||
"./nuxt.config.{js,ts}",
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
screens: {
|
|
||||||
sm: "360px",
|
|
||||||
md: "720px",
|
|
||||||
lg: "992px",
|
|
||||||
xl: "1200px",
|
|
||||||
"2xl": "1400px",
|
|
||||||
"3xl": "1900px",
|
|
||||||
},
|
|
||||||
extend: {},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
purge: {
|
|
||||||
enabled: process.env.NODE_ENV === "production",
|
|
||||||
content: [
|
content: [
|
||||||
"./components/**/*.{js,vue,ts}",
|
'./components/**/*.{js,vue,ts}',
|
||||||
"./layouts/**/*.vue",
|
'./layouts/**/*.vue',
|
||||||
"./pages/**/*.vue",
|
'./pages/**/*.vue',
|
||||||
"./plugins/**/*.{js,ts}",
|
'./plugins/**/*.{js,ts}',
|
||||||
"./nuxt.config.{js,ts}",
|
'./nuxt.config.{js,ts}',
|
||||||
],
|
],
|
||||||
},
|
theme: {
|
||||||
};
|
extend: {},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
purge: {
|
||||||
|
enabled: process.env.NODE_ENV === 'production',
|
||||||
|
content: [
|
||||||
|
'./components/**/*.{js,vue,ts}',
|
||||||
|
'./layouts/**/*.vue',
|
||||||
|
'./pages/**/*.vue',
|
||||||
|
'./plugins/**/*.{js,ts}',
|
||||||
|
'./nuxt.config.{js,ts}',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
|
@ -169,8 +169,6 @@ export const copyToClipboard = async (
|
||||||
id = undefined,
|
id = undefined,
|
||||||
domainUrl = undefined
|
domainUrl = undefined
|
||||||
) => {
|
) => {
|
||||||
const toast = useToast();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const _id = id ? "/" + id : "";
|
const _id = id ? "/" + id : "";
|
||||||
let url = location.href;
|
let url = location.href;
|
||||||
|
@ -179,37 +177,27 @@ export const copyToClipboard = async (
|
||||||
}
|
}
|
||||||
await navigator.clipboard.writeText(url + _id);
|
await navigator.clipboard.writeText(url + _id);
|
||||||
|
|
||||||
toast.add({
|
mySwalToast({
|
||||||
title: "انجام شد.",
|
html: "نشانی پیوند کپی شد.",
|
||||||
description: "نشانی پیوند کپی شد.",
|
|
||||||
color: "success",
|
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
toast.add({
|
mySwalToast({
|
||||||
title: "انجام شد.",
|
html: "خطایی رخ داد.لطفا دوباره امتحان کنید.",
|
||||||
description: "خطایی رخ داد.لطفا دوباره امتحان کنید.",
|
|
||||||
color: "error",
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export const copyTextToClipboard = async (text) => {
|
export const copyTextToClipboard = async (text) => {
|
||||||
const toast = useToast();
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(text);
|
await navigator.clipboard.writeText(text);
|
||||||
|
|
||||||
toast.add({
|
mySwalToast({
|
||||||
title: "انجام شد.",
|
html: "متن کپی شد.",
|
||||||
description: "متن کپی شد.",
|
|
||||||
color: "success",
|
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.message);
|
console.log(err.message);
|
||||||
toast.add({
|
mySwalToast({
|
||||||
title: "انجام شد.",
|
html: "خطایی رخ داد.لطفا دوباره امتحان کنید.",
|
||||||
description: "خطایی رخ داد.لطفا دوباره امتحان کنید.",
|
|
||||||
color: "error",
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -287,7 +275,7 @@ export const userAvatar = (user = undefined) => {
|
||||||
if (user?.avatar && user?.avatar?.length) {
|
if (user?.avatar && user?.avatar?.length) {
|
||||||
return (
|
return (
|
||||||
import.meta.env.VITE_BASE_URL +
|
import.meta.env.VITE_BASE_URL +
|
||||||
import.meta.env.NUXT_PUBLIC_API_NAME +
|
import.meta.env.NUXT_PUBLIC_API_NAME+
|
||||||
fileUrl() +
|
fileUrl() +
|
||||||
user.avatar
|
user.avatar
|
||||||
);
|
);
|
||||||
|
|