Merge remote-tracking branch 'origin/3.1-dev' into 3.1-dev

This commit is contained in:
estrella
2023-06-12 22:11:56 +08:00
7 changed files with 31 additions and 7 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 .",
@@ -43,6 +44,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",

15
webui/pnpm-lock.yaml generated
View File

@@ -1,4 +1,8 @@
lockfileVersion: '6.0'
lockfileVersion: '6.1'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
'@headlessui/vue':
@@ -78,6 +82,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
@@ -6078,6 +6085,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

@@ -29,10 +29,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';
const search = ref('');

View File

@@ -5,7 +5,12 @@ import type { SettingItem } from '#/components';
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;