mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-11-28 23:25:01 +08:00
Merge remote-tracking branch 'origin/3.1-dev' into 3.1-dev
This commit is contained in:
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
@@ -3,12 +3,6 @@ name: Build Docker
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
tags:
|
||||
- '\d+\.\d+\.\d+'
|
||||
- '\d+\.\d+'
|
||||
- '\d+\.\d+\.\d+-beta\d+'
|
||||
- '\d+\.\d+-beta\d+'
|
||||
- '\d+\.\d+-alpha\d+'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -31,6 +25,9 @@ jobs:
|
||||
pytest
|
||||
|
||||
build-webui:
|
||||
if: >
|
||||
(github.event_name == 'pull_request') ||
|
||||
(github.event_name == 'push' && github.ref_type == 'tag' && (contains(github.ref, 'alpha') || contains(github.ref, 'beta')))
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test]
|
||||
steps:
|
||||
@@ -63,7 +60,7 @@ jobs:
|
||||
|
||||
build-docker:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test, build-webui]
|
||||
needs: [build-webui]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -146,10 +143,10 @@ jobs:
|
||||
cache-to: type=gha, scope=${{ github.workflow }}
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true }}
|
||||
|| ${{ github.event_name == 'push' && contains(github.ref, 'tags') }}
|
||||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true) ||
|
||||
(github.event_name == 'push' && contains(github.ref, 'tags'))
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build-docker ]
|
||||
steps:
|
||||
|
||||
@@ -201,4 +198,4 @@ jobs:
|
||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
message: |
|
||||
New release: ${{ github.event.release.title }}
|
||||
Link: ${{ github.event.release.html_url }}
|
||||
Link: ${{ github.event.release.html_url }}
|
||||
|
||||
@@ -36,14 +36,16 @@ RUN apk add --no-cache \
|
||||
sed -i '/bcrypt/d' requirements.txt && \
|
||||
pip install --no-cache-dir -r requirements.txt && \
|
||||
# Unzip WebUI \
|
||||
unzip dist.zip -d /app/templates && \
|
||||
unzip dist.zip && \
|
||||
mv dist templates && \
|
||||
# Add user
|
||||
addgroup -S ab -g 911 && \
|
||||
adduser -S ab -G ab -h /ab -s /bin/bash -u 911 && \
|
||||
# Clear
|
||||
rm -rf \
|
||||
/root/.cache \
|
||||
/tmp/*
|
||||
/tmp/* \
|
||||
/app/dist.zip
|
||||
|
||||
COPY --chmod=755 backend/src/. .
|
||||
COPY --chmod=755 backend/src/docker /
|
||||
|
||||
4
webui/.husky/pre-commit
Normal file
4
webui/.husky/pre-commit
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
cd ./webui && pnpm run lint:fix && pnpm run format
|
||||
@@ -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
15
webui/pnpm-lock.yaml
generated
@@ -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'}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
Format,
|
||||
Me,
|
||||
Pause,
|
||||
PlayOne,
|
||||
Power,
|
||||
Refresh,
|
||||
Format,
|
||||
} from '@icon-park/vue-next';
|
||||
|
||||
const search = ref('');
|
||||
|
||||
@@ -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>[] = [
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user