v3
This commit is contained in:
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -2,8 +2,7 @@
|
|||||||
"recommendations": [
|
"recommendations": [
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"vue.volar",
|
"vue.volar"
|
||||||
"wayou.vscode-todo-highlight"
|
|
||||||
],
|
],
|
||||||
"unwantedRecommendations": [
|
"unwantedRecommendations": [
|
||||||
"octref.vetur",
|
"octref.vetur",
|
||||||
|
|||||||
BIN
i18n-2.xlsm
BIN
i18n-2.xlsm
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="qty-card glossy text-white flex column items-center q-ma-xs"
|
class="qty-card glossy text-white flex column items-center"
|
||||||
:style="{ backgroundColor: bgColor }"
|
:style="{ backgroundColor: bgColor }"
|
||||||
>
|
>
|
||||||
<div class="qty-card-title q-pa-none text-caption col-grow">
|
<div class="qty-card-title q-pa-none text-caption col-grow">
|
||||||
|
|||||||
@@ -81,7 +81,6 @@
|
|||||||
const password = ref<string>('')
|
const password = ref<string>('')
|
||||||
|
|
||||||
async function goProjects() {
|
async function goProjects() {
|
||||||
console.log('go to projects')
|
|
||||||
await router.push({ name: 'projects' })
|
await router.push({ name: 'projects' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -64,49 +64,59 @@
|
|||||||
</q-list>
|
</q-list>
|
||||||
|
|
||||||
</pn-scroll-list>
|
</pn-scroll-list>
|
||||||
<q-page-sticky
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<q-page-sticky
|
||||||
|
:style="{ zIndex: !showOverlay ? 'inherit' : '5100 !important' }"
|
||||||
position="bottom-right"
|
position="bottom-right"
|
||||||
:offset="[18, 18]"
|
:offset="[18, 18]"
|
||||||
:style="{ zIndex: !showOverlay ? 'inherit' : '5100 !important' }"
|
|
||||||
>
|
>
|
||||||
|
<transition
|
||||||
|
appear
|
||||||
|
enter-active-class="animated slideInUp"
|
||||||
|
>
|
||||||
<q-fab
|
<q-fab
|
||||||
v-if="showFab"
|
v-if="fixShowFab"
|
||||||
icon="add"
|
icon="add"
|
||||||
color="brand"
|
color="brand"
|
||||||
direction="up"
|
direction="up"
|
||||||
vertical-actions-align="right"
|
vertical-actions-align="right"
|
||||||
@click="showOverlay = !showOverlay"
|
@click="showOverlay = !showOverlay"
|
||||||
>
|
|
||||||
<q-fab-action
|
|
||||||
v-for="item in fabMenu"
|
|
||||||
:key="item.id"
|
|
||||||
square
|
|
||||||
clickable
|
|
||||||
v-ripple
|
|
||||||
class="bg-white change-fab-action"
|
|
||||||
>
|
>
|
||||||
<template #icon>
|
<q-fab-action
|
||||||
<q-item class="q-pa-xs w100">
|
v-for="item in fabMenu"
|
||||||
<q-item-section avatar class="items-center">
|
:key="item.id"
|
||||||
<q-avatar color="brand" rounded text-color="white" :icon="item.icon" />
|
square
|
||||||
</q-item-section>
|
clickable
|
||||||
|
v-ripple
|
||||||
|
class="bg-white change-fab-action"
|
||||||
|
>
|
||||||
|
<template #icon>
|
||||||
|
<q-item class="q-pa-xs w100">
|
||||||
|
<q-item-section avatar class="items-center">
|
||||||
|
<q-avatar color="brand" rounded text-color="white" :icon="item.icon" />
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
<q-item-section class="items-start">
|
<q-item-section class="items-start">
|
||||||
<q-item-label class="fab-action-item">
|
<q-item-label class="fab-action-item">
|
||||||
{{ $t(item.name) }}
|
{{ $t(item.name) }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption class="fab-action-item">
|
<q-item-label caption class="fab-action-item">
|
||||||
{{ $t(item.description) }}
|
{{ $t(item.description) }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-fab-action>
|
</q-fab-action>
|
||||||
|
|
||||||
</q-fab>
|
</q-fab>
|
||||||
|
</transition>
|
||||||
</q-page-sticky>
|
</q-page-sticky>
|
||||||
|
|
||||||
<pn-overlay v-if="showOverlay"/>
|
<pn-overlay v-if="showOverlay"/>
|
||||||
</div>
|
|
||||||
<q-dialog v-model="showDialogDeleteChat" @before-hide="onDialogBeforeHide()">
|
<q-dialog v-model="showDialogDeleteChat" @before-hide="onDialogBeforeHide()">
|
||||||
<q-card class="q-pa-none q-ma-none">
|
<q-card class="q-pa-none q-ma-none">
|
||||||
<q-card-section align="center">
|
<q-card-section align="center">
|
||||||
@@ -138,9 +148,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
import { useChatsStore } from 'stores/chats'
|
import { useChatsStore } from 'stores/chats'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
showFab: boolean
|
||||||
|
}>()
|
||||||
|
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
const showOverlay = ref<boolean>(false)
|
const showOverlay = ref<boolean>(false)
|
||||||
const chatsStore = useChatsStore()
|
const chatsStore = useChatsStore()
|
||||||
@@ -200,15 +214,17 @@
|
|||||||
currentSlideEvent.value = null
|
currentSlideEvent.value = null
|
||||||
}
|
}
|
||||||
|
|
||||||
const showFab = ref(false)
|
// fix fab jumping
|
||||||
|
const fixShowFab = ref(true)
|
||||||
|
const showFabFixTrue = () => fixShowFab.value = true
|
||||||
|
|
||||||
onMounted(() => {
|
watch(() => props.showFab, (newVal) => {
|
||||||
setTimeout(() => showFab.value = true, 500)
|
const timerId = setTimeout(showFabFixTrue, 700)
|
||||||
})
|
if (newVal === false) {
|
||||||
|
clearTimeout(timerId)
|
||||||
onUnmounted(() => {
|
fixShowFab.value = false
|
||||||
showFab.value = false
|
}
|
||||||
})
|
}, {immediate: true})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -231,4 +247,10 @@
|
|||||||
align-self: center;
|
align-self: center;
|
||||||
height: 98%;
|
height: 98%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fix-fab {
|
||||||
|
top: calc(100vh - 92px);
|
||||||
|
left: calc(100vw - 92px);
|
||||||
|
padding: 18px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -58,13 +58,18 @@
|
|||||||
position="bottom-right"
|
position="bottom-right"
|
||||||
:offset="[18, 18]"
|
:offset="[18, 18]"
|
||||||
>
|
>
|
||||||
|
<transition
|
||||||
|
appear
|
||||||
|
enter-active-class="animated slideInUp"
|
||||||
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
v-if="fixShowFab"
|
||||||
fab
|
fab
|
||||||
icon="add"
|
icon="add"
|
||||||
color="brand"
|
color="brand"
|
||||||
@click="createCompany()"
|
@click="createCompany()"
|
||||||
v-if="showFab"
|
|
||||||
/>
|
/>
|
||||||
|
</transition>
|
||||||
</q-page-sticky>
|
</q-page-sticky>
|
||||||
</div>
|
</div>
|
||||||
<q-dialog v-model="showDialogDeleteCompany" @before-hide="onDialogBeforeHide()">
|
<q-dialog v-model="showDialogDeleteCompany" @before-hide="onDialogBeforeHide()">
|
||||||
@@ -98,11 +103,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
import { ref, computed, watch } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
import { useCompaniesStore } from 'stores/companies'
|
import { useCompaniesStore } from 'stores/companies'
|
||||||
import { parseIntString } from 'boot/helpers'
|
import { parseIntString } from 'boot/helpers'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
showFab: boolean
|
||||||
|
}>()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const companiesStore = useCompaniesStore()
|
const companiesStore = useCompaniesStore()
|
||||||
@@ -159,15 +168,17 @@
|
|||||||
currentSlideEvent.value = null
|
currentSlideEvent.value = null
|
||||||
}
|
}
|
||||||
|
|
||||||
const showFab = ref(false)
|
// fix fab jumping
|
||||||
|
const fixShowFab = ref(false)
|
||||||
|
const showFabFixTrue = () => fixShowFab.value = true
|
||||||
|
|
||||||
onMounted(() => {
|
watch(() => props.showFab, (newVal) => {
|
||||||
setTimeout(() => showFab.value = true, 500)
|
const timerId = setTimeout(showFabFixTrue, 500)
|
||||||
})
|
if (newVal === false) {
|
||||||
|
clearTimeout(timerId)
|
||||||
onUnmounted(() => {
|
fixShowFab.value = false
|
||||||
showFab.value = false
|
}
|
||||||
})
|
}, {immediate: true})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, computed } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
defineOptions({ inheritAttrs: false })
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
17
src/pages/AccountChangeEmailPage.vue
Normal file
17
src/pages/AccountChangeEmailPage.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<pn-page-card>
|
||||||
|
<template #title>
|
||||||
|
<div class="col-grow">
|
||||||
|
{{$t('account__change_password')}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<pn-scroll-list>
|
||||||
|
<account-helper :type />
|
||||||
|
</pn-scroll-list>
|
||||||
|
</pn-page-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import accountHelper from 'components/admin/accountHelper.vue'
|
||||||
|
const type = 'change'
|
||||||
|
</script>
|
||||||
17
src/pages/AccountChangePasswordPage.vue
Normal file
17
src/pages/AccountChangePasswordPage.vue
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<pn-page-card>
|
||||||
|
<template #title>
|
||||||
|
<div class="col-grow">
|
||||||
|
{{$t('account__change_password')}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<pn-scroll-list>
|
||||||
|
<account-helper :type />
|
||||||
|
</pn-scroll-list>
|
||||||
|
</pn-page-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import accountHelper from 'components/admin/accountHelper.vue'
|
||||||
|
const type = 'change'
|
||||||
|
</script>
|
||||||
@@ -19,258 +19,70 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<q-btn flat icon="mdi-logout"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<pn-scroll-list>
|
<pn-scroll-list>
|
||||||
<div class="w100 flex column items-center q-pb-md q-pt-sm q-px-md" >
|
<q-list separator>
|
||||||
<div class="flex w100 justify-between items-center q-pl-sm">
|
<q-item
|
||||||
<div class="text-caption text-bold">
|
v-for="item in items"
|
||||||
{{ $t('account__user_settings') }}</div>
|
:key="item.id"
|
||||||
<q-btn
|
@click="goTo(item.pathName)"
|
||||||
@click = "goProjects()"
|
clickable
|
||||||
flat round
|
v-ripple
|
||||||
color="primary"
|
|
||||||
icon="mdi-check"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<q-transition-group
|
|
||||||
tag="div"
|
|
||||||
class="flex w100 company-container"
|
|
||||||
enter-active-class="animate__animated animate__fadeIn"
|
|
||||||
leave-active-class="animate__animated animate__fadeOut"
|
|
||||||
appear
|
|
||||||
>
|
>
|
||||||
<template v-if="company">
|
<q-item-section avatar>
|
||||||
<pn-image-selector
|
<q-avatar
|
||||||
key="image"
|
:icon="item.icon"
|
||||||
class="q-mr-sm company-logo"
|
:color="item.iconColor ? item.iconColor: 'brand'"
|
||||||
:size="40"
|
text-color="white"
|
||||||
:iconsize="40"
|
rounded
|
||||||
/>
|
font-size ="26px"
|
||||||
</template>
|
/>
|
||||||
|
|
||||||
<q-input
|
|
||||||
key="input"
|
|
||||||
v-model="company"
|
|
||||||
dense
|
|
||||||
filled
|
|
||||||
class="q-mb-md col-grow company-input"
|
|
||||||
:label="$t('account__your_company')"
|
|
||||||
:style="{ marginLeft: !company ? '0' : '48px', transition: 'all 0.3s' }"
|
|
||||||
/>
|
|
||||||
</q-transition-group>
|
|
||||||
<q-expansion-item
|
|
||||||
dense
|
|
||||||
id="warning"
|
|
||||||
class="q-mt-sm w100 q-pa-sm"
|
|
||||||
style="border: solid 1px var(--q-warning)"
|
|
||||||
>
|
|
||||||
<template #header>
|
|
||||||
<q-item-section>
|
|
||||||
<div class="flex row w100 items-center">
|
|
||||||
<q-icon name="mdi-alert-decagram-outline" color="warning " size="sm" />
|
|
||||||
<span class="q-pl-xs">{{$t('account__change_auth')}}</span>
|
|
||||||
</div>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</template>
|
<q-item-section>
|
||||||
<q-card class="q-pa-none">
|
<q-item-label>
|
||||||
<q-card-section class="q-pa-sm">
|
{{ $t(item.name) }}
|
||||||
<div class="flex justify-center column">
|
</q-item-label>
|
||||||
<span>{{$t('account__change_auth_message_1')}}</span>
|
<q-item-label class="text-caption">
|
||||||
<span>{{$t('account__change_auth_message_2')}}</span>
|
{{ $t(item.description) }}
|
||||||
<div class="flex justify-end">
|
</q-item-label>
|
||||||
<q-btn
|
</q-item-section>
|
||||||
@click="showChangeAuthDialog = true"
|
</q-item>
|
||||||
flat
|
</q-list>
|
||||||
color="primary"
|
|
||||||
no-caps
|
|
||||||
class="q-pb-none"
|
|
||||||
>
|
|
||||||
{{$t('account__change_auth_btn')}} ►
|
|
||||||
</q-btn>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
|
||||||
</q-expansion-item>
|
|
||||||
|
|
||||||
<div id="qty_chats" class="flex column q-pt-lg w100 q-pl-sm">
|
|
||||||
<div class="text-caption text-bold flex items-center">
|
|
||||||
<span>{{ $t('account__chats') }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex row justify-between">
|
|
||||||
<qty-chat-card
|
|
||||||
v-for = "chat in chats"
|
|
||||||
:key = chat.title
|
|
||||||
:qty = chat.qty
|
|
||||||
:bgColor = chat.color
|
|
||||||
:title = chat.title
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="subscribe" class="flex column q-pt-lg w100 q-pl-sm">
|
|
||||||
<div class="text-caption text-bold">
|
|
||||||
{{ $t('account__subscribe') }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<q-item class="q-pa-sm text-caption">
|
|
||||||
<q-item-section
|
|
||||||
avatar
|
|
||||||
class="q-pr-none"
|
|
||||||
:style="{ minWidth: 'inherit !important' }"
|
|
||||||
>
|
|
||||||
<q-icon name = "mdi-crown-circle-outline" color="orange" size="md"/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section class="q-pl-sm">
|
|
||||||
<span>{{ $t('account__subscribe_info') }}</span>
|
|
||||||
<span>{{ $t('account__subscribe_select_payment_1') }}</span>
|
|
||||||
<q-icon name = "mdi-star" class="text-orange" size="sm"/>
|
|
||||||
<span>{{ $t('account__subscribe_select_payment_2') }}</span>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
|
|
||||||
<div class="flex w100 justify-between items-center no-wrap q-pt-sm">
|
|
||||||
<div class="flex column">
|
|
||||||
<div>
|
|
||||||
{{ $t('account__subscribe_current_balance') }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-center">
|
|
||||||
<q-icon name = "mdi-crown-circle-outline" color="orange" size="sm"/>
|
|
||||||
<div class="text-bold q-pa-xs text-h6">
|
|
||||||
50
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="payment-selector">
|
|
||||||
<div class="q-py-sm">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<q-list>
|
|
||||||
<q-item
|
|
||||||
v-for="item in payment"
|
|
||||||
:key="item.id"
|
|
||||||
>
|
|
||||||
<q-radio
|
|
||||||
v-model="paymentSelect"
|
|
||||||
:val="item.stars"
|
|
||||||
dense
|
|
||||||
>
|
|
||||||
<option-payment
|
|
||||||
:qty="item.qty"
|
|
||||||
:stars="item.stars"
|
|
||||||
:discount="item.discount"
|
|
||||||
/>
|
|
||||||
</q-radio>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</pn-scroll-list>
|
</pn-scroll-list>
|
||||||
|
|
||||||
<q-dialog v-model="showChangeAuthDialog">
|
|
||||||
<q-card>
|
|
||||||
<q-card-section align="center">
|
|
||||||
<div class="text-h6 text-negative ">{{ $t('account__change_auth_warning') }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-section class="q-pt-none" align="center">
|
|
||||||
{{ $t('account__change_auth_warning_message') }}
|
|
||||||
</q-card-section>
|
|
||||||
|
|
||||||
<q-card-actions align="center">
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
:label="$t('back')"
|
|
||||||
color="primary"
|
|
||||||
v-close-popup
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
:label="$t('continue')"
|
|
||||||
color="primary"
|
|
||||||
v-close-popup
|
|
||||||
@click="change_auth()"
|
|
||||||
/>
|
|
||||||
</q-card-actions>
|
|
||||||
</q-card>
|
|
||||||
</q-dialog>
|
|
||||||
</pn-page-card>
|
</pn-page-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, inject } from 'vue'
|
import { inject, computed } from 'vue'
|
||||||
import qtyChatCard from 'components/admin/account-page/qtyChatCard.vue'
|
|
||||||
import optionPayment from 'components/admin/account-page/optionPayment.vue'
|
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useAuthStore } from 'stores/auth'
|
// import { useAuthStore } from 'stores/auth'
|
||||||
import type { WebApp } from '@twa-dev/types'
|
import type { WebApp } from '@twa-dev/types'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const authStore = useAuthStore()
|
// const authStore = useAuthStore()
|
||||||
|
|
||||||
const tg = inject('tg') as WebApp
|
const tg = inject('tg') as WebApp
|
||||||
const tgUser = tg.initDataUnsafe.user
|
const tgUser = tg.initDataUnsafe.user
|
||||||
const company = ref<string>('')
|
|
||||||
const showChangeAuthDialog = ref<boolean>(false)
|
|
||||||
|
|
||||||
const chats = ref([
|
const items = computed(() => ([
|
||||||
{ title: 'account__chats_active', qty: 8, color: 'var(--q-primary)' },
|
{ id: 1, name: 'account__subscribe', description: 'account__subscribe_description', icon: 'mdi-crown-circle-outline', iconColor: 'orange', pathName: 'subscribe' },
|
||||||
{ title: 'account__chats_archive', qty: 2, color: 'grey' },
|
{ id: 2, name: 'account__auth_change_method', description: 'account__auth_change_method_description', icon: 'mdi-account-sync-outline', iconColor: 'primary', pathName: '' },
|
||||||
{ title: 'account__chats_free', qty: 5, color: 'green' },
|
{ id: 3, name: 'account__auth_change_password', description: 'account__auth_change_password_description', icon: 'mdi-account-key-outline', iconColor: 'primary', pathName: 'change_account_password' },
|
||||||
{ title: 'account__chats_total', qty: 15, color: 'var(--q-info)' },
|
{ id: 4, name: 'account__auth_change_account', description: 'account__auth_change_account_description', icon: 'mdi-account-switch-outline', iconColor: 'primary', pathName: 'change_account_email' },
|
||||||
])
|
{ id: 5, name: 'account__company_data', icon: 'mdi-account-group-outline', description: 'account__company_data_description', pathName: 'your_company' },
|
||||||
const payment=ref([
|
{ id: 6, name: 'account__support', icon: 'mdi-lifebuoy', description: 'account__support_description', iconColor: 'info', pathName: 'support' },
|
||||||
{ id: 1, qty: 50, stars: 200, discount: 0 },
|
{ id: 7, name: 'account__terms_of_use', icon: 'mdi-book-open-variant-outline', description: '', iconColor: 'grey', pathName: 'terms' },
|
||||||
{ id: 2, qty: 120, stars: 400, discount: 20 },
|
{ id: 8, name: 'account__privacy', icon: 'mdi-lock-outline', description: '', iconColor: 'grey', pathName: 'privacy' }
|
||||||
{ id: 3, qty: 220, stars: 500, discount: 30 }
|
]))
|
||||||
])
|
|
||||||
|
|
||||||
const paymentSelect = ref(200)
|
async function goTo (path: string) {
|
||||||
|
await router.push({ name: path })
|
||||||
async function change_auth () {
|
|
||||||
console.log('update')
|
|
||||||
console.log(authStore)
|
|
||||||
await router.push({ name: 'login' })
|
|
||||||
}
|
|
||||||
|
|
||||||
async function goProjects () {
|
|
||||||
await router.push({ name: 'projects' })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
#warning {
|
|
||||||
& >div .q-item {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.company-container {
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
min-height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.company-logo {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
:deep(.animate__animated) {
|
|
||||||
--animate-duration: 0.4s;
|
|
||||||
animation-fill-mode: both;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -19,11 +19,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section></q-item-section>
|
<q-item-section></q-item-section>
|
||||||
<q-item-section align="end">
|
<q-item-section align="end" class="col-grow">
|
||||||
{{ $t('mask__title_table') }}
|
{{ $t('mask__title_table') }}
|
||||||
<span class="text-caption">
|
|
||||||
{{ $t('mask__title_table2') }}
|
|
||||||
</span>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
@@ -91,7 +88,10 @@
|
|||||||
<q-dialog v-model="showDialogHelp">
|
<q-dialog v-model="showDialogHelp">
|
||||||
<q-card class="q-ma-sm w100">
|
<q-card class="q-ma-sm w100">
|
||||||
<q-card-section class="row items-center q-pb-none">
|
<q-card-section class="row items-center q-pb-none">
|
||||||
<div class="text-h6">{{ $t('mask__help_title')}}</div>
|
<span class="text-h6">
|
||||||
|
<q-icon name="mdi-drama-masks"/>
|
||||||
|
{{ $t('mask__help_title')}}
|
||||||
|
</span>
|
||||||
<q-space />
|
<q-space />
|
||||||
<q-btn icon="close" flat round dense v-close-popup />
|
<q-btn icon="close" flat round dense v-close-popup />
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
|
|||||||
39
src/pages/CompanyYourPage.vue
Normal file
39
src/pages/CompanyYourPage.vue
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
<template>
|
||||||
|
<pn-page-card>
|
||||||
|
<template #title>
|
||||||
|
<div class="flex items-center justify-between col-grow">
|
||||||
|
<div>
|
||||||
|
{{$t('Your_company__title_card')}}
|
||||||
|
</div>
|
||||||
|
<q-btn
|
||||||
|
v-if="(Object.keys(companyMod).length !== 0)"
|
||||||
|
@click = "addCompany(companyMod)"
|
||||||
|
flat round
|
||||||
|
icon="mdi-check"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<pn-scroll-list>
|
||||||
|
<company-info-block v-model="companyMod"/>
|
||||||
|
</pn-scroll-list>
|
||||||
|
</pn-page-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
import companyInfoBlock from 'components/admin/companyInfoBlock.vue'
|
||||||
|
import { useCompaniesStore } from 'stores/companies'
|
||||||
|
import type { Company } from 'src/types'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const companiesStore = useCompaniesStore()
|
||||||
|
|
||||||
|
const companyMod = ref(<Company>{})
|
||||||
|
|
||||||
|
function addCompany (data: Company) {
|
||||||
|
companiesStore.addCompany(data)
|
||||||
|
router.go(-1)
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
22
src/pages/PrivacyPage.vue
Normal file
22
src/pages/PrivacyPage.vue
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<pn-page-card>
|
||||||
|
<template #title>
|
||||||
|
<div class="flex items-center justify-between col-grow">
|
||||||
|
<div>
|
||||||
|
{{ $t('privacy__title') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<pn-scroll-list>
|
||||||
|
{{ $t('under_construction') }}
|
||||||
|
</pn-scroll-list>
|
||||||
|
</pn-page-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
@@ -7,6 +7,9 @@
|
|||||||
<q-tab-panels
|
<q-tab-panels
|
||||||
v-model="tabSelect"
|
v-model="tabSelect"
|
||||||
animated
|
animated
|
||||||
|
keep-alive
|
||||||
|
@before-transition="showFab = false"
|
||||||
|
@transition="showFab = true"
|
||||||
class="tab-panel-color full-height-panel w100 flex column col-grow no-scroll"
|
class="tab-panel-color full-height-panel w100 flex column col-grow no-scroll"
|
||||||
>
|
>
|
||||||
<q-tab-panel
|
<q-tab-panel
|
||||||
@@ -16,17 +19,18 @@
|
|||||||
class="q-pa-none flex column col-grow no-scroll"
|
class="q-pa-none flex column col-grow no-scroll"
|
||||||
style="flex-grow: 2"
|
style="flex-grow: 2"
|
||||||
>
|
>
|
||||||
<component :is="tab.component"/>
|
<component :is="tab.component" :showFab = "tab.name === tabSelect" />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<q-footer class="bg-grey-1 text-grey">
|
<q-footer class="bg-grey-1 text-grey">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
style = "z-index: 1000"
|
style = "z-index: 1000"
|
||||||
v-model="tabSelect"
|
v-model="tabSelect"
|
||||||
dense
|
dense
|
||||||
align="justify"
|
align="justify"
|
||||||
|
id="tabs"
|
||||||
>
|
>
|
||||||
<q-route-tab
|
<q-route-tab
|
||||||
v-for="tab in tabs"
|
v-for="tab in tabs"
|
||||||
@@ -60,13 +64,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, onBeforeMount, computed } from 'vue'
|
||||||
import { useProjectsStore } from 'stores/projects'
|
import { useProjectsStore } from 'stores/projects'
|
||||||
import projectPageHeader from 'components/admin/project-page/ProjectPageHeader.vue'
|
import projectPageHeader from 'components/admin/project-page/ProjectPageHeader.vue'
|
||||||
import projectPageChats from 'components/admin/project-page/ProjectPageChats.vue'
|
import projectPageChats from 'components/admin/project-page/ProjectPageChats.vue'
|
||||||
import projectPageCompanies from 'components/admin/project-page/ProjectPageCompanies.vue'
|
import projectPageCompanies from 'components/admin/project-page/ProjectPageCompanies.vue'
|
||||||
import projectPagePersons from 'components/admin/project-page/ProjectPagePersons.vue'
|
import projectPagePersons from 'components/admin/project-page/ProjectPagePersons.vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
const showFab = ref<boolean>(false)
|
||||||
|
|
||||||
const projectStore = useProjectsStore()
|
const projectStore = useProjectsStore()
|
||||||
const currentProject = computed(() => projectStore.getCurrentProject() )
|
const currentProject = computed(() => projectStore.getCurrentProject() )
|
||||||
|
|
||||||
@@ -82,7 +91,12 @@
|
|||||||
{name: 'companies', label: 'project__companies', icon: 'mdi-account-group-outline', component: tabComponents.projectPageCompanies, to: { name: 'companies'} },
|
{name: 'companies', label: 'project__companies', icon: 'mdi-account-group-outline', component: tabComponents.projectPageCompanies, to: { name: 'companies'} },
|
||||||
]
|
]
|
||||||
|
|
||||||
const tabSelect = ref<string>(tabs[0]?.name ? tabs[0]?.name : '')
|
const tabSelect = ref<string>()
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
const initialTab = tabs.find(t => t.to.name === route.name)?.name || tabs[0]?.name || ''
|
||||||
|
tabSelect.value = initialTab
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -101,4 +115,11 @@
|
|||||||
flex-grow: 2;
|
flex-grow: 2;
|
||||||
width: 100%
|
width: 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#tabs :deep(.q-tab__indicator) {
|
||||||
|
height: 3px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
82
src/pages/SubscribePage.vue
Normal file
82
src/pages/SubscribePage.vue
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<pn-page-card>
|
||||||
|
<template #title>
|
||||||
|
<div class="flex items-center justify-between col-grow">
|
||||||
|
<div>
|
||||||
|
{{$t('subscribe__title')}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<pn-scroll-list class="q-px-md">
|
||||||
|
<div id="subscribe-current-balance" class="flex w100 justify-between items-center no-wrap text-h6">
|
||||||
|
<span>
|
||||||
|
{{ $t('subscribe__current_balance') }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div class="flex items-center">
|
||||||
|
<q-icon name = "mdi-crown-circle-outline" color="orange" size="sm"/>
|
||||||
|
<div class="text-bold q-pa-xs ">
|
||||||
|
50
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="subscribe-need-tocken" :style = "{ borderLeft: 'solid 5px var(--q-info)' }" class="q-pl-sm">
|
||||||
|
<q-icon name = "mdi-crown-circle-outline" color="orange" size="xs"/>{{ $t('subscribe__token_formula') }}
|
||||||
|
<div class="text-caption">{{ $t('subscribe__token_formula_description') }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="qty_chats" class="flex column q-pt-lg w100">
|
||||||
|
<div class="text-h6 flex items-center">
|
||||||
|
<span>{{ $t('account__chats') }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex row justify-between">
|
||||||
|
<qty-chat-card
|
||||||
|
v-for = "chat in chats"
|
||||||
|
:key = chat.title
|
||||||
|
:qty = chat.qty
|
||||||
|
:bgColor = chat.color
|
||||||
|
:title = chat.title
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</pn-scroll-list>
|
||||||
|
</pn-page-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, inject, computed } from 'vue'
|
||||||
|
// import { useRouter } from 'vue-router'
|
||||||
|
// import { useAuthStore } from 'stores/auth'
|
||||||
|
// import type { WebApp } from '@twa-dev/types'
|
||||||
|
import qtyChatCard from 'components/admin/account-page/qtyChatCard.vue'
|
||||||
|
// import optionPayment from 'components/admin/account-page/optionPayment.vue'
|
||||||
|
|
||||||
|
// const router = useRouter()
|
||||||
|
// const authStore = useAuthStore()
|
||||||
|
|
||||||
|
// const tg = inject('tg') as WebApp
|
||||||
|
// const tgUser = tg.initDataUnsafe.user
|
||||||
|
|
||||||
|
const chats = ref([
|
||||||
|
{ title: 'account__chats_active', qty: 8, color: 'var(--q-primary)' },
|
||||||
|
{ title: 'account__chats_unbound', qty: 2, color: 'grey' },
|
||||||
|
{ title: 'account__chats_free', qty: 5, color: 'green' },
|
||||||
|
{ title: 'account__chats_total', qty: 15, color: 'var(--q-info)' },
|
||||||
|
])
|
||||||
|
|
||||||
|
/* const payment=ref([
|
||||||
|
{ id: 1, qty: 50, stars: 200, discount: 0 },
|
||||||
|
{ id: 2, qty: 120, stars: 400, discount: 20 },
|
||||||
|
{ id: 3, qty: 220, stars: 500, discount: 30 }
|
||||||
|
]) */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
</style>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<pn-scroll-list>
|
<pn-scroll-list>
|
||||||
Фигня которую никто не читает!
|
{{ $t('under_construction') }}
|
||||||
</pn-scroll-list>
|
</pn-scroll-list>
|
||||||
</pn-page-card>
|
</pn-page-card>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default defineRouter(function (/* { store, ssrContext } */) {
|
|||||||
history: createHistory(process.env.VUE_ROUTER_BASE),
|
history: createHistory(process.env.VUE_ROUTER_BASE),
|
||||||
})
|
})
|
||||||
|
|
||||||
const publicPaths = ['/login', '/terms-of-use', '/create-account', '/recovery-password']
|
const publicPaths = ['/login', '/create-account', '/recovery-password']
|
||||||
|
|
||||||
Router.beforeEach(async (to) => {
|
Router.beforeEach(async (to) => {
|
||||||
const authStore = useAuthStore()
|
const authStore = useAuthStore()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
name: 'project_add',
|
name: 'project_add',
|
||||||
path: '/project/add',
|
path: '/project/add',
|
||||||
component: () => import('pages/CreateProjectPage.vue')
|
component: () => import('pages/ProjectCreatePage.vue')
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -94,9 +94,38 @@ const routes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
name: 'create_account',
|
name: 'create_account',
|
||||||
path: '/create-account',
|
path: '/create-account',
|
||||||
component: () => import('pages/CreateAccountPage.vue')
|
component: () => import('src/pages/AccountCreatePage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'change_account_password',
|
||||||
|
path: '/change-password',
|
||||||
|
component: () => import('pages/AccountChangePasswordPage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'change_account_email',
|
||||||
|
path: '/change-email',
|
||||||
|
component: () => import('pages/AccountChangeEmailPage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'subscribe',
|
||||||
|
path: '/subscribe',
|
||||||
|
component: () => import('pages/SubscribePage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'terms',
|
||||||
|
path: '/terms-of-use',
|
||||||
|
component: () => import('pages/TermsPage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'privacy',
|
||||||
|
path: '/privacy',
|
||||||
|
component: () => import('pages/PrivacyPage.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'your_company',
|
||||||
|
path: '/your-company',
|
||||||
|
component: () => import('src/pages/CompanyYourPage.vue')
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'login',
|
name: 'login',
|
||||||
path: '/login',
|
path: '/login',
|
||||||
@@ -106,13 +135,13 @@ const routes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
name: 'recovery_password',
|
name: 'recovery_password',
|
||||||
path: '/recovery-password',
|
path: '/recovery-password',
|
||||||
component: () => import('pages/ForgotPasswordPage.vue')
|
component: () => import('src/pages/AccountForgotPasswordPage.vue')
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'add_company',
|
name: 'add_company',
|
||||||
path: '/add-company',
|
path: '/add-company',
|
||||||
component: () => import('pages/CreateCompanyPage.vue')
|
component: () => import('src/pages/CompanyCreatePage.vue')
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -125,12 +154,6 @@ const routes: RouteRecordRaw[] = [
|
|||||||
name: 'settings',
|
name: 'settings',
|
||||||
path: '/settings',
|
path: '/settings',
|
||||||
component: () => import('pages/SettingsPage.vue')
|
component: () => import('pages/SettingsPage.vue')
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
name: 'terms',
|
|
||||||
path: '/terms-of-use',
|
|
||||||
component: () => import('pages/TermsPage.vue')
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
10
todo.txt
10
todo.txt
@@ -4,8 +4,7 @@
|
|||||||
+ Окно "Забыли пароль?"
|
+ Окно "Забыли пароль?"
|
||||||
+ Надпись "Неправильный логин или пароль"
|
+ Надпись "Неправильный логин или пароль"
|
||||||
+ Окно "Регистрация нового пользователя"
|
+ Окно "Регистрация нового пользователя"
|
||||||
- Переводы
|
+ Верификация поля ввода e-mail (не делать - плохо выглядит)
|
||||||
+ Верификация e-mail (не делать - плохо выглядит)
|
|
||||||
|
|
||||||
2. Account:
|
2. Account:
|
||||||
+ Работа с изображением логотипа компании
|
+ Работа с изображением логотипа компании
|
||||||
@@ -34,6 +33,7 @@
|
|||||||
+ Настроить роутинг
|
+ Настроить роутинг
|
||||||
+ У чатов добавить кол-во пользователей
|
+ У чатов добавить кол-во пользователей
|
||||||
- У чатов добавить указание владельца чата и его компанию
|
- У чатов добавить указание владельца чата и его компанию
|
||||||
|
- Удаление чата свайпом и отключенные чаты.
|
||||||
|
|
||||||
4.3 ProjectPage - Люди:
|
4.3 ProjectPage - Люди:
|
||||||
- Перечень сотрудников
|
- Перечень сотрудников
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
5. Settings:
|
5. Settings:
|
||||||
- Роутинг
|
- Роутинг
|
||||||
- Переключатель языков
|
- Переключатель языков
|
||||||
- Встроить в Телеграмм
|
+ Встроить в Телеграмм
|
||||||
|
|
||||||
6. Лицензионное соглашение:
|
6. Лицензионное соглашение:
|
||||||
- Роутинг и заготовка
|
- Роутинг и заготовка
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
- Встроить в Телеграмм
|
- Встроить в Телеграмм
|
||||||
|
|
||||||
BUGS:
|
BUGS:
|
||||||
- 1. Прыгает кнопка fab при перещелкивании табов
|
+- 1. Прыгает кнопка fab при перещелкивании табов (при быстром переключении все равно прыгает, проблема установлена в q-page-sticky -как-то некорректно отрабатывается bottom и right)
|
||||||
+ 2. Верстка в шапке Projects плохая - переделать
|
+ 2. Верстка в шапке Projects плохая - переделать
|
||||||
- 3. Не хватает перевода местами
|
- 3. Не хватает перевода местами
|
||||||
+ 4. При нажатии Back браузера скидывается активная табка.
|
+ 4. При нажатии Back браузера скидывается активная табка.
|
||||||
@@ -73,7 +73,7 @@ Need refactor
|
|||||||
|
|
||||||
Current ToDo:
|
Current ToDo:
|
||||||
+ 1. pinia
|
+ 1. pinia
|
||||||
+ 2. Реализовать функционал меню - редактирование проекта. (Бекар на потом)
|
+ 2. Реализовать функционал меню - редактирование проекта. (Бекап на потом)
|
||||||
+ 3. Архивные чаты и проекты. (Чаты отказался)
|
+ 3. Архивные чаты и проекты. (Чаты отказался)
|
||||||
+4. Добавление компании.
|
+4. Добавление компании.
|
||||||
+ 5. Удаление компании (слайдер), как в чате.
|
+ 5. Удаление компании (слайдер), как в чате.
|
||||||
|
|||||||
Reference in New Issue
Block a user