Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -11,9 +11,41 @@
|
||||
<q-avatar class="bg-secondary q-mr-sm">
|
||||
<img src="/images/Baggi-tekstilas-logolu.jpg" />
|
||||
</q-avatar>
|
||||
Baggi Software System
|
||||
{{ t('app.title') }}
|
||||
</q-toolbar-title>
|
||||
|
||||
<q-select
|
||||
v-model="selectedLocale"
|
||||
dense
|
||||
outlined
|
||||
emit-value
|
||||
map-options
|
||||
options-dense
|
||||
class="q-mr-sm lang-select"
|
||||
option-value="value"
|
||||
option-label="label"
|
||||
:options="languageOptions"
|
||||
>
|
||||
<template #selected-item="scope">
|
||||
<div class="lang-item">
|
||||
<span class="lang-flag">{{ scope.opt.flag }}</span>
|
||||
<span class="lang-short">{{ scope.opt.short }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section>
|
||||
<div class="lang-item">
|
||||
<span class="lang-flag">{{ scope.opt.flag }}</span>
|
||||
<span class="lang-short">{{ scope.opt.short }}</span>
|
||||
<span>{{ scope.opt.label }}</span>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-select>
|
||||
|
||||
<q-btn flat dense round icon="logout" @click="confirmLogout" />
|
||||
|
||||
</q-toolbar>
|
||||
@@ -99,7 +131,7 @@
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section>
|
||||
Şifre Değiştir
|
||||
{{ t('app.changePassword') }}
|
||||
</q-item-section>
|
||||
|
||||
</q-item>
|
||||
@@ -122,7 +154,7 @@
|
||||
<q-toolbar class="bg-secondary">
|
||||
|
||||
<q-toolbar-title>
|
||||
Baggi Software System
|
||||
{{ t('app.title') }}
|
||||
</q-toolbar-title>
|
||||
|
||||
</q-toolbar>
|
||||
@@ -138,6 +170,9 @@ import { Dialog, useQuasar } from 'quasar'
|
||||
|
||||
import { useAuthStore } from 'stores/authStore'
|
||||
import { usePermissionStore } from 'stores/permissionStore'
|
||||
import { useI18n } from 'src/composables/useI18n'
|
||||
import { UI_LANGUAGE_OPTIONS } from 'src/i18n/languages'
|
||||
import { useLocaleStore } from 'src/stores/localeStore'
|
||||
|
||||
|
||||
/* ================= STORES ================= */
|
||||
@@ -147,6 +182,16 @@ const route = useRoute()
|
||||
const $q = useQuasar()
|
||||
const auth = useAuthStore()
|
||||
const perm = usePermissionStore()
|
||||
const localeStore = useLocaleStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const languageOptions = UI_LANGUAGE_OPTIONS
|
||||
const selectedLocale = computed({
|
||||
get: () => localeStore.locale,
|
||||
set: (value) => {
|
||||
localeStore.setLocale(value)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
/* ================= UI ================= */
|
||||
@@ -159,8 +204,8 @@ function toggleLeftDrawer () {
|
||||
|
||||
function confirmLogout () {
|
||||
Dialog.create({
|
||||
title: 'Çıkış Yap',
|
||||
message: 'Oturumunuzu kapatmak istediğinize emin misiniz?',
|
||||
title: t('app.logoutTitle'),
|
||||
message: t('app.logoutConfirm'),
|
||||
cancel: true,
|
||||
persistent: true
|
||||
}).onOk(() => {
|
||||
@@ -330,6 +375,18 @@ const menuItems = [
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Dil Çeviri',
|
||||
icon: 'translate',
|
||||
|
||||
children: [
|
||||
{
|
||||
label: 'Çeviri Tablosu',
|
||||
to: '/app/language/translations',
|
||||
permission: 'language:update'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
label: 'Kullanıcı Yönetimi',
|
||||
@@ -387,5 +444,27 @@ const filteredMenu = computed(() => {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
.lang-select {
|
||||
width: 140px;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.lang-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.lang-flag {
|
||||
font-size: 15px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.lang-short {
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user