Merge pull request #76 from Learnware-LAMDA/perf(frontend)/admin_style_opt

Perf(frontend)/admin style opt
This commit is contained in:
AnnyTerfect 2023-11-01 11:41:06 +08:00 committed by GitHub
commit daab5b235d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 62 additions and 373 deletions

View File

@ -107,15 +107,16 @@ function handleClickSetRole(id: number, role: number): void {
<div class="title"> <div class="title">
<span class="small-title">Unverified: </span>{{ item.unverified_learnware_count }} <span class="small-title">Unverified: </span>{{ item.unverified_learnware_count }}
</div> </div>
<div class="title"> <div class="title flex">
<v-card-actions class="actions"> <span class="small-title mr-2">IsAdmin: </span>
<v-checkbox <v-checkbox
:model-value="item.role >= 1" class="title"
:disabled="!enableSetRole || item.email === 'admin@localhost'" :model-value="item.role >= 1"
class="title" :disabled="!enableSetRole || item.email === 'admin@localhost'"
@click="handleClickSetRole(item.id, item.role == 1 ? 0 : 1)" @click.prevent="handleClickSetRole(item.id, item.role == 1 ? 0 : 1)"
></v-checkbox> density="dense"
</v-card-actions> hide-details
></v-checkbox>
</div> </div>
</div> </div>
<v-card-actions class="actions"> <v-card-actions class="actions">
@ -158,7 +159,7 @@ function handleClickSetRole(id: number, role: number): void {
@apply grid sm: "grid-cols-[3fr,3fr,1fr,1fr,1fr]" w-1/1; @apply grid sm: "grid-cols-[3fr,3fr,1fr,1fr,1fr]" w-1/1;
.title { .title {
@apply xl: text-1rem lg:text-lg text-xs sm: (flex flex-col items-start justify-center); @apply xl: text-1rem lg:text-lg text-sm sm: (flex flex-col items-start justify-center);
.link { .link {
@apply underline; @apply underline;
} }

View File

@ -8,7 +8,7 @@ const Router = createRouter({
{ {
path: "/", path: "/",
name: "Summary", name: "Summary",
component: (): Promise<Component> => import("@/views/Summary.vue"), component: (): Promise<Component> => import("@admin/views/Summary.vue"),
meta: { meta: {
showInNavBar: true, showInNavBar: true,
icon: "mdi-eye", icon: "mdi-eye",
@ -17,7 +17,7 @@ const Router = createRouter({
{ {
path: "/alllearnware", path: "/alllearnware",
name: "Learnwares", name: "Learnwares",
component: (): Promise<Component> => import("@/views/Learnwares.vue"), component: (): Promise<Component> => import("@admin/views/Learnwares.vue"),
meta: { meta: {
showInNavBar: true, showInNavBar: true,
requiredLogin: true, requiredLogin: true,
@ -39,7 +39,7 @@ const Router = createRouter({
{ {
path: "/alluser", path: "/alluser",
name: "Users", name: "Users",
component: (): Promise<Component> => import("@/views/Users.vue"), component: (): Promise<Component> => import("@admin/views/Users.vue"),
meta: { meta: {
showInNavBar: true, showInNavBar: true,
requiredLogin: true, requiredLogin: true,
@ -79,7 +79,7 @@ const Router = createRouter({
{ {
path: "/login", path: "/login",
name: "Login", name: "Login",
component: (): Promise<Component> => import("@/views/Login.vue"), component: (): Promise<Component> => import("@admin/views/Login.vue"),
meta: { meta: {
showInNavBar: true, showInNavBar: true,
hideWhenLoggedIn: true, hideWhenLoggedIn: true,

View File

@ -7,7 +7,7 @@ import { fetchex } from "../utils/fetchex";
import { BACKEND_URL } from "@main/request"; import { BACKEND_URL } from "@main/request";
import UserRequirement from "@main/components/Search/UserRequirement.vue"; import UserRequirement from "@main/components/Search/UserRequirement.vue";
import PageLearnwareList from "@main/components/Learnware/PageLearnwareList.vue"; import PageLearnwareList from "@main/components/Learnware/PageLearnwareList.vue";
import ConfirmDialog from "@/components/Dialogs/ConfirmDialog.vue"; import ConfirmDialog from "@admin/components/Dialogs/ConfirmDialog.vue";
import type { Filter, LearnwareCardInfo } from "@beiming-system/types/learnware"; import type { Filter, LearnwareCardInfo } from "@beiming-system/types/learnware";
const display = useDisplay(); const display = useDisplay();
@ -227,9 +227,13 @@ function handleClickEdit(id: string): void {
} }
function handleClickDelete(id: string): void { function handleClickDelete(id: string): void {
dialog.value.confirm(); if (dialog.value) {
deleteId.value = id; dialog.value.confirm();
deleteName.value = (learnwareItems.value.find((item) => item.id === id) as { name: string }).name; deleteId.value = id;
deleteName.value = (
learnwareItems.value.find((item) => item.id === id) as { name: string }
).name;
}
} }
watch( watch(

View File

@ -5,7 +5,7 @@ import { useRouter } from "vue-router";
import { useField } from "@beiming-system/hooks"; import { useField } from "@beiming-system/hooks";
import { fetchex, hex_md5 } from "../utils"; import { fetchex, hex_md5 } from "../utils";
import { BACKEND_URL } from "@main/request"; import { BACKEND_URL } from "@main/request";
import collaborationImg from "@/assets/images/collaboration.svg?url"; import collaborationImg from "@admin/assets/images/collaboration.svg?url";
const store = useStore(); const store = useStore();

View File

@ -6,9 +6,9 @@ import { useRouter } from "vue-router";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import { fetchex, saveContentToFile } from "../utils"; import { fetchex, saveContentToFile } from "../utils";
import { BACKEND_URL } from "@main/request"; import { BACKEND_URL } from "@main/request";
import SuccessDialog from "@/components/Dialogs/SuccessDialog.vue"; import SuccessDialog from "@admin/components/Dialogs/SuccessDialog.vue";
import ConfirmDialog from "@/components/Dialogs/ConfirmDialog.vue"; import ConfirmDialog from "@admin/components/Dialogs/ConfirmDialog.vue";
import PageUserList from "@/components/User/PageUserList.vue"; import PageUserList from "@admin/components/User/PageUserList.vue";
import type { User, Filter } from "@beiming-system/types/user"; import type { User, Filter } from "@beiming-system/types/user";
const display = useDisplay(); const display = useDisplay();
@ -18,18 +18,18 @@ const router = useRouter();
const { t } = useI18n(); const { t } = useI18n();
const deleteDialog = ref<InstanceType<typeof ConfirmDialog>>(null); const deleteDialog = ref<InstanceType<typeof ConfirmDialog>>();
const deleteId = ref(""); const deleteId = ref("");
const deleteName = ref(""); const deleteName = ref("");
const resetDialog = ref<InstanceType<typeof ConfirmDialog>>(null); const resetDialog = ref<InstanceType<typeof ConfirmDialog>>();
const resetId = ref<string>(""); const resetId = ref<string>("");
const resetName = ref<string>(""); const resetName = ref<string>("");
const newPasswordDialog = ref<InstanceType<typeof SuccessDialog>>(null); const newPasswordDialog = ref<InstanceType<typeof SuccessDialog>>();
const newPassword = ref(""); const newPassword = ref("");
const setRoleDialog = ref<InstanceType<typeof ConfirmDialog>>(null); const setRoleDialog = ref<InstanceType<typeof ConfirmDialog>>();
const setRoleId = ref<number>(-1); const setRoleId = ref<number>(-1);
const setRoleRole = ref<number>(0); const setRoleRole = ref<number>(0);
const setRoleName = ref<string>(""); const setRoleName = ref<string>("");
@ -216,19 +216,22 @@ function handleClickReset(id: number): void {
} }
function handleClickDelete(id: number): void { function handleClickDelete(id: number): void {
deleteDialog.value.confirm(); if (deleteDialog.value) {
deleteId.value = String(id); deleteDialog.value.confirm();
const userName = userItems.value.find((item) => item.id === id)?.username; deleteId.value = String(id);
userName && (deleteName.value = userName); const userName = userItems.value.find((item) => item.id === id)?.username;
userName && (deleteName.value = userName);
}
} }
function handleClickSetRole(id: number, role: number): void { function handleClickSetRole(id: number, role: number): void {
setRoleDialog.value.confirm(); if (setRoleDialog.value) {
setRoleId.value = Number(id); setRoleDialog.value.confirm();
setRoleRole.value = Number(role); setRoleId.value = Number(id);
const userName = userItems.value.find((item) => item.id === id)?.username; setRoleRole.value = Number(role);
userName && (setRoleName.value = userName); const userName = userItems.value.find((item) => item.id === id)?.username;
fetchByFilterAndPage(filters.value, page.value); userName && (setRoleName.value = userName);
}
} }
function setRole(id: number, role: number): Promise<void> { function setRole(id: number, role: number): Promise<void> {

View File

@ -137,25 +137,6 @@ importers:
packages/main: {} packages/main: {}
packages/proxy:
dependencies:
commander:
specifier: ^11.1.0
version: registry.npmjs.org/commander@11.1.0
http:
specifier: 0.0.1-security
version: registry.npmjs.org/http@0.0.1-security
http-proxy:
specifier: ^1.18.1
version: registry.npmjs.org/http-proxy@1.18.1
devDependencies:
'@types/http-proxy':
specifier: ^1.17.13
version: registry.npmjs.org/@types/http-proxy@1.17.13
nodemon:
specifier: ^3.0.1
version: registry.npmjs.org/nodemon@3.0.1
packages/types: {} packages/types: {}
packages: packages:
@ -3602,22 +3583,6 @@ packages:
version: 1.4.15 version: 1.4.15
dev: false dev: false
registry.npmjs.org/@types/http-proxy@1.17.13:
resolution: {integrity: sha512-GkhdWcMNiR5QSQRYnJ+/oXzu0+7JJEPC8vkWXK351BkhjraZF+1W13CUYARUvX9+NqIU2n6YHA4iwywsc/M6Sw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.13.tgz}
name: '@types/http-proxy'
version: 1.17.13
dependencies:
'@types/node': registry.npmjs.org/@types/node@20.8.4
dev: true
registry.npmjs.org/@types/node@20.8.4:
resolution: {integrity: sha512-ZVPnqU58giiCjSxjVUESDtdPk4QR5WQhhINbc9UBrKLU68MX5BF6kbQzTrkwbolyr0X8ChBpXfavr5mZFKZQ5A==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/@types/node/-/node-20.8.4.tgz}
name: '@types/node'
version: 20.8.4
dependencies:
undici-types: registry.npmjs.org/undici-types@5.25.3
dev: true
registry.npmjs.org/@vue/compiler-core@3.3.5: registry.npmjs.org/@vue/compiler-core@3.3.5:
resolution: {integrity: sha512-S8Ma+eICI40Y4UotR+iKR729Bma+wERn/xLc+Jz203s5WIW1Sx3qoiONqXGg3Q4vBMa+QHDncULya19ZSJuhog==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.5.tgz} resolution: {integrity: sha512-S8Ma+eICI40Y4UotR+iKR729Bma+wERn/xLc+Jz203s5WIW1Sx3qoiONqXGg3Q4vBMa+QHDncULya19ZSJuhog==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.3.5.tgz}
name: '@vue/compiler-core' name: '@vue/compiler-core'
@ -3722,35 +3687,12 @@ packages:
version: 3.3.5 version: 3.3.5
dev: false dev: false
registry.npmjs.org/abbrev@1.1.1:
resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz}
name: abbrev
version: 1.1.1
dev: true
registry.npmjs.org/anymatch@3.1.3:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz}
name: anymatch
version: 3.1.3
engines: {node: '>= 8'}
dependencies:
normalize-path: registry.npmjs.org/normalize-path@3.0.0
picomatch: registry.npmjs.org/picomatch@2.3.1
dev: true
registry.npmjs.org/balanced-match@1.0.2: registry.npmjs.org/balanced-match@1.0.2:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz} resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz}
name: balanced-match name: balanced-match
version: 1.0.2 version: 1.0.2
dev: true dev: true
registry.npmjs.org/binary-extensions@2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz}
name: binary-extensions
version: 2.2.0
engines: {node: '>=8'}
dev: true
registry.npmjs.org/brace-expansion@1.1.11: registry.npmjs.org/brace-expansion@1.1.11:
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz} resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz}
name: brace-expansion name: brace-expansion
@ -3768,39 +3710,6 @@ packages:
balanced-match: registry.npmjs.org/balanced-match@1.0.2 balanced-match: registry.npmjs.org/balanced-match@1.0.2
dev: true dev: true
registry.npmjs.org/braces@3.0.2:
resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/braces/-/braces-3.0.2.tgz}
name: braces
version: 3.0.2
engines: {node: '>=8'}
dependencies:
fill-range: registry.npmjs.org/fill-range@7.0.1
dev: true
registry.npmjs.org/chokidar@3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz}
name: chokidar
version: 3.5.3
engines: {node: '>= 8.10.0'}
dependencies:
anymatch: registry.npmjs.org/anymatch@3.1.3
braces: registry.npmjs.org/braces@3.0.2
glob-parent: registry.npmjs.org/glob-parent@5.1.2
is-binary-path: registry.npmjs.org/is-binary-path@2.1.0
is-glob: registry.npmjs.org/is-glob@4.0.3
normalize-path: registry.npmjs.org/normalize-path@3.0.0
readdirp: registry.npmjs.org/readdirp@3.6.0
optionalDependencies:
fsevents: registry.npmjs.org/fsevents@2.3.3
dev: true
registry.npmjs.org/commander@11.1.0:
resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/commander/-/commander-11.1.0.tgz}
name: commander
version: 11.1.0
engines: {node: '>=16'}
dev: false
registry.npmjs.org/commander@4.1.1: registry.npmjs.org/commander@4.1.1:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/commander/-/commander-4.1.1.tgz} resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/commander/-/commander-4.1.1.tgz}
name: commander name: commander
@ -3834,21 +3743,6 @@ packages:
version: 3.1.2 version: 3.1.2
dev: false dev: false
registry.npmjs.org/debug@3.2.7(supports-color@5.5.0):
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/debug/-/debug-3.2.7.tgz}
id: registry.npmjs.org/debug/3.2.7
name: debug
version: 3.2.7
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: registry.npmjs.org/ms@2.1.3
supports-color: registry.npmjs.org/supports-color@5.5.0
dev: true
registry.npmjs.org/debug@4.3.4: registry.npmjs.org/debug@4.3.4:
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/debug/-/debug-4.3.4.tgz} resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/debug/-/debug-4.3.4.tgz}
name: debug name: debug
@ -3869,33 +3763,6 @@ packages:
version: 2.0.2 version: 2.0.2
dev: false dev: false
registry.npmjs.org/eventemitter3@4.0.7:
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz}
name: eventemitter3
version: 4.0.7
dev: false
registry.npmjs.org/fill-range@7.0.1:
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz}
name: fill-range
version: 7.0.1
engines: {node: '>=8'}
dependencies:
to-regex-range: registry.npmjs.org/to-regex-range@5.0.1
dev: true
registry.npmjs.org/follow-redirects@1.15.3:
resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz}
name: follow-redirects
version: 1.15.3
engines: {node: '>=4.0'}
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
dev: false
registry.npmjs.org/fsevents@2.3.3: registry.npmjs.org/fsevents@2.3.3:
resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz} resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz}
name: fsevents name: fsevents
@ -3906,15 +3773,6 @@ packages:
dev: true dev: true
optional: true optional: true
registry.npmjs.org/glob-parent@5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz}
name: glob-parent
version: 5.1.2
engines: {node: '>= 6'}
dependencies:
is-glob: registry.npmjs.org/is-glob@4.0.3
dev: true
registry.npmjs.org/graceful-fs@4.2.11: registry.npmjs.org/graceful-fs@4.2.11:
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz} resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz}
name: graceful-fs name: graceful-fs
@ -3930,72 +3788,6 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
dev: true dev: true
registry.npmjs.org/http-proxy@1.18.1:
resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz}
name: http-proxy
version: 1.18.1
engines: {node: '>=8.0.0'}
dependencies:
eventemitter3: registry.npmjs.org/eventemitter3@4.0.7
follow-redirects: registry.npmjs.org/follow-redirects@1.15.3
requires-port: registry.npmjs.org/requires-port@1.0.0
transitivePeerDependencies:
- debug
dev: false
registry.npmjs.org/http@0.0.1-security:
resolution: {integrity: sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/http/-/http-0.0.1-security.tgz}
name: http
version: 0.0.1-security
dev: false
registry.npmjs.org/ignore-by-default@1.0.1:
resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz}
name: ignore-by-default
version: 1.0.1
dev: true
registry.npmjs.org/is-binary-path@2.1.0:
resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz}
name: is-binary-path
version: 2.1.0
engines: {node: '>=8'}
dependencies:
binary-extensions: registry.npmjs.org/binary-extensions@2.2.0
dev: true
registry.npmjs.org/is-extglob@2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz}
name: is-extglob
version: 2.1.1
engines: {node: '>=0.10.0'}
dev: true
registry.npmjs.org/is-glob@4.0.3:
resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz}
name: is-glob
version: 4.0.3
engines: {node: '>=0.10.0'}
dependencies:
is-extglob: registry.npmjs.org/is-extglob@2.1.1
dev: true
registry.npmjs.org/is-number@7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz}
name: is-number
version: 7.0.0
engines: {node: '>=0.12.0'}
dev: true
registry.npmjs.org/lru-cache@6.0.0:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz}
name: lru-cache
version: 6.0.0
engines: {node: '>=10'}
dependencies:
yallist: registry.npmjs.org/yallist@4.0.0
dev: true
registry.npmjs.org/magic-string@0.30.5: registry.npmjs.org/magic-string@0.30.5:
resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz} resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz}
name: magic-string name: magic-string
@ -4019,12 +3811,6 @@ packages:
version: 2.1.2 version: 2.1.2
dev: true dev: true
registry.npmjs.org/ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/ms/-/ms-2.1.3.tgz}
name: ms
version: 2.1.3
dev: true
registry.npmjs.org/nanoid@3.3.6: registry.npmjs.org/nanoid@3.3.6:
resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz} resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz}
name: nanoid name: nanoid
@ -4033,54 +3819,12 @@ packages:
hasBin: true hasBin: true
dev: false dev: false
registry.npmjs.org/nodemon@3.0.1:
resolution: {integrity: sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz}
name: nodemon
version: 3.0.1
engines: {node: '>=10'}
hasBin: true
dependencies:
chokidar: registry.npmjs.org/chokidar@3.5.3
debug: registry.npmjs.org/debug@3.2.7(supports-color@5.5.0)
ignore-by-default: registry.npmjs.org/ignore-by-default@1.0.1
minimatch: registry.npmjs.org/minimatch@3.1.2
pstree.remy: registry.npmjs.org/pstree.remy@1.1.8
semver: registry.npmjs.org/semver@7.5.4
simple-update-notifier: registry.npmjs.org/simple-update-notifier@2.0.0
supports-color: registry.npmjs.org/supports-color@5.5.0
touch: registry.npmjs.org/touch@3.1.0
undefsafe: registry.npmjs.org/undefsafe@2.0.5
dev: true
registry.npmjs.org/nopt@1.0.10:
resolution: {integrity: sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz}
name: nopt
version: 1.0.10
hasBin: true
dependencies:
abbrev: registry.npmjs.org/abbrev@1.1.1
dev: true
registry.npmjs.org/normalize-path@3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz}
name: normalize-path
version: 3.0.0
engines: {node: '>=0.10.0'}
dev: true
registry.npmjs.org/picocolors@1.0.0: registry.npmjs.org/picocolors@1.0.0:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz} resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz}
name: picocolors name: picocolors
version: 1.0.0 version: 1.0.0
dev: false dev: false
registry.npmjs.org/picomatch@2.3.1:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz}
name: picomatch
version: 2.3.1
engines: {node: '>=8.6'}
dev: true
registry.npmjs.org/postcss@8.4.31: registry.npmjs.org/postcss@8.4.31:
resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz} resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz}
name: postcss name: postcss
@ -4092,46 +3836,6 @@ packages:
source-map-js: registry.npmjs.org/source-map-js@1.0.2 source-map-js: registry.npmjs.org/source-map-js@1.0.2
dev: false dev: false
registry.npmjs.org/pstree.remy@1.1.8:
resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.8.tgz}
name: pstree.remy
version: 1.1.8
dev: true
registry.npmjs.org/readdirp@3.6.0:
resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz}
name: readdirp
version: 3.6.0
engines: {node: '>=8.10.0'}
dependencies:
picomatch: registry.npmjs.org/picomatch@2.3.1
dev: true
registry.npmjs.org/requires-port@1.0.0:
resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz}
name: requires-port
version: 1.0.0
dev: false
registry.npmjs.org/semver@7.5.4:
resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/semver/-/semver-7.5.4.tgz}
name: semver
version: 7.5.4
engines: {node: '>=10'}
hasBin: true
dependencies:
lru-cache: registry.npmjs.org/lru-cache@6.0.0
dev: true
registry.npmjs.org/simple-update-notifier@2.0.0:
resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz}
name: simple-update-notifier
version: 2.0.0
engines: {node: '>=10'}
dependencies:
semver: registry.npmjs.org/semver@7.5.4
dev: true
registry.npmjs.org/source-map-js@1.0.2: registry.npmjs.org/source-map-js@1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz} resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz}
name: source-map-js name: source-map-js
@ -4155,36 +3859,6 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
dev: false dev: false
registry.npmjs.org/to-regex-range@5.0.1:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz}
name: to-regex-range
version: 5.0.1
engines: {node: '>=8.0'}
dependencies:
is-number: registry.npmjs.org/is-number@7.0.0
dev: true
registry.npmjs.org/touch@3.1.0:
resolution: {integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/touch/-/touch-3.1.0.tgz}
name: touch
version: 3.1.0
hasBin: true
dependencies:
nopt: registry.npmjs.org/nopt@1.0.10
dev: true
registry.npmjs.org/undefsafe@2.0.5:
resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz}
name: undefsafe
version: 2.0.5
dev: true
registry.npmjs.org/undici-types@5.25.3:
resolution: {integrity: sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz}
name: undici-types
version: 5.25.3
dev: true
registry.npmjs.org/vue@3.3.5(typescript@5.2.2): registry.npmjs.org/vue@3.3.5(typescript@5.2.2):
resolution: {integrity: sha512-xYpLEGb25yYU1ul9ZhCcavNZ4YW6PS7YTDdDAd0yc/3w69Tra2BwY4EpKguKddfD56QApXQ17XHq+fJJwEP+UQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/vue/-/vue-3.3.5.tgz} resolution: {integrity: sha512-xYpLEGb25yYU1ul9ZhCcavNZ4YW6PS7YTDdDAd0yc/3w69Tra2BwY4EpKguKddfD56QApXQ17XHq+fJJwEP+UQ==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/vue/-/vue-3.3.5.tgz}
id: registry.npmjs.org/vue/3.3.5 id: registry.npmjs.org/vue/3.3.5
@ -4203,9 +3877,3 @@ packages:
'@vue/shared': registry.npmjs.org/@vue/shared@3.3.5 '@vue/shared': registry.npmjs.org/@vue/shared@3.3.5
typescript: 5.2.2 typescript: 5.2.2
dev: false dev: false
registry.npmjs.org/yallist@4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==, registry: https://registry.npmjs.com/, tarball: https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz}
name: yallist
version: 4.0.0
dev: true

View File

@ -1 +0,0 @@
declare module "*.vue";

5
frontend/shim.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
declare module "*.vue" {
import { ComponentOptions } from "vue";
const componentOptions: ComponentOptions;
export default componentOptions;
}

View File

@ -1,14 +1,16 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext", "module": "ESNext",
"target": "es2020", "lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": ["DOM", "ESNext"],
"types": ["vite/client", "node"], "types": ["vite/client", "node"],
"strictNullChecks": true, "strictNullChecks": true,
"esModuleInterop": true, "esModuleInterop": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"skipLibCheck": true, "skipLibCheck": true,
"paths": { "paths": {
"@main": ["./packages/main/src"], "@main": ["./packages/main/src"],
"@main/*": ["./packages/main/src/*"], "@main/*": ["./packages/main/src/*"],
@ -17,7 +19,7 @@
"@beiming-system/hooks": ["./packages/hooks/src/index.ts"], "@beiming-system/hooks": ["./packages/hooks/src/index.ts"],
"@beiming-system/types": ["./packages/types/src/index.ts"], "@beiming-system/types": ["./packages/types/src/index.ts"],
"@beiming-system/types/*": ["./packages/types/src/*"], "@beiming-system/types/*": ["./packages/types/src/*"],
"@beiming-system/locale": ["./packages/locale/src/index.ts"], "@beiming-system/locale": ["./packages/locale/src/index.ts"]
}, },
/* Bundler mode */ /* Bundler mode */
@ -33,6 +35,12 @@
"noUnusedParameters": true, "noUnusedParameters": true,
"noFallthroughCasesInSwitch": true "noFallthroughCasesInSwitch": true
}, },
"include": ["./*.ts", "./packages/**/*.ts", "./packages/**/*.vue"], "include": [
"./*.ts",
"./*.d.ts",
"./packages/**/*.ts",
"./packages/**/*.d.ts",
"./packages/**/*.vue"
],
"exclude": ["**/dist/**", "node_modules", "**/node_modules", "**/encrypt.ts"] "exclude": ["**/dist/**", "node_modules", "**/node_modules", "**/encrypt.ts"]
} }

1
frontend/vite-env.d.ts vendored Normal file
View File

@ -0,0 +1 @@
/// <reference types="vite/client" />