1
frontend/.gitignore
vendored
1
frontend/.gitignore
vendored
@ -11,6 +11,7 @@ node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
dev-dist
|
||||
coverage
|
||||
*.local
|
||||
|
||||
|
@ -1,13 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Anime</title>
|
||||
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@ -24,6 +24,7 @@
|
||||
"eslint-plugin-vue": "^9.23.0",
|
||||
"prettier": "^3.2.5",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-pwa": "^0.20.0",
|
||||
"vite-plugin-vue-devtools": "^7.0.25"
|
||||
}
|
||||
}
|
||||
|
2274
frontend/pnpm-lock.yaml
generated
2274
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
BIN
frontend/public/icon.jpg
Normal file
BIN
frontend/public/icon.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 67 KiB |
BIN
frontend/public/pwa-192x192.jpg
Normal file
BIN
frontend/public/pwa-192x192.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
BIN
frontend/public/pwa-512x512.jpg
Normal file
BIN
frontend/public/pwa-512x512.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { Tabbar, TabbarItem, ActionBar, ActionBarButton } from 'vant';
|
||||
import { ActionBar, ActionBarButton } from 'vant';
|
||||
import { postRequest } from '@/utils'
|
||||
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
import { showFailToast } from 'vant';
|
||||
|
||||
async function postRequest(url, data) {
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
@ -6,7 +8,13 @@ async function postRequest(url, data) {
|
||||
},
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
return response.json()
|
||||
const resp_data = await response.json()
|
||||
if (!response.ok) {
|
||||
showFailToast({
|
||||
message: resp_data.detail
|
||||
})
|
||||
}
|
||||
return resp_data
|
||||
}
|
||||
|
||||
|
||||
|
@ -2,11 +2,36 @@ import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
vue(),
|
||||
VitePWA({
|
||||
manifest: {
|
||||
name: 'Anime',
|
||||
short_name: 'Anime',
|
||||
start_url: '/',
|
||||
theme_color: '#000000',
|
||||
icons: [
|
||||
{
|
||||
src: '/pwa-192x192.jpg',
|
||||
sizes: '192x192',
|
||||
type: 'image/jpeg',
|
||||
},
|
||||
{
|
||||
src: '/pwa-512x512.jpg',
|
||||
sizes: '512x512',
|
||||
type: 'image/jpeg',
|
||||
}
|
||||
]
|
||||
},
|
||||
devOptions: {
|
||||
enabled: true,
|
||||
},
|
||||
registerType: "autoUpdate",
|
||||
})
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
|
Reference in New Issue
Block a user