Skip to content

Commit

Permalink
Merge branch 'Rewrite0/Auto_Bangumi_WebUI@dc95c1a' into Auto_Bangumi …
Browse files Browse the repository at this point in the history
…dev/webui
  • Loading branch information
zthxxx committed Jun 7, 2023
2 parents 069a86f + 684e124 commit 82689cf
Show file tree
Hide file tree
Showing 99 changed files with 14,061 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/dist
8 changes: 8 additions & 0 deletions webui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["@antfu", "prettier", "plugin:storybook/recommended"],
"rules": {
"antfu/if-newline": ["off"],
"no-console": ["off"],
"vue/custom-event-name-casing": ["off"]
}
}
39 changes: 39 additions & 0 deletions webui/.github/workflows/create-release-draft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create Release Draft

on:
push:
tags:
- 'v*.*.*'

permissions:
contents: write
discussions: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: latest

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: latest
run_install: true

- name: Build
run: pnpm build && zip -r dist.zip dist

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: dist.zip
25 changes: 25 additions & 0 deletions webui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist.zip
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
1 change: 1 addition & 0 deletions webui/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public-hoist-pattern[]=@vue/runtime-core
6 changes: 6 additions & 0 deletions webui/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/build
/dist
/pnpm-lock.yaml
auto-imports.d.ts
components.d.ts
router-type.d.ts
3 changes: 3 additions & 0 deletions webui/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
24 changes: 24 additions & 0 deletions webui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { StorybookConfig } from '@storybook/vue3-vite';
import Unocss from 'unocss/vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/vue3-vite',
options: {},
},
docs: {
autodocs: 'tag',
},
viteFinal(config) {
config.plugins?.push(Unocss());
// Add other configuration here depending on your use case
return config;
},
};
export default config;
17 changes: 17 additions & 0 deletions webui/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { Preview } from '@storybook/vue3';
import '@unocss/reset/tailwind-compat.css';
import 'uno.css';

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};

export default preview;
3 changes: 3 additions & 0 deletions webui/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
21 changes: 21 additions & 0 deletions webui/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Rewrite0

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions webui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Auto_Bangumi_WebUI

使用 Vue3 + TypeScript 构建的 [Auto_Bangumi](https://github.com/EstrellaXD/Auto_Bangumi) 的 WebUI
14 changes: 14 additions & 0 deletions webui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex, nofollow" />
<title>Auto_Bangumi</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
60 changes: 60 additions & 0 deletions webui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"name": "ab-webui",
"type": "module",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "vue-tsc --noEmit && vite build",
"dev": "vite",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"test": "vitest",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
},
"dependencies": {
"@headlessui/vue": "^1.7.13",
"@vueuse/core": "^8.9.4",
"axios": "^0.27.2",
"lodash": "^4.17.21",
"naive-ui": "^2.34.4",
"pinia": "^2.1.3",
"vue": "^3.3.4",
"vue-router": "^4.2.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.38.6",
"@icon-park/vue-next": "^1.4.2",
"@storybook/addon-essentials": "^7.0.12",
"@storybook/addon-interactions": "^7.0.12",
"@storybook/addon-links": "^7.0.12",
"@storybook/blocks": "^7.0.12",
"@storybook/testing-library": "0.0.14-next.2",
"@storybook/vue3": "^7.0.12",
"@storybook/vue3-vite": "^7.0.12",
"@types/lodash": "^4.14.194",
"@types/node": "^18.16.14",
"@unocss/preset-rem-to-px": "^0.51.13",
"@unocss/reset": "^0.51.13",
"@vitejs/plugin-vue": "^4.2.0",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-storybook": "^0.6.12",
"prettier": "^2.8.8",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.62.1",
"storybook": "^7.0.12",
"typescript": "^4.9.5",
"unocss": "^0.51.13",
"unplugin-auto-import": "^0.10.3",
"unplugin-vue-components": "^0.24.1",
"unplugin-vue-router": "^0.6.4",
"vite": "^4.3.5",
"vitest": "^0.30.1",
"vue-tsc": "^1.6.4"
}
}
Loading

0 comments on commit 82689cf

Please sign in to comment.