Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65a35225d0 | ||
|
|
7ed0c04111 | ||
|
|
e8f70b286e | ||
|
|
e708524a41 | ||
|
|
a01dd06ef2 | ||
|
|
3c656eb880 | ||
|
|
89879e8c05 | ||
|
|
7c7ad6ba1f |
@@ -1,8 +0,0 @@
|
|||||||
# jwt密钥 用于生成token加密
|
|
||||||
JWT_SECRET=""
|
|
||||||
|
|
||||||
# 用户注册码
|
|
||||||
REGISTER_CODE='9527'
|
|
||||||
|
|
||||||
# 服务端口
|
|
||||||
PORT=8009
|
|
||||||
12
.github/workflows/docker-build-test.yml
vendored
@@ -1,8 +1,5 @@
|
|||||||
name: Build and Push Multi-Arch Docker Image for Test
|
name: Build and Push Multi-Arch Docker Image for Test
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
workflow_dispatch: # 添加手动触发
|
workflow_dispatch: # 添加手动触发
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@@ -12,6 +9,8 @@ jobs:
|
|||||||
packages: write # 必须授权以推送镜像
|
packages: write # 必须授权以推送镜像
|
||||||
env:
|
env:
|
||||||
REPO_NAME: ${{ github.repository }}
|
REPO_NAME: ${{ github.repository }}
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
IMAGE_NAME: cloudsaver
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -28,6 +27,12 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: 登录到 Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: 设置 QEMU 支持多架构
|
- name: 设置 QEMU 支持多架构
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
@@ -42,3 +47,4 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ env.LOWER_NAME }}:test
|
ghcr.io/${{ env.LOWER_NAME }}:test
|
||||||
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:test
|
||||||
|
|||||||
16
.github/workflows/docker-image.yml
vendored
@@ -11,14 +11,18 @@ jobs:
|
|||||||
packages: write # 必须授权以推送镜像
|
packages: write # 必须授权以推送镜像
|
||||||
env:
|
env:
|
||||||
REPO_NAME: ${{ github.repository }}
|
REPO_NAME: ${{ github.repository }}
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
IMAGE_NAME: cloudsaver
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: 设置小写镜像名称
|
- name: 设置小写镜像名称和版本
|
||||||
run: |
|
run: |
|
||||||
LOWER_NAME=$(echo "$REPO_NAME" | tr '[:upper:]' '[:lower:]')
|
LOWER_NAME=$(echo "$REPO_NAME" | tr '[:upper:]' '[:lower:]')
|
||||||
echo "LOWER_NAME=$LOWER_NAME" >> $GITHUB_ENV
|
echo "LOWER_NAME=$LOWER_NAME" >> $GITHUB_ENV
|
||||||
|
VERSION=${GITHUB_REF#refs/tags/v}
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: 登录到 GitHub Container Registry
|
- name: 登录到 GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@@ -27,6 +31,12 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: 登录到 Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: 设置 QEMU 支持多架构
|
- name: 设置 QEMU 支持多架构
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
@@ -41,4 +51,6 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/${{ env.LOWER_NAME }}:latest
|
ghcr.io/${{ env.LOWER_NAME }}:latest
|
||||||
ghcr.io/${{ env.LOWER_NAME }}:${{ github.sha }}
|
ghcr.io/${{ env.LOWER_NAME }}:${{ env.VERSION }}
|
||||||
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
|
||||||
|
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
|
||||||
|
|||||||
14
Dockerfile
@@ -26,6 +26,9 @@ RUN apk add --no-cache nginx
|
|||||||
# 设置工作目录
|
# 设置工作目录
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# 创建配置和数据目录
|
||||||
|
RUN mkdir -p /app/config /app/data
|
||||||
|
|
||||||
# 复制前端构建产物到 Nginx
|
# 复制前端构建产物到 Nginx
|
||||||
COPY --from=frontend-build /app/dist /usr/share/nginx/html
|
COPY --from=frontend-build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
@@ -38,8 +41,15 @@ COPY --from=backend-build /app /app
|
|||||||
# 安装生产环境依赖
|
# 安装生产环境依赖
|
||||||
RUN npm install --production
|
RUN npm install --production
|
||||||
|
|
||||||
|
# 设置数据卷
|
||||||
|
VOLUME ["/app/config", "/app/data"]
|
||||||
|
|
||||||
# 暴露端口
|
# 暴露端口
|
||||||
EXPOSE 8008
|
EXPOSE 8008
|
||||||
|
|
||||||
# 启动 Nginx 和后端服务
|
# 启动脚本
|
||||||
CMD ["sh", "-c", "nginx -g 'daemon off;' & npm run start && wait"]
|
COPY docker-entrypoint.sh /app/
|
||||||
|
RUN chmod +x /app/docker-entrypoint.sh
|
||||||
|
|
||||||
|
# 启动服务
|
||||||
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||||
|
|||||||
41
README.md
@@ -95,7 +95,7 @@
|
|||||||
1. 克隆项目
|
1. 克隆项目
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/your-username/CloudSaver.git
|
git clone https://github.com/jiangrui1994/CloudSaver.git
|
||||||
cd CloudSaver
|
cd CloudSaver
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -213,25 +213,6 @@ docker-compose up -d
|
|||||||
- 管理员:230713
|
- 管理员:230713
|
||||||
- 普通用户:9527
|
- 普通用户:9527
|
||||||
|
|
||||||
## 特别声明
|
|
||||||
|
|
||||||
1. 本项目仅供学习交流使用,请勿用于非法用途
|
|
||||||
2. 仅支持个人使用,不支持任何形式的商业使用
|
|
||||||
3. 禁止在项目页面进行任何形式的广告宣传
|
|
||||||
4. 所有搜索到的资源均来自第三方,本项目不对其真实性、合法性做出任何保证
|
|
||||||
|
|
||||||
## 贡献指南
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
|
|
||||||
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
|
||||||
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
|
||||||
5. 提交 Pull Request
|
|
||||||
|
|
||||||
## 开源协议
|
|
||||||
|
|
||||||
本项目基于 MIT 协议开源 - 查看 [LICENSE](LICENSE) 文件了解更多细节
|
|
||||||
|
|
||||||
## 联系方式
|
## 联系方式
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
@@ -258,6 +239,26 @@ docker-compose up -d
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
## 特别声明
|
||||||
|
|
||||||
|
1. 本项目仅供学习交流使用,请勿用于非法用途
|
||||||
|
2. 仅支持个人使用,不支持任何形式的商业使用
|
||||||
|
3. 禁止在项目页面进行任何形式的广告宣传
|
||||||
|
4. 所有搜索到的资源均来自第三方,本项目不对其真实性、合法性做出任何保证
|
||||||
|
|
||||||
|
## 贡献指南
|
||||||
|
|
||||||
|
1. Fork 本仓库
|
||||||
|
2. 创建特性分支 (`git checkout -b feature/AmazingFeature`)
|
||||||
|
3. 提交更改 (`git commit -m 'Add some AmazingFeature'`)
|
||||||
|
4. 推送到分支 (`git push origin feature/AmazingFeature`)
|
||||||
|
5. 提交 Pull Request
|
||||||
|
|
||||||
|
## 开源协议
|
||||||
|
|
||||||
|
本项目基于 MIT 协议开源 - 查看 [LICENSE](LICENSE) 文件了解更多细节
|
||||||
|
|
||||||
|
|
||||||
## 鸣谢
|
## 鸣谢
|
||||||
|
|
||||||
- 👨💻 感谢所有为这个项目做出贡献的开发者们!
|
- 👨💻 感谢所有为这个项目做出贡献的开发者们!
|
||||||
|
|||||||
9
backend/.env.example
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# JWT配置
|
||||||
|
JWT_SECRET=your_jwt_secret_here
|
||||||
|
|
||||||
|
# Telegram配置
|
||||||
|
TELEGRAM_BASE_URL=https://t.me/s
|
||||||
|
|
||||||
|
# Telegram频道配置
|
||||||
|
TELE_CHANNELS=[{"id":"guaguale115","name":"115网盘资源分享"},{"id":"hao115","name":"115网盘资源分享频道"},{"id":"yunpanshare","name":"网盘资源收藏(夸克)"}]
|
||||||
|
|
||||||
@@ -11,45 +11,35 @@ interface Channel {
|
|||||||
interface CloudPatterns {
|
interface CloudPatterns {
|
||||||
baiduPan: RegExp;
|
baiduPan: RegExp;
|
||||||
tianyi: RegExp;
|
tianyi: RegExp;
|
||||||
weiyun: RegExp;
|
|
||||||
aliyun: RegExp;
|
aliyun: RegExp;
|
||||||
pan115: RegExp;
|
pan115: RegExp;
|
||||||
|
pan123: RegExp;
|
||||||
quark: RegExp;
|
quark: RegExp;
|
||||||
|
yidong: RegExp;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Cloud115Config {
|
|
||||||
userId: string;
|
|
||||||
cookie: string;
|
|
||||||
}
|
|
||||||
interface QuarkConfig {
|
|
||||||
userId: string;
|
|
||||||
cookie: string;
|
|
||||||
}
|
|
||||||
interface HttpProxyConfig {
|
|
||||||
host: string;
|
|
||||||
port: string;
|
|
||||||
}
|
|
||||||
interface Config {
|
interface Config {
|
||||||
jwtSecret: string;
|
jwtSecret: string;
|
||||||
registerCode: string;
|
telegram: {
|
||||||
rss: {
|
|
||||||
baseUrl: string;
|
baseUrl: string;
|
||||||
channels: Channel[];
|
channels: Channel[];
|
||||||
};
|
};
|
||||||
telegram: {
|
|
||||||
baseUrl: string;
|
|
||||||
};
|
|
||||||
httpProxy: HttpProxyConfig;
|
|
||||||
cloudPatterns: CloudPatterns;
|
cloudPatterns: CloudPatterns;
|
||||||
cloud115: Cloud115Config;
|
|
||||||
quark: QuarkConfig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const config: Config = {
|
// 从环境变量读取频道配置
|
||||||
jwtSecret: process.env.JWT_SECRET || "uV7Y$k92#LkF^q1b!",
|
const getTeleChannels = (): Channel[] => {
|
||||||
rss: {
|
try {
|
||||||
baseUrl: process.env.RSS_BASE_URL || "https://rsshub.rssforever.com/telegram/channel",
|
const channelsStr = process.env.TELE_CHANNELS;
|
||||||
channels: [
|
if (channelsStr) {
|
||||||
|
return JSON.parse(channelsStr);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn("无法解析 TELE_CHANNELS 环境变量,使用默认配置");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认配置
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
id: "guaguale115",
|
id: "guaguale115",
|
||||||
name: "115网盘资源分享",
|
name: "115网盘资源分享",
|
||||||
@@ -62,35 +52,25 @@ export const config: Config = {
|
|||||||
id: "yunpanshare",
|
id: "yunpanshare",
|
||||||
name: "网盘资源收藏(夸克)",
|
name: "网盘资源收藏(夸克)",
|
||||||
},
|
},
|
||||||
],
|
];
|
||||||
},
|
};
|
||||||
registerCode: process.env.REGISTER_CODE || "9527",
|
|
||||||
|
export const config: Config = {
|
||||||
|
jwtSecret: process.env.JWT_SECRET || "uV7Y$k92#LkF^q1b!",
|
||||||
|
|
||||||
telegram: {
|
telegram: {
|
||||||
baseUrl: process.env.TELEGRAM_BASE_URL || "https://t.me/s",
|
baseUrl: process.env.TELEGRAM_BASE_URL || "https://t.me/s",
|
||||||
},
|
channels: getTeleChannels(),
|
||||||
|
|
||||||
httpProxy: {
|
|
||||||
host: process.env.HTTP_PROXY_HOST || "",
|
|
||||||
port: process.env.HTTP_PROXY_PORT || "",
|
|
||||||
},
|
},
|
||||||
|
|
||||||
cloudPatterns: {
|
cloudPatterns: {
|
||||||
baiduPan: /https?:\/\/(?:pan|yun)\.baidu\.com\/[^\s<>"]+/g,
|
baiduPan: /https?:\/\/(?:pan|yun)\.baidu\.com\/[^\s<>"]+/g,
|
||||||
tianyi: /https?:\/\/cloud\.189\.cn\/[^\s<>"]+/g,
|
tianyi: /https?:\/\/cloud\.189\.cn\/[^\s<>"]+/g,
|
||||||
weiyun: /https?:\/\/share\.weiyun\.com\/[^\s<>"]+/g,
|
aliyun: /https?:\/\/\w+\.(?:alipan|aliyundrive)\.com\/[^\s<>"]+/g,
|
||||||
aliyun: /https?:\/\/\w+\.aliyundrive\.com\/[^\s<>"]+/g,
|
// pan115有两个域名 115.com 和 anxia.com 和 115cdn.com
|
||||||
// pan115有两个域名 115.com 和 anxia.com
|
|
||||||
pan115: /https?:\/\/(?:115|anxia|115cdn)\.com\/s\/[^\s<>"]+/g,
|
pan115: /https?:\/\/(?:115|anxia|115cdn)\.com\/s\/[^\s<>"]+/g,
|
||||||
|
pan123: /https?:\/\/www\.123pan\.com\/s\/[^\s<>"]+/g,
|
||||||
quark: /https?:\/\/pan\.quark\.cn\/[^\s<>"]+/g,
|
quark: /https?:\/\/pan\.quark\.cn\/[^\s<>"]+/g,
|
||||||
},
|
yidong: /https?:\/\/yun\.139\.com\/[^\s<>"]+/g,
|
||||||
|
|
||||||
cloud115: {
|
|
||||||
userId: "",
|
|
||||||
cookie: process.env.CLOUD115_COOKIE || "",
|
|
||||||
},
|
|
||||||
quark: {
|
|
||||||
userId: process.env.QUARK_USER_ID || "",
|
|
||||||
cookie: process.env.QUARK_COOKIE || "",
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { AxiosHeaders, AxiosInstance } from "axios"; // 导入 AxiosHeaders
|
import { AxiosHeaders, AxiosInstance } from "axios"; // 导入 AxiosHeaders
|
||||||
import { createAxiosInstance } from "../utils/axiosInstance";
|
import { createAxiosInstance } from "../utils/axiosInstance";
|
||||||
import { Logger } from "../utils/logger";
|
import { Logger } from "../utils/logger";
|
||||||
import { config } from "../config/index";
|
|
||||||
import { ShareInfoResponse } from "../types/cloud115";
|
import { ShareInfoResponse } from "../types/cloud115";
|
||||||
|
|
||||||
interface Cloud115ListItem {
|
interface Cloud115ListItem {
|
||||||
@@ -128,7 +127,6 @@ export class Cloud115Service {
|
|||||||
}): Promise<{ message: string; data: unknown }> {
|
}): Promise<{ message: string; data: unknown }> {
|
||||||
const param = new URLSearchParams({
|
const param = new URLSearchParams({
|
||||||
cid: params.cid,
|
cid: params.cid,
|
||||||
user_id: config.cloud115.userId,
|
|
||||||
share_code: params.shareCode,
|
share_code: params.shareCode,
|
||||||
receive_code: params.receiveCode,
|
receive_code: params.receiveCode,
|
||||||
file_id: params.fileId,
|
file_id: params.fileId,
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ export class Searcher {
|
|||||||
const allResults: any[] = [];
|
const allResults: any[] = [];
|
||||||
|
|
||||||
const channelList: any[] = channelId
|
const channelList: any[] = channelId
|
||||||
? config.rss.channels.filter((channel: any) => channel.id === channelId)
|
? config.telegram.channels.filter((channel: any) => channel.id === channelId)
|
||||||
: config.rss.channels;
|
: config.telegram.channels;
|
||||||
|
|
||||||
// 使用Promise.all进行并行请求
|
// 使用Promise.all进行并行请求
|
||||||
const searchPromises = channelList.map(async (channel) => {
|
const searchPromises = channelList.map(async (channel) => {
|
||||||
|
|||||||
13
docker-entrypoint.sh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 如果配置目录下没有 env 文件,则复制示例文件
|
||||||
|
if [ ! -f /app/config/env ]; then
|
||||||
|
cp /app/.env.example /app/config/env
|
||||||
|
echo "已创建默认配置文件 /app/config/env,请根据需要修改配置"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# 创建配置文件软链接
|
||||||
|
ln -sf /app/config/env /app/.env
|
||||||
|
|
||||||
|
# 启动 Nginx 和后端服务
|
||||||
|
nginx -g 'daemon off;' & npm run start
|
||||||
|
Before Width: | Height: | Size: 172 KiB |
|
Before Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 184 KiB |
|
Before Width: | Height: | Size: 195 KiB |
|
Before Width: | Height: | Size: 186 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 824 KiB |
|
Before Width: | Height: | Size: 86 KiB |
4
frontend/components.d.ts
vendored
@@ -8,7 +8,6 @@ export {}
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AsideMenu: typeof import('./src/components/AsideMenu.vue')['default']
|
AsideMenu: typeof import('./src/components/AsideMenu.vue')['default']
|
||||||
DoubanMovie: typeof import('./src/components/Home/DoubanMovie.vue')['default']
|
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
ElBacktop: typeof import('element-plus/es')['ElBacktop']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
@@ -26,11 +25,9 @@ declare module 'vue' {
|
|||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
ElLink: typeof import('element-plus/es')['ElLink']
|
ElLink: typeof import('element-plus/es')['ElLink']
|
||||||
ElLoadingIcon: typeof import('element-plus/es')['ElLoadingIcon']
|
|
||||||
ElMain: typeof import('element-plus/es')['ElMain']
|
ElMain: typeof import('element-plus/es')['ElMain']
|
||||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
@@ -39,7 +36,6 @@ declare module 'vue' {
|
|||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
|
||||||
FolderSelect: typeof import('./src/components/Home/FolderSelect.vue')['default']
|
FolderSelect: typeof import('./src/components/Home/FolderSelect.vue')['default']
|
||||||
ResourceCard: typeof import('./src/components/Home/ResourceCard.vue')['default']
|
ResourceCard: typeof import('./src/components/Home/ResourceCard.vue')['default']
|
||||||
ResourceSelect: typeof import('./src/components/Home/ResourceSelect.vue')['default']
|
ResourceSelect: typeof import('./src/components/Home/ResourceSelect.vue')['default']
|
||||||
|
|||||||
@@ -8,6 +8,30 @@
|
|||||||
name="viewport"
|
name="viewport"
|
||||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"
|
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" />
|
<meta name="referrer" content="no-referrer" />
|
||||||
<title>CloudSaver</title>
|
<title>CloudSaver</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
BIN
frontend/logo-1.png
Normal file
|
After Width: | Height: | Size: 248 KiB |
3751
frontend/logo.svg
Normal file
|
After Width: | Height: | Size: 282 KiB |
4
frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cloud-disk-web",
|
"name": "cloud-disk-web",
|
||||||
"version": "0.1.0",
|
"version": "0.2.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cloud-disk-web",
|
"name": "cloud-disk-web",
|
||||||
"version": "0.1.0",
|
"version": "0.2.2",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.7",
|
"axios": "^1.6.7",
|
||||||
"element-plus": "^2.6.1",
|
"element-plus": "^2.6.1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cloud-saver-web",
|
"name": "cloud-saver-web",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.2.0",
|
"version": "0.2.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
"unplugin-auto-import": "^0.17.8",
|
"unplugin-auto-import": "^0.17.8",
|
||||||
"unplugin-vue-components": "^0.26.0",
|
"unplugin-vue-components": "^0.26.0",
|
||||||
"vite": "^5.1.5",
|
"vite": "^5.1.5",
|
||||||
|
"vite-plugin-pwa": "^0.21.1",
|
||||||
"vue-tsc": "^2.0.6"
|
"vue-tsc": "^2.0.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
<style>
|
<style>
|
||||||
#app {
|
#app {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
:root {
|
:root {
|
||||||
--theme-color: #3e3e3e;
|
--theme-color: #3e3e3e;
|
||||||
@@ -34,6 +38,13 @@ body {
|
|||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
/* 移动端全局样式 */
|
/* 移动端全局样式 */
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
#app {
|
#app {
|
||||||
|
|||||||
@@ -164,8 +164,6 @@ const handleLogout = () => {
|
|||||||
padding-bottom: 100px; // tabbar高度 + 底部安全区域
|
padding-bottom: 100px; // tabbar高度 + 底部安全区域
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载状态
|
// 加载状态
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
round
|
round
|
||||||
closeable
|
closeable
|
||||||
position="bottom"
|
position="bottom"
|
||||||
:style="{ height: '80%' }"
|
:style="{ height: '80%', transform: 'translateZ(1px)' }"
|
||||||
class="save-popup"
|
class="save-popup"
|
||||||
>
|
>
|
||||||
<div class="save-popup__container">
|
<div class="save-popup__container">
|
||||||
@@ -338,6 +338,7 @@ watch(currentTab, () => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
padding-bottom: calc(env(safe-area-inset-bottom) + 50px);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
@@ -380,6 +381,7 @@ watch(currentTab, () => {
|
|||||||
padding: 12px 16px 16px;
|
padding: 12px 16px 16px;
|
||||||
background: var(--theme-other_background);
|
background: var(--theme-other_background);
|
||||||
border-top: 0.5px solid var(--van-gray-3);
|
border-top: 0.5px solid var(--van-gray-3);
|
||||||
|
padding-bottom: calc(16px + env(safe-area-inset-bottom));
|
||||||
|
|
||||||
.footer__path {
|
.footer__path {
|
||||||
margin: 0 0 12px;
|
margin: 0 0 12px;
|
||||||
@@ -447,6 +449,10 @@ watch(currentTab, () => {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:deep(.van-popup) {
|
||||||
|
z-index: 2001 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 全局样式优化
|
// 全局样式优化
|
||||||
|
|||||||
@@ -5,12 +5,43 @@ import AutoImport from "unplugin-auto-import/vite";
|
|||||||
import Components from "unplugin-vue-components/vite";
|
import Components from "unplugin-vue-components/vite";
|
||||||
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
import { ElementPlusResolver } from "unplugin-vue-components/resolvers";
|
||||||
import { VantResolver } from "@vant/auto-import-resolver";
|
import { VantResolver } from "@vant/auto-import-resolver";
|
||||||
|
import { VitePWA } from "vite-plugin-pwa";
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: "/",
|
base: "/",
|
||||||
plugins: [
|
plugins: [
|
||||||
vue(),
|
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({
|
AutoImport({
|
||||||
resolvers: [ElementPlusResolver(), VantResolver()],
|
resolvers: [ElementPlusResolver(), VantResolver()],
|
||||||
}),
|
}),
|
||||||
|
|||||||
3110
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cloud-saver",
|
"name": "cloud-saver",
|
||||||
"version": "0.2.0",
|
"version": "0.2.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"frontend",
|
"frontend",
|
||||||
@@ -17,6 +17,9 @@
|
|||||||
"build:frontend": "cd frontend && npm run build",
|
"build:frontend": "cd frontend && npm run build",
|
||||||
"build:backend": "cd backend && npm run build",
|
"build:backend": "cd backend && npm run build",
|
||||||
"clean": "rimraf **/node_modules **/dist",
|
"clean": "rimraf **/node_modules **/dist",
|
||||||
|
"version:patch": "npm version patch -w frontend && npm version patch",
|
||||||
|
"version:minor": "npm version minor -w frontend && npm version minor",
|
||||||
|
"version:major": "npm version major -w frontend && npm version major",
|
||||||
"format": "prettier --write \"**/*.{js,ts,vue,json,css,scss}\"",
|
"format": "prettier --write \"**/*.{js,ts,vue,json,css,scss}\"",
|
||||||
"format:check": "prettier --check \"**/*.{js,ts,vue,json,css,scss}\"",
|
"format:check": "prettier --check \"**/*.{js,ts,vue,json,css,scss}\"",
|
||||||
"format:all": "npm run format && npm run lint:fix",
|
"format:all": "npm run format && npm run lint:fix",
|
||||||
|
|||||||