mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
pref: 优化插件store
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, Ref } from "vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { SiteInfo } from "/@/api/modules/api.basic";
|
||||
|
||||
const version = ref(import.meta.env.VITE_APP_VERSION);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { LocalStorage } from "/@/utils/util.storage";
|
||||
export async function GetStatisticCount() {
|
||||
return await request({
|
||||
url: "/statistic/count",
|
||||
method: "POST"
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export async function GetLatestVersion() {
|
||||
const res = await request({
|
||||
url: "/app/latest",
|
||||
method: "GET",
|
||||
unpack: true
|
||||
unpack: true,
|
||||
});
|
||||
try {
|
||||
const latest = res;
|
||||
|
||||
@@ -125,23 +125,22 @@
|
||||
<script lang="ts" setup>
|
||||
import { FsIcon } from "@fast-crud/fast-crud";
|
||||
import SimpleSteps from "/@/components/tutorial/simple-steps.vue";
|
||||
import { useUserStore } from "/@/store/modules/user";
|
||||
import { useUserStore } from "/@/store/user";
|
||||
import { computed, ComputedRef, onMounted, Ref, ref } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
import StatisticCard from "/@/views/framework/home/dashboard/statistic-card.vue";
|
||||
import * as pluginApi from "/@/views/certd/pipeline/api.plugin";
|
||||
import { PluginGroups } from "/@/views/certd/pipeline/pipeline/type";
|
||||
import TutorialButton from "/@/components/tutorial/index.vue";
|
||||
import DayCount from "./charts/day-count.vue";
|
||||
import PieCount from "./charts/pie-count.vue";
|
||||
import ExpiringList from "./charts/expiring-list.vue";
|
||||
import SuiteCard from "./suite-card.vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { SiteInfo } from "/@/api/modules/api.basic";
|
||||
import { UserInfoRes } from "/@/api/modules/api.user";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { SiteInfo } from "/@/store/settings/api.basic";
|
||||
import { UserInfoRes } from "/@/store/user/api.user";
|
||||
import { GetStatisticCount } from "/@/views/framework/home/dashboard/api";
|
||||
import { useRouter } from "vue-router";
|
||||
import * as api from "./api";
|
||||
import { usePluginStore } from "/@/store/plugin";
|
||||
defineOptions({
|
||||
name: "DashboardUser",
|
||||
});
|
||||
@@ -227,9 +226,10 @@ async function loadCount() {
|
||||
});
|
||||
}
|
||||
|
||||
const pluginStore = usePluginStore();
|
||||
async function loadPluginGroups() {
|
||||
const groups = await pluginApi.GetGroups({});
|
||||
pluginGroups.value = new PluginGroups(groups);
|
||||
const groups = await pluginStore.getGroups();
|
||||
pluginGroups.value = groups;
|
||||
}
|
||||
|
||||
const pluginGroups = ref();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import DashboardUser from "./dashboard/index.vue";
|
||||
import { useUserStore } from "/@/store/modules/user";
|
||||
import { useUserStore } from "/@/store/user";
|
||||
import ChangePasswordButton from "/@/views/certd/mine/change-password-button.vue";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { Modal } from "ant-design-vue";
|
||||
|
||||
@@ -67,8 +67,8 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive, ref, toRaw } from "vue";
|
||||
import { useUserStore } from "/src/store/modules/user";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { useUserStore } from "/src/store/user";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { utils } from "@fast-crud/fast-crud";
|
||||
import ImageCode from "/@/views/framework/login/image-code.vue";
|
||||
import SmsCode from "/@/views/framework/login/sms-code.vue";
|
||||
|
||||
@@ -87,11 +87,11 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive, ref, toRaw } from "vue";
|
||||
import { useUserStore } from "/src/store/modules/user";
|
||||
import { useUserStore } from "/src/store/user";
|
||||
import { utils } from "@fast-crud/fast-crud";
|
||||
import ImageCode from "/@/views/framework/login/image-code.vue";
|
||||
import EmailCode from "./email-code.vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
import { useSettingStore } from "/@/store/settings";
|
||||
import { notification } from "ant-design-vue";
|
||||
export default defineComponent({
|
||||
name: "RegisterPage",
|
||||
|
||||
Reference in New Issue
Block a user