mirror of
https://github.com/certd/certd.git
synced 2026-07-11 15:57:33 +08:00
chore: code format
This commit is contained in:
@@ -23,17 +23,17 @@ const props = withDefaults(
|
||||
{
|
||||
data: () => {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const dates = computed(() => {
|
||||
return props.data.map((item) => {
|
||||
return props.data.map(item => {
|
||||
return item.name;
|
||||
});
|
||||
});
|
||||
const counts = computed(() => {
|
||||
return props.data.map((item) => {
|
||||
return props.data.map(item => {
|
||||
return item.value;
|
||||
});
|
||||
});
|
||||
@@ -43,15 +43,15 @@ const option = ref({
|
||||
show: props.data.length === 0, // 没数据才显示
|
||||
extStyle: {
|
||||
color: "grey",
|
||||
fontSize: 20
|
||||
fontSize: 20,
|
||||
},
|
||||
text: "暂无数据",
|
||||
left: "center",
|
||||
top: "center"
|
||||
top: "center",
|
||||
},
|
||||
|
||||
tooltip: {
|
||||
trigger: "item"
|
||||
trigger: "item",
|
||||
},
|
||||
// tooltip: {
|
||||
// trigger: "axis",
|
||||
@@ -70,19 +70,19 @@ const option = ref({
|
||||
left: "20px",
|
||||
right: "20px",
|
||||
bottom: "10px",
|
||||
containLabel: true
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: "category",
|
||||
boundaryGap: false,
|
||||
data: dates
|
||||
}
|
||||
data: dates,
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: "value"
|
||||
}
|
||||
type: "value",
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
@@ -91,16 +91,16 @@ const option = ref({
|
||||
stack: "Total",
|
||||
label: {
|
||||
show: true,
|
||||
position: "top"
|
||||
position: "top",
|
||||
},
|
||||
smooth: true,
|
||||
areaStyle: {},
|
||||
emphasis: {
|
||||
focus: "series"
|
||||
focus: "series",
|
||||
},
|
||||
data: counts
|
||||
}
|
||||
]
|
||||
data: counts,
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -22,19 +22,19 @@ const props = defineProps<{
|
||||
const option = ref({
|
||||
color: ["#91cc75", "#73c0de", "#ee6666", "#fac858", "#5470c6", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc", "#5470c6"],
|
||||
tooltip: {
|
||||
trigger: "item"
|
||||
trigger: "item",
|
||||
},
|
||||
legend: {
|
||||
orient: "vertical",
|
||||
bottom: "5%",
|
||||
left: "left"
|
||||
left: "left",
|
||||
},
|
||||
grid: {
|
||||
top: "20px",
|
||||
left: "20px",
|
||||
right: "20px",
|
||||
bottom: "10px",
|
||||
containLabel: true
|
||||
containLabel: true,
|
||||
},
|
||||
series: [
|
||||
{
|
||||
@@ -46,25 +46,25 @@ const option = ref({
|
||||
itemStyle: {
|
||||
borderRadius: 0,
|
||||
borderColor: "#fff",
|
||||
borderWidth: 1
|
||||
borderWidth: 1,
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: "center"
|
||||
position: "center",
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false,
|
||||
fontSize: 18,
|
||||
fontWeight: "bold"
|
||||
}
|
||||
fontWeight: "bold",
|
||||
},
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
data: props.data
|
||||
}
|
||||
]
|
||||
data: props.data,
|
||||
},
|
||||
],
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -11,14 +11,12 @@
|
||||
<div class="text">
|
||||
<div class="left">
|
||||
<div>
|
||||
<span>{{ t('certd.dashboard.greeting', { name: userInfo.nickName || userInfo.username, site: siteInfo.title }) }}</span>
|
||||
<span>{{ t("certd.dashboard.greeting", { name: userInfo.nickName || userInfo.username, site: siteInfo.title }) }}</span>
|
||||
</div>
|
||||
<div class="flex-o flex-wrap profile-badges">
|
||||
<a-tooltip :title="deltaTimeTip">
|
||||
<a-badge :dot="deltaTimeWarning">
|
||||
<a-tag :color="deltaTimeWarning ? 'red' : 'green'" class="flex-inline pointer">
|
||||
<fs-icon icon="ion:time-outline"></fs-icon> {{ now }}
|
||||
</a-tag>
|
||||
<a-tag :color="deltaTimeWarning ? 'red' : 'green'" class="flex-inline pointer"> <fs-icon icon="ion:time-outline"></fs-icon> {{ now }} </a-tag>
|
||||
</a-badge>
|
||||
</a-tooltip>
|
||||
|
||||
@@ -50,7 +48,7 @@
|
||||
<tutorial-button class="flex-center mt-2">
|
||||
<a-tooltip :title="t('certd.dashboard.tutorialTooltip')">
|
||||
<a-tag color="blue" class="flex-center">
|
||||
{{ t('certd.dashboard.tutorialText') }}
|
||||
{{ t("certd.dashboard.tutorialText") }}
|
||||
<fs-icon class="font-size-16 ml-5" icon="mingcute:question-line"></fs-icon>
|
||||
</a-tag>
|
||||
</a-tooltip>
|
||||
@@ -61,10 +59,9 @@
|
||||
<div v-if="!settingStore.isComm" class="warning">
|
||||
<a-alert type="warning" show-icon>
|
||||
<template #message>
|
||||
{{ t('certd.dashboard.alertMessage') }}
|
||||
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a>、
|
||||
<a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a>、
|
||||
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t('certd.dashboard.helpDoc') }}</a>
|
||||
{{ t("certd.dashboard.alertMessage") }}
|
||||
<a class="ml-5 flex-inline" href="https://gitee.com/certd/certd" target="_blank">gitee</a>、 <a class="ml-5 flex-inline" href="https://github.com/certd/certd" target="_blank">github</a>、
|
||||
<a class="ml-5 flex-inline" href="https://certd.docmirror.cn" target="_blank">{{ t("certd.dashboard.helpDoc") }}</a>
|
||||
</template>
|
||||
</a-alert>
|
||||
</div>
|
||||
@@ -75,14 +72,12 @@
|
||||
<statistic-card :title="t('certd.dashboard.pipelineCount')" :count="count.pipelineCount">
|
||||
<template v-if="count.pipelineCount === 0" #default>
|
||||
<div class="flex-center flex-1 flex-col">
|
||||
<div style="font-size: 18px; font-weight: 700">{{ t('certd.dashboard.noPipeline') }}</div>
|
||||
<fs-button type="primary" class="mt-10" icon="ion:add-circle-outline" @click="goPipeline">{{ t('certd.dashboard.createNow') }}</fs-button>
|
||||
<div style="font-size: 18px; font-weight: 700">{{ t("certd.dashboard.noPipeline") }}</div>
|
||||
<fs-button type="primary" class="mt-10" icon="ion:add-circle-outline" @click="goPipeline">{{ t("certd.dashboard.createNow") }}</fs-button>
|
||||
</div>
|
||||
</template>
|
||||
<template #footer>
|
||||
<router-link to="/certd/pipeline" class="flex">
|
||||
<fs-icon icon="ion:settings-outline" class="mr-5 fs-16" /> {{ t('certd.dashboard.managePipeline') }}
|
||||
</router-link>
|
||||
<router-link to="/certd/pipeline" class="flex"> <fs-icon icon="ion:settings-outline" class="mr-5 fs-16" /> {{ t("certd.dashboard.managePipeline") }} </router-link>
|
||||
</template>
|
||||
</statistic-card>
|
||||
</a-col>
|
||||
@@ -107,7 +102,7 @@
|
||||
<div v-if="pluginGroups" class="plugin-list">
|
||||
<a-card>
|
||||
<template #title>
|
||||
{{ t('certd.dashboard.supportedTasks') }}
|
||||
{{ t("certd.dashboard.supportedTasks") }}
|
||||
<a-tag color="green">{{ pluginGroups.groups.all.plugins.length }}</a-tag>
|
||||
</template>
|
||||
<a-row :gutter="10">
|
||||
@@ -136,7 +131,6 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { FsIcon } from "@fast-crud/fast-crud";
|
||||
import SimpleSteps from "/@/components/tutorial/simple-steps.vue";
|
||||
|
||||
@@ -36,9 +36,7 @@
|
||||
</span>
|
||||
<span>(<expires-time-text :value="item.expiresTime" />)</span>
|
||||
</a-tag>
|
||||
<div v-if="detail.suites?.length === 0" class="flex-o ml-5">
|
||||
暂无套餐 <a-button class="ml-5" type="primary" size="small" @click="goBuy">去购买</a-button>
|
||||
</div>
|
||||
<div v-if="detail.suites?.length === 0" class="flex-o ml-5">暂无套餐 <a-button class="ml-5" type="primary" size="small" @click="goBuy">去购买</a-button></div>
|
||||
</div>
|
||||
</a-popover>
|
||||
</div>
|
||||
@@ -54,7 +52,7 @@ import { FsIcon } from "@fast-crud/fast-crud";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
defineOptions({
|
||||
name: "SuiteCard"
|
||||
name: "SuiteCard",
|
||||
});
|
||||
|
||||
const detail = ref<SuiteDetail>({});
|
||||
@@ -68,7 +66,7 @@ loadSuiteDetail();
|
||||
const router = useRouter();
|
||||
function goBuy() {
|
||||
router.push({
|
||||
path: "/certd/suite/buy"
|
||||
path: "/certd/suite/buy",
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
<fs-page class="home—index bg-neutral-100 dark:bg-black">
|
||||
<!-- <page-content />-->
|
||||
<dashboard-user />
|
||||
<change-password-button
|
||||
ref="changePasswordButtonRef"
|
||||
:show-button="false"
|
||||
></change-password-button>
|
||||
<change-password-button ref="changePasswordButtonRef" :show-button="false"></change-password-button>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user