UnisKB/ui/src/layout/components/top-bar/avatar/AboutDialog.vue

92 lines
2.5 KiB
Vue
Raw Normal View History

2023-12-18 03:11:13 +00:00
<template>
2024-07-15 10:08:02 +00:00
<el-dialog
v-model="aboutDialogVisible"
class="about-dialog border-r-4"
:class="!isDefaultTheme ? 'custom-header' : ''"
>
2023-12-18 03:11:13 +00:00
<template #header="{ titleId, titleClass }">
2024-07-01 01:45:59 +00:00
<div class="logo flex-center" :id="titleId" :class="titleClass">
2024-07-15 10:08:02 +00:00
<LogoFull height="59px" />
2023-12-18 03:11:13 +00:00
</div>
</template>
2024-03-21 07:52:10 +00:00
<div class="about-ui">
2024-07-15 10:08:02 +00:00
<el-card shadow="hover" class="mb-16" @click="toUrl('https://maxkb.cn/docs/')">
2024-03-21 07:52:10 +00:00
<div class="flex align-center cursor">
<AppIcon iconName="app-reading" class="mr-16 ml-8" style="font-size: 24px"></AppIcon>
2024-05-27 06:01:26 +00:00
<span>{{ $t('layout.topbar.wiki') }}</span>
2024-03-21 07:52:10 +00:00
</div>
</el-card>
<el-card shadow="hover" class="mb-16" @click="toUrl('https://github.com/1Panel-dev/MaxKB')">
<div class="flex align-center cursor">
<AppIcon iconName="app-github" class="mr-16 ml-8" style="font-size: 24px"></AppIcon>
2024-05-27 06:01:26 +00:00
<span>{{ $t('layout.topbar.github') }}</span>
2024-03-21 07:52:10 +00:00
</div>
</el-card>
<el-card shadow="hover" class="mb-16" @click="toUrl('https://bbs.fit2cloud.com/c/mk/11')">
<div class="flex align-center cursor">
<AppIcon iconName="app-help" class="mr-16 ml-8" style="font-size: 24px"></AppIcon>
2024-05-27 06:01:26 +00:00
<span>{{ $t('layout.topbar.forum') }}</span>
2024-03-21 07:52:10 +00:00
</div>
</el-card>
</div>
2024-05-27 06:01:26 +00:00
<div class="text-center">{{ $t('layout.topbar.avatar.version') }}:{{ user.version }}</div>
2023-12-18 03:11:13 +00:00
</el-dialog>
</template>
<script setup lang="ts">
2024-07-15 10:08:02 +00:00
import { ref, computed } from 'vue'
2024-03-21 08:33:13 +00:00
import useStore from '@/stores'
2024-07-16 09:32:27 +00:00
const { user } = useStore()
2024-07-15 10:08:02 +00:00
const isDefaultTheme = computed(() => {
2024-07-16 09:32:27 +00:00
return user.isDefaultTheme()
2024-07-15 10:08:02 +00:00
})
2024-03-21 08:33:13 +00:00
2023-12-18 03:11:13 +00:00
const aboutDialogVisible = ref(false)
const open = () => {
aboutDialogVisible.value = true
}
2024-03-21 07:52:10 +00:00
function toUrl(url: string) {
window.open(url, '_blank')
}
2023-12-18 03:11:13 +00:00
defineExpose({ open })
</script>
<style lang="scss" scope>
.about-dialog {
2024-03-21 10:01:04 +00:00
padding: 0 0 24px 0;
2024-02-23 10:28:21 +00:00
width: 600px;
2024-03-21 10:01:04 +00:00
font-weight: 400;
2023-12-18 03:11:13 +00:00
.el-dialog__header {
background: var(--app-header-bg-color);
margin-right: 0;
2024-02-23 10:28:21 +00:00
height: 140px;
box-sizing: border-box;
2024-07-01 01:45:59 +00:00
border-radius: 4px 4px 0 0;
2024-02-23 10:28:21 +00:00
}
.el-dialog__title {
2024-07-01 01:45:59 +00:00
height: 140px;
box-sizing: border-box;
2023-12-18 03:11:13 +00:00
}
.about-ui {
2024-02-23 10:28:21 +00:00
width: 360px;
2023-12-18 03:11:13 +00:00
margin: 0 auto;
2024-02-23 10:28:21 +00:00
font-weight: 400;
2024-02-23 10:33:21 +00:00
font-size: 16px;
2024-03-21 10:01:04 +00:00
margin-top: 24px;
2024-02-23 10:28:21 +00:00
.label {
width: 180px;
text-align: left;
color: var(--app-text-color-secondary);
2023-12-18 03:11:13 +00:00
}
}
2024-07-17 03:16:21 +00:00
&.custom-header {
2024-07-15 10:08:02 +00:00
.el-dialog__header {
background: var(--el-color-primary-light-9) !important;
}
}
2024-07-17 03:16:21 +00:00
}
2023-12-18 03:11:13 +00:00
</style>