Merge branch 'EstrellaXD:3.1-dev' into 3.1-dev

This commit is contained in:
umbor
2023-06-12 12:36:42 +08:00
committed by GitHub
7 changed files with 26 additions and 6 deletions

4
webui/.husky/pre-commit Normal file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
cd ./webui && pnpm run lint:fix && pnpm run format

View File

@@ -4,6 +4,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"prepare": "cd .. && husky install ./webui/.husky",
"build": "vue-tsc --noEmit && vite build",
"dev": "vite",
"format": "prettier --write .",
@@ -45,6 +46,7 @@
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-storybook": "^0.6.12",
"husky": "^8.0.3",
"prettier": "^2.8.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",

9
webui/pnpm-lock.yaml generated
View File

@@ -88,6 +88,9 @@ devDependencies:
eslint-plugin-storybook:
specifier: ^0.6.12
version: 0.6.12(eslint@8.41.0)(typescript@4.9.5)
husky:
specifier: ^8.0.3
version: 8.0.3
prettier:
specifier: ^2.8.8
version: 2.8.8
@@ -6222,6 +6225,12 @@ packages:
engines: {node: '>=10.17.0'}
dev: true
/husky@8.0.3:
resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==}
engines: {node: '>=14'}
hasBin: true
dev: true
/iconv-lite@0.4.24:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}

View File

@@ -31,10 +31,10 @@ watch(show, (val) => {
}
});
const showDeleteFileDialog = (type: 'disable' | 'delete') => {
function showDeleteFileDialog(type: 'disable' | 'delete') {
deleteFileDialog.show = true;
deleteFileDialog.type = type;
};
}
const close = () => (show.value = false);

View File

@@ -1,11 +1,11 @@
<script lang="ts" setup>
import {
Format,
Me,
Pause,
PlayOne,
Power,
Refresh,
Format,
} from '@icon-park/vue-next';
import { useI18n } from 'vue-i18n';
const { t, locale } = useI18n({ useScope: 'global' });

View File

@@ -7,7 +7,12 @@ const { t } = useI18n({ useScope: 'global' });
const { getSettingGroup } = useConfigStore();
const notification = getSettingGroup('notification');
const notificationType: NotificationType = ['telegram', 'server-chan', 'bark', 'wecom'];
const notificationType: NotificationType = [
'telegram',
'server-chan',
'bark',
'wecom',
];
const items: SettingItem<Notification>[] = [
{

View File

@@ -12,11 +12,11 @@ export type ApiErrorMessage = AuthError | LoginError;
*/
export type StatusCode = 401 | 404 | 406 | 500;
export type ApiError = {
export interface ApiError {
status: StatusCode;
detail: ApiErrorMessage;
msg: string;
};
}
export interface ApiSuccess {
msg: string;