Skip to content

Commit

Permalink
fix: 修复漏洞
Browse files Browse the repository at this point in the history
  • Loading branch information
SilianZ committed Oct 26, 2024
1 parent 47e0c5f commit 24a0bcd
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 31 deletions.
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
sizes="16x16"
href="/src/assets/favicon-16x16.png"
/>
<link rel="manifest" href="/src/assets/site.webmanifest" />
<link
rel="mask-icon"
href="/src/assets/safari-pinned-tab.svg"
Expand Down
32 changes: 30 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@primevue/themes": "^4.0.7",
"@vercel/analytics": "^1.3.2",
"axios": "^1.7.7",
"cos-js-sdk-v5": "^1.8.4",
"postcss-load-config": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Select from "primevue/select";
import "./styles/styles.css";
import { useI18n } from "vue-i18n";
const sha = process.env.VERCEL_GIT_COMMIT_SHA?.slice(0, 5)
const sha = process.env.VERCEL_GIT_COMMIT_SHA?.slice(0, 5);
const { t, locale } = useI18n();
Expand Down
5 changes: 4 additions & 1 deletion src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import axios, { isAxiosError } from "axios";
import COS, { Credentials } from "cos-js-sdk-v5";

axios.defaults.baseURL = process.env.VERCEL_ENV == "production" ? "https://api.hfiuc.org" : "http://120.24.212.59/"
axios.defaults.baseURL =
process.env.VERCEL_ENV == "production"
? "https://api.hfiuc.org"
: "http://120.24.212.59/";

export interface ApplicationInfo {
class: string;
Expand Down
Binary file removed src/assets/android-chrome-192x192.png
Binary file not shown.
Binary file removed src/assets/android-chrome-512x512.png
Binary file not shown.
19 changes: 0 additions & 19 deletions src/assets/site.webmanifest

This file was deleted.

2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ToastService from "primevue/toastservice";
import Tooltip from "primevue/tooltip";
import { Vio } from "./styles/theme";
import { createI18n } from "vue-i18n";
import { inject } from "@vercel/analytics";
import en_us from "./assets/i18n/en_us.json";
import zh_cn from "./assets/i18n/zh_cn.json";
import zh_ms from "./assets/i18n/zh_ms.json";
Expand All @@ -25,6 +26,7 @@ const i18n = createI18n({
ko_kr,
},
});
inject();
app.use(i18n);
app.use(router);
app.use(ToastService);
Expand Down
16 changes: 9 additions & 7 deletions src/views/ReservationsManagementView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ const { data: booking } = useRequest(
{ pollingInterval: 3000 },
);
const bookingData = computed(() => booking.value?.data.filter((item) => item.auth !== "no") || []);
const bookingData = computed(
() => booking.value?.data.filter((item) => item.auth !== "no") || [],
);
const formatDate = (time: string) => {
const startTime = time.split("-")[0];
Expand Down Expand Up @@ -115,17 +117,17 @@ const onRejectEvent = () => {
visible.value = false;
};
const status: Ref<{ [key: string]: string}> = computed(() => ({
const status: Ref<{ [key: string]: string }> = computed(() => ({
non: t("reservation.card.tag.pending"),
no: t("reservation.card.tag.rejected"),
yes: t("reservation.card.tag.approved")
}))
yes: t("reservation.card.tag.approved"),
}));
const severity: { [key: string]: string}= {
const severity: { [key: string]: string } = {
non: "info",
no: "error",
yes: "success"
}
yes: "success",
};
const roomMapping: { [key: number]: string } = {
101: "iStudy Meeting Room 1",
Expand Down

0 comments on commit 24a0bcd

Please sign in to comment.