feat:增加pwa支持

This commit is contained in:
jiangrui
2025-03-06 11:27:31 +08:00
parent 89879e8c05
commit 3c656eb880
21 changed files with 12666 additions and 2885 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

View File

@@ -8,7 +8,6 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
AsideMenu: typeof import('./src/components/AsideMenu.vue')['default']
DoubanMovie: typeof import('./src/components/Home/DoubanMovie.vue')['default']
ElAside: typeof import('element-plus/es')['ElAside']
ElBacktop: typeof import('element-plus/es')['ElBacktop']
ElButton: typeof import('element-plus/es')['ElButton']
@@ -26,11 +25,9 @@ declare module 'vue' {
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElLoadingIcon: typeof import('element-plus/es')['ElLoadingIcon']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElSpace: typeof import('element-plus/es')['ElSpace']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
@@ -39,7 +36,6 @@ declare module 'vue' {
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTree: typeof import('element-plus/es')['ElTree']
FolderSelect: typeof import('./src/components/Home/FolderSelect.vue')['default']
ResourceCard: typeof import('./src/components/Home/ResourceCard.vue')['default']
ResourceSelect: typeof import('./src/components/Home/ResourceSelect.vue')['default']

View File

@@ -8,6 +8,30 @@
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
/>
<meta name="keywords" content="网盘,资源搜索,云存储" />
<!-- SEO关键词 -->
<meta name="description" content="网盘资源搜索工具" />
<!-- 设置Web App描述 -->
<meta name="theme-color" content="#ffffff" />
<!-- 设置主题颜色 -->
<meta property="og:title" content="CloudSaver" />
<!-- 社交媒体分享标题 -->
<meta property="og:description" content="网盘资源搜索工具" />
<!-- 社交媒体分享描述 -->
<meta property="og:url" content="https://github.com/jiangrui1994/CloudSaver" />
<!-- 社交媒体分享链接 -->
<meta name="twitter:card" content="summary" />
<!-- Twitter卡片类型 -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- 开启Web App功能 -->
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<!-- 设置状态栏样式 -->
<meta name="apple-mobile-web-app-title" content="CloudSaver" />
<!-- 设置Web App标题 -->
<link rel="apple-touch-icon" href="/logo-1.png" />
<!-- 设置Web App图标 -->
<link rel="mask-icon" href="/logo.svg" color="transparent" />
<!-- 设置Web App图标遮罩 -->
<meta name="referrer" content="no-referrer" />
<title>CloudSaver</title>
</head>

BIN
frontend/logo-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

3751
frontend/logo.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 282 KiB

View File

@@ -1,7 +1,7 @@
{
"name": "cloud-saver-web",
"private": true,
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"scripts": {
"dev": "vite --host",
@@ -28,6 +28,7 @@
"unplugin-auto-import": "^0.17.8",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.1.5",
"vite-plugin-pwa": "^0.21.1",
"vue-tsc": "^2.0.6"
}
}

View File

@@ -5,12 +5,43 @@ import AutoImport from "unplugin-auto-import/vite";
import Components from "unplugin-vue-components/vite";
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
import { VantResolver } from "@vant/auto-import-resolver";
import { VitePWA } from "vite-plugin-pwa";
import { resolve } from "path";
export default defineConfig({
base: "/",
plugins: [
vue(),
VitePWA({
registerType: "autoUpdate",
includeAssets: ["logo-1.png", "logo.svg"],
injectRegister: "auto",
workbox: {
globPatterns: ["**/*.{js,css,html,png,svg}"],
},
manifest: {
name: "CloudSaver",
short_name: "CloudSaver",
description: "网盘资源搜索工具",
theme_color: "#ffffff",
background_color: "#ffffff",
display: "standalone",
scope: "/",
start_url: "/",
icons: [
{
src: "logo-1.png",
sizes: "192x192",
type: "image/png",
},
{
src: "logo.svg",
sizes: "192x192",
type: "image/svg+xml",
},
],
},
}),
AutoImport({
resolvers: [ElementPlusResolver(), VantResolver()],
}),

3110
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "cloud-saver",
"version": "0.2.0",
"version": "0.2.1",
"private": true,
"workspaces": [
"frontend",

8626
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff