bug fix in slogan and application name
This commit is contained in:
parent
b5c87da37e
commit
769d0b2ade
|
@ -25,7 +25,7 @@ class UiGeneralController extends AbstractController
|
|||
#[Route('/system/getslogon', name: 'general_get_slogon')]
|
||||
public function general_get_slogon(registryMGR $registryManager): JsonResponse
|
||||
{
|
||||
$name = $registryManager->get('system', 'appSlogon');
|
||||
$name = $registryManager->get('system', 'appSlogan');
|
||||
return $this->json($name);
|
||||
}
|
||||
#[Route('/system/geturl', name: 'general_get_url')]
|
||||
|
|
|
@ -74,7 +74,7 @@ export async function getSiteName() {
|
|||
);
|
||||
}
|
||||
|
||||
export async function getSiteSlogon() {
|
||||
export async function getSiteSlogan() {
|
||||
return fetchAndCache(
|
||||
`${getApiUrl()}/system/getslogon`,
|
||||
KEYS.SITE_SLOGON,
|
||||
|
|
|
@ -432,7 +432,6 @@ const fa_lang = {
|
|||
close_dialog: "بستن",
|
||||
},
|
||||
app: {
|
||||
name: "حسابیکس",
|
||||
loading: "در حال بارگذاری...",
|
||||
please_wait: "لطفا صبر کنید ...",
|
||||
logout: "خروج",
|
||||
|
@ -511,10 +510,6 @@ const fa_lang = {
|
|||
file_size_limit: 'حجم فایل انتخابی بیش از حد مجاز است.',
|
||||
"form_invalid": "لطفاً فرم را به درستی پر کنید"
|
||||
},
|
||||
hesabix: {
|
||||
banner: "حسابیکس سامانه جامع مدیریت کسبوکار",
|
||||
name: "حسابیکس"
|
||||
},
|
||||
title: {
|
||||
user: {
|
||||
"dashboard": "پیشخوان کاربر",
|
||||
|
|
|
@ -19,7 +19,7 @@ export default {
|
|||
timeNow: '',
|
||||
apiUrl: '',
|
||||
siteName: '',
|
||||
siteSlogon: '',
|
||||
siteSlogan: '',
|
||||
permissions: {},
|
||||
showShortcutsDialog: false,
|
||||
isEditingShortcuts: false,
|
||||
|
@ -67,7 +67,7 @@ export default {
|
|||
},
|
||||
async created() {
|
||||
this.siteName = await getSiteName();
|
||||
this.siteSlogon = await getSiteSlogon();
|
||||
this.siteSlogan = await getSiteSlogan();
|
||||
},
|
||||
beforeUnmount() {
|
||||
window.removeEventListener('keydown', this.handleKeyDown);
|
||||
|
@ -288,7 +288,7 @@ export default {
|
|||
<template>
|
||||
<v-system-bar color="primaryLight2">
|
||||
<v-avatar image="/img/logo-blue.png" size="20" class="me-2 d-none d-sm-flex" />
|
||||
<span class="d-none d-sm-flex">{{ siteSlogon }}</span>
|
||||
<span class="d-none d-sm-flex">{{ siteSlogan }}</span>
|
||||
<v-avatar :image="apiUrl + '/front/avatar/file/get/' + business.id" size="20" class="me-2 d-flex d-sm-none" />
|
||||
<span class="d-flex d-sm-none">{{ business.name }}</span>
|
||||
<v-spacer />
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
class="mt-2 mb-2"
|
||||
alt=""
|
||||
/>
|
||||
<h4 class="text-primary pr-2 pt-4">{{ $t("app.name") }}</h4>
|
||||
<h4 class="text-primary pr-2 pt-4">{{ siteName }}</h4>
|
||||
</v-col>
|
||||
<v-col md="4" class="pl-5">
|
||||
<v-btn
|
||||
|
@ -49,7 +49,6 @@
|
|||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-btn
|
||||
block
|
||||
|
@ -67,45 +66,58 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import axios from "axios";
|
||||
import { getSiteName } from "@/hesabixConfig";
|
||||
import { onMounted, ref } from "vue";
|
||||
|
||||
const installPromptEvent = ref<Event | null>(null);
|
||||
const browserName = ref<string>("");
|
||||
const chromeBanner = ref<boolean>(false);
|
||||
const iosChecker = ref<boolean>(false);
|
||||
const siteName = ref<string>(""); // siteName به صورت ref
|
||||
|
||||
// Call button method for install banner
|
||||
// تابع برای گرفتن siteName
|
||||
const fetchSiteName = () => {
|
||||
getSiteName()
|
||||
.then((name) => {
|
||||
siteName.value = name; // مقدار رو توی ref میذاریم
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("خطا در گرفتن نام سایت:", error);
|
||||
siteName.value = "نام پیشفرض"; // مقدار پیشفرض در صورت خطا
|
||||
});
|
||||
};
|
||||
|
||||
// تابع نصب
|
||||
const callInstallbtn = () => {
|
||||
if (installPromptEvent.value) {
|
||||
// Cast as BeforeInstallPromptEvent if needed
|
||||
const event = installPromptEvent.value as BeforeInstallPromptEvent;
|
||||
event.prompt();
|
||||
|
||||
|
||||
event.userChoice.then((choiceResult: { outcome: string }) => {
|
||||
if (choiceResult.outcome === "accepted") {
|
||||
console.log("کاربر نصب رو قبول کرد");
|
||||
} else {
|
||||
console.log("کاربر نصب رو رد کرد");
|
||||
}
|
||||
|
||||
installPromptEvent.value = null;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const getBrowserName = (): any => {
|
||||
// تابع تشخیص مرورگر
|
||||
const getBrowserName = (): string => {
|
||||
const userAgent = navigator.userAgent;
|
||||
|
||||
if (userAgent.includes("Chrome") && !userAgent.includes("Edg")) {
|
||||
if (userAgent.includes("Mac OS X")) {
|
||||
iosChecker.value = true
|
||||
iosChecker.value = true;
|
||||
} else {
|
||||
chromeBanner.value = true;
|
||||
}
|
||||
return "Google Chrome";
|
||||
} else if (userAgent.includes("Firefox")) {
|
||||
if (userAgent.includes("Mac OS X")) {
|
||||
iosChecker.value = true
|
||||
iosChecker.value = true;
|
||||
}
|
||||
return "Mozilla Firefox";
|
||||
} else if (userAgent.includes("Safari") && !userAgent.includes("Chrome")) {
|
||||
|
@ -114,21 +126,21 @@ const getBrowserName = (): any => {
|
|||
return "Apple Safari";
|
||||
} else if (userAgent.includes("SamsungBrowser")) {
|
||||
if (userAgent.includes("Mac OS X")) {
|
||||
iosChecker.value = true
|
||||
iosChecker.value = true;
|
||||
} else {
|
||||
chromeBanner.value = true;
|
||||
}
|
||||
return "Samsung Browser";
|
||||
} else if (userAgent.includes("Edg")) {
|
||||
if (userAgent.includes("Mac OS X")) {
|
||||
iosChecker.value = true
|
||||
iosChecker.value = true;
|
||||
} else {
|
||||
chromeBanner.value = true;
|
||||
}
|
||||
return "Microsoft Edge";
|
||||
} else if (userAgent.includes("Opera") || userAgent.includes("OPR")) {
|
||||
if (userAgent.includes("Mac OS X")) {
|
||||
iosChecker.value = true
|
||||
iosChecker.value = true;
|
||||
} else {
|
||||
chromeBanner.value = true;
|
||||
}
|
||||
|
@ -138,18 +150,14 @@ const getBrowserName = (): any => {
|
|||
}
|
||||
};
|
||||
|
||||
// هنگام بارگذاری کامپوننت
|
||||
onMounted(() => {
|
||||
browserName.value = getBrowserName();
|
||||
fetchSiteName(); // فراخوانی تابع بدون await
|
||||
|
||||
window.addEventListener("beforeinstallprompt", (e: Event) => {
|
||||
e.preventDefault();
|
||||
installPromptEvent.value = e;
|
||||
});
|
||||
|
||||
// setTimeout(() => {
|
||||
// if (installPromptEvent.value) {
|
||||
// installBanner.value = true;
|
||||
// }
|
||||
// }, 1000);
|
||||
});
|
||||
</script>
|
|
@ -2,6 +2,7 @@
|
|||
import { defineComponent, ref } from 'vue'
|
||||
import Swal from 'sweetalert2';
|
||||
import axios from "axios";
|
||||
import { getSiteName } from '@/hesabixConfig';
|
||||
export default defineComponent({
|
||||
name: "active_account",
|
||||
data() {
|
||||
|
@ -16,6 +17,7 @@ export default defineComponent({
|
|||
mobile: '',
|
||||
email: '',
|
||||
},
|
||||
siteName: '',
|
||||
response: {
|
||||
code: '',
|
||||
message: '',
|
||||
|
@ -36,6 +38,9 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.siteName = await getSiteName();
|
||||
},
|
||||
methods: {
|
||||
onResendCodeClick() {
|
||||
axios.post('/api/user/register/resend-active-code', { 'mobile': this.$route.params.id }).then((response: any) => {
|
||||
|
@ -83,7 +88,7 @@ export default defineComponent({
|
|||
<v-container>
|
||||
<v-row class="d-flex justify-center">
|
||||
<v-col md="5">
|
||||
<v-card :loading="loading ? 'blue' : null" :disabled="loading" :title="$t('app.name')"
|
||||
<v-card :loading="loading ? 'blue' : null" :disabled="loading" :title="siteName"
|
||||
:subtitle="$t('user.active_account')">
|
||||
<v-card-text>
|
||||
کد ارسالی از طریق پیامک و یا پست الکترونیکی دریافتی خود را در کادر زیر وارد نمایید.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<v-container>
|
||||
<v-row class="d-flex justify-center">
|
||||
<v-col md="5">
|
||||
<v-card :loading="loading ? 'blue' : undefined" :disabled="loading" :title="$t('app.name')"
|
||||
<v-card :loading="loading ? 'blue' : undefined" :disabled="loading" :title="siteName"
|
||||
:subtitle="$t('user.login_label')">
|
||||
<v-card-text class="text-justify">
|
||||
{{ $t("login.des") }}
|
||||
|
@ -62,6 +62,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { getSiteName } from "@/hesabixConfig";
|
||||
import axios from "axios";
|
||||
import Swal from "sweetalert2";
|
||||
import { onMounted, ref } from "vue";
|
||||
|
@ -76,6 +77,7 @@ export default {
|
|||
loading: false,
|
||||
captchaLoading: false,
|
||||
dialog: false,
|
||||
siteName:'',
|
||||
showCaptcha: false,
|
||||
errorMsg: self.$t('login.input_fail'),
|
||||
captchaImage: '',
|
||||
|
@ -188,6 +190,9 @@ export default {
|
|||
mounted() {
|
||||
// کپچا در ابتدا نمایش داده نمیشه
|
||||
},
|
||||
async created(){
|
||||
this.siteName = await getSiteName();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { defineComponent, ref } from 'vue'
|
||||
import axios from "axios";
|
||||
import VueCountdown from '@chenfengyuan/vue-countdown';
|
||||
import { getSiteName } from '@/hesabixConfig';
|
||||
|
||||
export default defineComponent({
|
||||
name: "reset-password",
|
||||
|
@ -16,6 +17,7 @@ export default defineComponent({
|
|||
loading: false,
|
||||
counting: true,
|
||||
disableSend: ref(true),
|
||||
siteName:'',
|
||||
code: '',
|
||||
response: {
|
||||
code: '',
|
||||
|
@ -35,6 +37,9 @@ export default defineComponent({
|
|||
}
|
||||
}
|
||||
},
|
||||
async created(){
|
||||
this.siteName = await getSiteName();
|
||||
},
|
||||
watch: {
|
||||
code(cval, bval) {
|
||||
if (Object.keys(cval).length == 6) {
|
||||
|
@ -81,7 +86,7 @@ export default defineComponent({
|
|||
<v-container>
|
||||
<v-row class="d-flex justify-center">
|
||||
<v-col md="5">
|
||||
<v-card :loading="loading ? 'blue' : null" :title="$t('app.name')" :subtitle="$t('user.forget_password')">
|
||||
<v-card :loading="loading ? 'blue' : null" :title="siteName" :subtitle="$t('user.forget_password')">
|
||||
<v-card-text>
|
||||
<v-form ref="form" :disabled="loading" fast-fail @submit.prevent="submit()">
|
||||
<v-otp-input focus-all v-model="code" :disabled="loading" style="direction: ltr"></v-otp-input>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<v-container>
|
||||
<v-row class="d-flex justify-center">
|
||||
<v-col md="5">
|
||||
<v-card :loading="loading ? 'blue' : undefined" :title="$t('app.name')" :subtitle="$t('user.forget_password')">
|
||||
<v-card :loading="loading ? 'blue' : undefined" :title="siteName" :subtitle="$t('user.forget_password')">
|
||||
<v-card-text>
|
||||
<v-form ref="form" :disabled="loading" fast-fail @submit.prevent="submit()">
|
||||
<v-text-field v-model="mobile" class="mb-2" :label="$t('user.mobile')"
|
||||
|
@ -50,6 +50,7 @@
|
|||
import { defineComponent } from 'vue';
|
||||
import axios from "axios";
|
||||
import { ref } from 'vue';
|
||||
import { getSiteName } from '@/hesabixConfig';
|
||||
|
||||
axios.defaults.withCredentials = true;
|
||||
|
||||
|
@ -63,6 +64,7 @@ export default defineComponent({
|
|||
dialog: ref(false),
|
||||
mobile: '',
|
||||
captcha: '',
|
||||
siteName:'',
|
||||
captchaImage: '',
|
||||
rules: {
|
||||
mobile: [
|
||||
|
@ -82,6 +84,9 @@ export default defineComponent({
|
|||
}
|
||||
};
|
||||
},
|
||||
async created(){
|
||||
this.siteName = await getSiteName();
|
||||
},
|
||||
mounted() {
|
||||
this.loadCaptcha(); // لود اولیه کپچا
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<v-system-bar color="primaryLight2">
|
||||
<v-avatar :image="getbase() + 'img/logo-blue.png'" size="20" class="me-2" />
|
||||
<span>{{ siteSlogon }}</span>
|
||||
<span>{{ siteSlogan }}</span>
|
||||
<v-spacer />
|
||||
</v-system-bar>
|
||||
<v-navigation-drawer v-model="drawer">
|
||||
|
@ -37,7 +37,7 @@
|
|||
</v-list-group>
|
||||
<v-list-item color="primary">
|
||||
<v-list-item-title>
|
||||
<small class="text-primary">{{ $t('app.name') }} : {{ hesabix.version }}</small>
|
||||
<small class="text-primary">{{ siteName }} : {{ hesabix.version }}</small>
|
||||
</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import axios from "axios";
|
||||
import { getSiteName, getApiUrl, getBasePath, getSiteSlogon } from "@/hesabixConfig"
|
||||
import { getSiteName, getApiUrl, getBasePath, getSiteSlogan } from "@/hesabixConfig"
|
||||
import { applicationStore } from "@/stores/applicationStore";
|
||||
import { useUserStore } from "@/stores/userStore";
|
||||
import { ref, defineComponent } from "vue";
|
||||
|
@ -82,7 +82,7 @@ export default defineComponent({
|
|||
},
|
||||
siteName: '',
|
||||
siteUrl: '',
|
||||
siteSlogon:'',
|
||||
siteSlogan:'',
|
||||
ROLE_ADMIN: false,
|
||||
user: {
|
||||
mobile: '1'
|
||||
|
@ -125,7 +125,7 @@ export default defineComponent({
|
|||
components: { Change_lang },
|
||||
async created() {
|
||||
this.siteName = await getSiteName();
|
||||
this.siteSlogon = await getSiteSlogon();
|
||||
this.siteSlogan = await getSiteSlogan();
|
||||
this.siteUrl = getApiUrl();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<v-container>
|
||||
<v-row class="d-flex justify-center">
|
||||
<v-col md="5">
|
||||
<v-card :loading="loading ? 'blue' : undefined" :title="$t('app.name')" :subtitle="$t('user.register_label')"
|
||||
<v-card :loading="loading ? 'blue' : undefined" :title="siteName" :subtitle="$t('user.register_label')"
|
||||
:disabled="!canRegister">
|
||||
<v-card-text>
|
||||
<v-form ref="form" :disabled="loading" fast-fail @submit.prevent="submit()">
|
||||
|
@ -65,6 +65,7 @@
|
|||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import axios from "axios";
|
||||
import { getSiteName } from '@/hesabixConfig';
|
||||
|
||||
axios.defaults.withCredentials = true;
|
||||
|
||||
|
@ -76,6 +77,7 @@ export default defineComponent({
|
|||
loading: false,
|
||||
captchaLoading: false,
|
||||
dialog: false,
|
||||
siteName: '',
|
||||
dialogColor: 'dangerLight',
|
||||
dialogIcon: 'mdi-close-octagon',
|
||||
dialogTitle: '',
|
||||
|
@ -104,6 +106,9 @@ export default defineComponent({
|
|||
this.checkRegisterStatus();
|
||||
this.loadData();
|
||||
},
|
||||
async created(){
|
||||
this.siteName = await getSiteName();
|
||||
},
|
||||
methods: {
|
||||
validate(input: string, type: string) {
|
||||
if (type === 'fill') {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<script lang="ts">
|
||||
import Change_lang from "@/components/application/buttons/change_lang.vue";
|
||||
import { getBasePath } from "@/hesabixConfig";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
|
@ -10,6 +11,11 @@ export default {
|
|||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getbase() {
|
||||
return getBasePath();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
axios.post('/api/user/check/login').then((response) => {
|
||||
if (response.data.Success == true) {
|
||||
|
@ -23,7 +29,7 @@ export default {
|
|||
<template>
|
||||
<v-app id="">
|
||||
<v-app-bar class="px-2" color="indigo-darken-2" flat>
|
||||
<v-avatar size="32" image="./img/favw.png"></v-avatar>
|
||||
<v-avatar size="32" :image="getbase() + 'img/favw.png'"></v-avatar>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
|
|
Loading…
Reference in a new issue