mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-01-24 15:14:01 +08:00
Feat: optimize code
This commit is contained in:
parent
6ba705e2a7
commit
28ce9646db
@ -3,7 +3,6 @@ import dayjs from "dayjs";
|
||||
import { onUnmounted } from "vue";
|
||||
import { onMounted } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
|
||||
defineProps<{
|
||||
date: string;
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { initI18n, initInstallPageFlow, toStandardLang } from "@/lang/i18n";
|
||||
import { initI18n } from "@/lang/i18n";
|
||||
import { useAppStateStore } from "./stores/useAppStateStore";
|
||||
import { panelStatus } from "./services/apis";
|
||||
import { initLayoutConfig } from "./services/layout";
|
||||
|
||||
(async function () {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { message } from "ant-design-vue";
|
||||
import { reportError } from "@/tools/validator";
|
||||
import type { IPanelResponseProtocol } from "./../../../common/global.d";
|
||||
import { useAppStateStore } from "@/stores/useAppStateStore";
|
||||
|
@ -2,7 +2,7 @@ import { createGlobalState } from "@vueuse/core";
|
||||
import { overviewInfo } from "./apis";
|
||||
|
||||
export const useAppToolsStore = createGlobalState(() => {
|
||||
const { execute, state } = overviewInfo();
|
||||
const { state } = overviewInfo();
|
||||
|
||||
return {
|
||||
overviewData: state
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { createGlobalState } from "@vueuse/core";
|
||||
import { reactive } from "vue";
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import { t } from "@/lang/i18n";
|
||||
export const CARD_FIXED_HEIGHT = 200;
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import type {
|
||||
IGlobalInstanceConfig,
|
||||
ILayoutCard as GlobalLayoutCard,
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
declare module "vue-i18n-t" {
|
||||
export function createI18n(option: any): any;
|
||||
export function useI18n(option: any): { t: (t: string) => string };
|
||||
|
@ -3,7 +3,6 @@ import { onMounted, ref, reactive } from "vue";
|
||||
import CardPanel from "@/components/CardPanel.vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
import { panelInstall } from "@/services/apis";
|
||||
import { message } from "ant-design-vue";
|
||||
import { reportError } from "@/tools/validator";
|
||||
import type { FormInstance } from "ant-design-vue";
|
||||
import { useAppRouters } from "@/hooks/useAppRouters";
|
||||
|
@ -87,6 +87,7 @@ const loginSuccess = () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
<div
|
||||
:class="{
|
||||
logging: loginStep === 1,
|
||||
@ -137,7 +138,6 @@ const loginSuccess = () => {
|
||||
|
||||
<div class="mt-24 flex-between align-center">
|
||||
<div class="mcsmanager-link">
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<div
|
||||
v-if="pageInfoResult?.loginInfo"
|
||||
class="global-markdown-html"
|
||||
@ -187,8 +187,6 @@ const loginSuccess = () => {
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.loginDone {
|
||||
}
|
||||
.logging {
|
||||
.login-panel {
|
||||
transform: scale(0.96);
|
||||
|
@ -2,7 +2,6 @@
|
||||
import { ref, computed } from "vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
import { useScreen } from "@/hooks/useScreen";
|
||||
import { message } from "ant-design-vue";
|
||||
import { reportError } from "@/tools/validator";
|
||||
import { buildProgress } from "@/services/apis/envImage";
|
||||
import Loading from "@/components/Loading.vue";
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { reactive, onMounted } from "vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
import { message, notification } from "ant-design-vue";
|
||||
import { notification } from "ant-design-vue";
|
||||
import { imageList } from "@/services/apis/envImage";
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from "vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
import { message } from "ant-design-vue";
|
||||
import { reportError } from "@/tools/validator";
|
||||
import CardPanel from "@/components/CardPanel.vue";
|
||||
import BetweenMenus from "@/components/BetweenMenus.vue";
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { t } from "@/lang/i18n";
|
||||
import type { LayoutCard } from "@/types";
|
||||
import { useScreen } from "@/hooks/useScreen";
|
||||
|
@ -4,7 +4,6 @@ import { t } from "@/lang/i18n";
|
||||
import CardPanel from "@/components/CardPanel.vue";
|
||||
import type { LayoutCard } from "@/types/index";
|
||||
import { message } from "ant-design-vue";
|
||||
import { reportError } from "@/tools/validator";
|
||||
import {
|
||||
CheckCircleOutlined,
|
||||
ExclamationCircleOutlined,
|
||||
|
@ -5,15 +5,16 @@ import { message } from "ant-design-vue";
|
||||
import { reportError } from "@/tools/validator";
|
||||
import Editor from "@/components/Editor.vue";
|
||||
import { fileContent } from "@/services/apis/fileManager";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const open = ref(false);
|
||||
const openEditor = ref(false);
|
||||
const editorText = ref("");
|
||||
const fileName = ref("");
|
||||
const path = ref("");
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let resolve: (t: string) => void;
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let reject: (e: Error) => void;
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -1,3 +1,4 @@
|
||||
<!-- eslint-disable no-unused-vars -->
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { $t as t } from "@/lang/i18n";
|
||||
@ -5,7 +6,6 @@ import CardPanel from "@/components/CardPanel.vue";
|
||||
import { useLayoutContainerStore } from "@/stores/useLayoutContainerStore";
|
||||
import { useLayoutCardTools } from "@/hooks/useCardTools";
|
||||
import type { LayoutCard } from "@/types/index";
|
||||
import { markdownToHTML } from "../../tools/safe";
|
||||
|
||||
enum EDIT_MODE {
|
||||
PREVIEW = "PREVIEW",
|
||||
|
Loading…
Reference in New Issue
Block a user