feat: https://github.com/vastsa/FileCodeBox/issues/386 https://github.com/vastsa/FileCodeBox/issues/380
This commit is contained in:
+74
-5
@@ -15,6 +15,29 @@
|
|||||||
Authorization: Bearer <token>
|
Authorization: Bearer <token>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 获取 Token
|
||||||
|
|
||||||
|
当管理面板关闭了游客上传(`openUpload=0`)时,需要先登录获取 token:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST "http://localhost:12345/admin/login" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"password": "FileCodeBox2023"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
**响应示例:**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "success",
|
||||||
|
"detail": {
|
||||||
|
"token": "xxx.xxx.xxx",
|
||||||
|
"token_type": "Bearer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## 分享接口
|
## 分享接口
|
||||||
|
|
||||||
### 分享文本
|
### 分享文本
|
||||||
@@ -29,7 +52,22 @@ Authorization: Bearer <token>
|
|||||||
|-------|------|------|--------|------|
|
|-------|------|------|--------|------|
|
||||||
| text | string | 是 | - | 要分享的文本内容 |
|
| text | string | 是 | - | 要分享的文本内容 |
|
||||||
| expire_value | integer | 否 | 1 | 过期时间值 |
|
| expire_value | integer | 否 | 1 | 过期时间值 |
|
||||||
| expire_style | string | 否 | "day" | 过期时间单位(day/hour/minute) |
|
| expire_style | string | 否 | "day" | 过期时间单位(day/hour/minute/count/forever) |
|
||||||
|
|
||||||
|
**cURL 示例:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 游客上传(openUpload=1 时)
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-F "text=这是要分享的文本内容" \
|
||||||
|
-F "expire_value=1" \
|
||||||
|
-F "expire_style=day"
|
||||||
|
|
||||||
|
# 需要认证时(openUpload=0 时)
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "text=这是要分享的文本内容"
|
||||||
|
```
|
||||||
|
|
||||||
**响应示例:**
|
**响应示例:**
|
||||||
|
|
||||||
@@ -38,8 +76,7 @@ Authorization: Bearer <token>
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"detail": {
|
"detail": {
|
||||||
"code": "abc123",
|
"code": "abc123"
|
||||||
"name": "text.txt"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -56,7 +93,32 @@ Authorization: Bearer <token>
|
|||||||
|-------|------|------|--------|------|
|
|-------|------|------|--------|------|
|
||||||
| file | file | 是 | - | 要上传的文件 |
|
| file | file | 是 | - | 要上传的文件 |
|
||||||
| expire_value | integer | 否 | 1 | 过期时间值 |
|
| expire_value | integer | 否 | 1 | 过期时间值 |
|
||||||
| expire_style | string | 否 | "day" | 过期时间单位(day/hour/minute) |
|
| expire_style | string | 否 | "day" | 过期时间单位(day/hour/minute/count/forever) |
|
||||||
|
|
||||||
|
**cURL 示例:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 上传文件(默认1天有效期)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.txt"
|
||||||
|
|
||||||
|
# 上传文件(7天有效期)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.txt" \
|
||||||
|
-F "expire_value=7" \
|
||||||
|
-F "expire_style=day"
|
||||||
|
|
||||||
|
# 上传文件(可下载10次)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.txt" \
|
||||||
|
-F "expire_value=10" \
|
||||||
|
-F "expire_style=count"
|
||||||
|
|
||||||
|
# 需要认证时
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "file=@/path/to/file.txt"
|
||||||
|
```
|
||||||
|
|
||||||
**响应示例:**
|
**响应示例:**
|
||||||
|
|
||||||
@@ -75,7 +137,7 @@ Authorization: Bearer <token>
|
|||||||
|
|
||||||
**GET** `/share/select/`
|
**GET** `/share/select/`
|
||||||
|
|
||||||
通过分享码获取文件信息。
|
通过分享码获取文件信息(直接下载文件)。
|
||||||
|
|
||||||
**请求参数:**
|
**请求参数:**
|
||||||
|
|
||||||
@@ -83,6 +145,13 @@ Authorization: Bearer <token>
|
|||||||
|-------|------|------|------|
|
|-------|------|------|------|
|
||||||
| code | string | 是 | 文件分享码 |
|
| code | string | 是 | 文件分享码 |
|
||||||
|
|
||||||
|
**cURL 示例:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 通过取件码下载文件
|
||||||
|
curl -L "http://localhost:12345/share/select/?code=abc123" -o downloaded_file
|
||||||
|
```
|
||||||
|
|
||||||
**响应示例:**
|
**响应示例:**
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
+74
-5
@@ -15,6 +15,29 @@ Some APIs require `Authorization` header for authentication:
|
|||||||
Authorization: Bearer <token>
|
Authorization: Bearer <token>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Get Token
|
||||||
|
|
||||||
|
When guest upload is disabled in admin panel (`openUpload=0`), you need to login first:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X POST "http://localhost:12345/admin/login" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"password": "FileCodeBox2023"}'
|
||||||
|
```
|
||||||
|
|
||||||
|
**Response Example:**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "success",
|
||||||
|
"detail": {
|
||||||
|
"token": "xxx.xxx.xxx",
|
||||||
|
"token_type": "Bearer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## Share API
|
## Share API
|
||||||
|
|
||||||
### Share Text
|
### Share Text
|
||||||
@@ -29,7 +52,22 @@ Share text content and get a share code.
|
|||||||
|-----------|------|----------|---------|-------------|
|
|-----------|------|----------|---------|-------------|
|
||||||
| text | string | Yes | - | Text content to share |
|
| text | string | Yes | - | Text content to share |
|
||||||
| expire_value | integer | No | 1 | Expiration time value |
|
| expire_value | integer | No | 1 | Expiration time value |
|
||||||
| expire_style | string | No | "day" | Expiration time unit(day/hour/minute) |
|
| expire_style | string | No | "day" | Expiration time unit(day/hour/minute/count/forever) |
|
||||||
|
|
||||||
|
**cURL Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Guest upload (when openUpload=1)
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-F "text=This is the text content to share" \
|
||||||
|
-F "expire_value=1" \
|
||||||
|
-F "expire_style=day"
|
||||||
|
|
||||||
|
# When authentication required (openUpload=0)
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "text=This is the text content to share"
|
||||||
|
```
|
||||||
|
|
||||||
**Response Example:**
|
**Response Example:**
|
||||||
|
|
||||||
@@ -38,8 +76,7 @@ Share text content and get a share code.
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "success",
|
"msg": "success",
|
||||||
"detail": {
|
"detail": {
|
||||||
"code": "abc123",
|
"code": "abc123"
|
||||||
"name": "text.txt"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -56,7 +93,32 @@ Upload and share a file, get a share code.
|
|||||||
|-----------|------|----------|---------|-------------|
|
|-----------|------|----------|---------|-------------|
|
||||||
| file | file | Yes | - | File to upload |
|
| file | file | Yes | - | File to upload |
|
||||||
| expire_value | integer | No | 1 | Expiration time value |
|
| expire_value | integer | No | 1 | Expiration time value |
|
||||||
| expire_style | string | No | "day" | Expiration time unit(day/hour/minute) |
|
| expire_style | string | No | "day" | Expiration time unit(day/hour/minute/count/forever) |
|
||||||
|
|
||||||
|
**cURL Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Upload file (default 1 day expiration)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.txt"
|
||||||
|
|
||||||
|
# Upload file (7 days expiration)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.txt" \
|
||||||
|
-F "expire_value=7" \
|
||||||
|
-F "expire_style=day"
|
||||||
|
|
||||||
|
# Upload file (10 downloads limit)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.txt" \
|
||||||
|
-F "expire_value=10" \
|
||||||
|
-F "expire_style=count"
|
||||||
|
|
||||||
|
# When authentication required
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "file=@/path/to/file.txt"
|
||||||
|
```
|
||||||
|
|
||||||
**Response Example:**
|
**Response Example:**
|
||||||
|
|
||||||
@@ -75,7 +137,7 @@ Upload and share a file, get a share code.
|
|||||||
|
|
||||||
**GET** `/share/select/`
|
**GET** `/share/select/`
|
||||||
|
|
||||||
Get file information by share code.
|
Get file information by share code (direct file download).
|
||||||
|
|
||||||
**Parameters:**
|
**Parameters:**
|
||||||
|
|
||||||
@@ -83,6 +145,13 @@ Get file information by share code.
|
|||||||
|-----------|------|----------|-------------|
|
|-----------|------|----------|-------------|
|
||||||
| code | string | Yes | File share code |
|
| code | string | Yes | File share code |
|
||||||
|
|
||||||
|
**cURL Example:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Download file by extraction code
|
||||||
|
curl -L "http://localhost:12345/share/select/?code=abc123" -o downloaded_file
|
||||||
|
```
|
||||||
|
|
||||||
**Response Example:**
|
**Response Example:**
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -118,12 +118,53 @@ Content-Type: `multipart/form-data`
|
|||||||
**cURL example:**
|
**cURL example:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Upload file (default 1 day expiration)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.pdf"
|
||||||
|
|
||||||
|
# Upload file with 7 days expiration
|
||||||
curl -X POST "http://localhost:12345/share/file/" \
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
-F "file=@/path/to/file.pdf" \
|
-F "file=@/path/to/file.pdf" \
|
||||||
-F "expire_value=7" \
|
-F "expire_value=7" \
|
||||||
-F "expire_style=day"
|
-F "expire_style=day"
|
||||||
|
|
||||||
|
# Upload file with 10 downloads limit
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.pdf" \
|
||||||
|
-F "expire_value=10" \
|
||||||
|
-F "expire_style=count"
|
||||||
|
|
||||||
|
# Share text
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-F "text=This is the text content to share"
|
||||||
|
|
||||||
|
# Download file by extraction code
|
||||||
|
curl -L "http://localhost:12345/share/select/?code=YOUR_CODE" -o downloaded_file
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::: tip When Authentication Required
|
||||||
|
If guest upload is disabled in admin panel (`openUpload=0`), you need to login first:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Login to get token
|
||||||
|
curl -X POST "http://localhost:12345/admin/login" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"password": "FileCodeBox2023"}'
|
||||||
|
|
||||||
|
# Returns: {"code":200,"msg":"success","detail":{"token":"xxx.xxx.xxx","token_type":"Bearer"}}
|
||||||
|
|
||||||
|
# 2. Upload file with token
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "file=@/path/to/file.pdf"
|
||||||
|
|
||||||
|
# 3. Share text with token
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "text=This is the text content to share"
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
## Chunked Upload API
|
## Chunked Upload API
|
||||||
|
|
||||||
|
|||||||
@@ -118,12 +118,53 @@ Content-Type: `multipart/form-data`
|
|||||||
**cURL 示例:**
|
**cURL 示例:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# 上传文件(默认1天有效期)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.pdf"
|
||||||
|
|
||||||
|
# 上传文件并指定有效期(7天)
|
||||||
curl -X POST "http://localhost:12345/share/file/" \
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
-F "file=@/path/to/file.pdf" \
|
-F "file=@/path/to/file.pdf" \
|
||||||
-F "expire_value=7" \
|
-F "expire_value=7" \
|
||||||
-F "expire_style=day"
|
-F "expire_style=day"
|
||||||
|
|
||||||
|
# 上传文件并指定有效期(可下载10次)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/file.pdf" \
|
||||||
|
-F "expire_value=10" \
|
||||||
|
-F "expire_style=count"
|
||||||
|
|
||||||
|
# 分享文本
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-F "text=这是要分享的文本内容"
|
||||||
|
|
||||||
|
# 通过取件码下载文件
|
||||||
|
curl -L "http://localhost:12345/share/select/?code=取件码" -o downloaded_file
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::: tip 需要认证时
|
||||||
|
如果管理面板关闭了游客上传(`openUpload=0`),需要先登录获取 token:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. 登录获取 token
|
||||||
|
curl -X POST "http://localhost:12345/admin/login" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"password": "FileCodeBox2023"}'
|
||||||
|
|
||||||
|
# 返回: {"code":200,"msg":"success","detail":{"token":"xxx.xxx.xxx","token_type":"Bearer"}}
|
||||||
|
|
||||||
|
# 2. 使用 token 上传文件
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "file=@/path/to/file.pdf"
|
||||||
|
|
||||||
|
# 3. 使用 token 分享文本
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "text=这是要分享的文本内容"
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
## 分片上传 API
|
## 分片上传 API
|
||||||
|
|
||||||
对于大文件,FileCodeBox 支持分片上传功能。分片上传将大文件分割成多个小块分别上传,支持断点续传。
|
对于大文件,FileCodeBox 支持分片上传功能。分片上传将大文件分割成多个小块分别上传,支持断点续传。
|
||||||
|
|||||||
@@ -267,6 +267,80 @@ python main.py
|
|||||||
2. 输入管理员密码 `FileCodeBox2023`
|
2. 输入管理员密码 `FileCodeBox2023`
|
||||||
3. 管理文件和配置
|
3. 管理文件和配置
|
||||||
|
|
||||||
|
### 命令行上传(curl)
|
||||||
|
|
||||||
|
支持通过 curl 命令上传文件并获取取件码:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 上传文件(默认1天有效期)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/your/file.txt"
|
||||||
|
|
||||||
|
# 上传文件并指定有效期(1小时)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/your/file.txt" \
|
||||||
|
-F "expire_value=1" \
|
||||||
|
-F "expire_style=hour"
|
||||||
|
|
||||||
|
# 上传文件并指定有效期(可下载10次)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/your/file.txt" \
|
||||||
|
-F "expire_value=10" \
|
||||||
|
-F "expire_style=count"
|
||||||
|
|
||||||
|
# 分享文本
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-F "text=这是要分享的文本内容"
|
||||||
|
|
||||||
|
# 通过取件码下载文件
|
||||||
|
curl -L "http://localhost:12345/share/select/?code=取件码" -o downloaded_file
|
||||||
|
```
|
||||||
|
|
||||||
|
**参数说明:**
|
||||||
|
- `expire_value`: 有效期数值(默认1)
|
||||||
|
- `expire_style`: 有效期类型
|
||||||
|
- `day` - 天数
|
||||||
|
- `hour` - 小时
|
||||||
|
- `minute` - 分钟
|
||||||
|
- `count` - 下载次数
|
||||||
|
- `forever` - 永久有效
|
||||||
|
|
||||||
|
**返回示例:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "success",
|
||||||
|
"detail": {
|
||||||
|
"code": "abcd1234",
|
||||||
|
"name": "file.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
> 注意:如果管理面板关闭了游客上传(`openUpload=false`),需要先登录获取 token,然后在请求中添加 `Authorization: Bearer <token>` 头。
|
||||||
|
|
||||||
|
**需要认证时的用法:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. 先登录获取 token
|
||||||
|
curl -X POST "http://localhost:12345/admin/login" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"password": "FileCodeBox2023"}'
|
||||||
|
|
||||||
|
# 返回示例:
|
||||||
|
# {"code":200,"msg":"success","detail":{"token":"xxx.xxx.xxx","token_type":"Bearer"}}
|
||||||
|
|
||||||
|
# 2. 使用 token 上传文件
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "file=@/path/to/your/file.txt"
|
||||||
|
|
||||||
|
# 2. 使用 token 分享文本
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "text=这是要分享的文本内容"
|
||||||
|
```
|
||||||
|
|
||||||
## 🛠 开发指南
|
## 🛠 开发指南
|
||||||
|
|
||||||
### 项目结构
|
### 项目结构
|
||||||
|
|||||||
+76
-2
@@ -259,10 +259,84 @@ python main.py
|
|||||||
|
|
||||||
### Admin Panel
|
### Admin Panel
|
||||||
|
|
||||||
1. Visit `/admin`
|
1. Visit `/#/admin`
|
||||||
2. Enter admin password
|
2. Enter admin password `FileCodeBox2023`
|
||||||
3. Manage files and settings
|
3. Manage files and settings
|
||||||
|
|
||||||
|
### Command Line Upload (curl)
|
||||||
|
|
||||||
|
Upload files and get extraction codes via curl:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Upload file (default 1 day expiration)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/your/file.txt"
|
||||||
|
|
||||||
|
# Upload file with expiration (1 hour)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/your/file.txt" \
|
||||||
|
-F "expire_value=1" \
|
||||||
|
-F "expire_style=hour"
|
||||||
|
|
||||||
|
# Upload file with download limit (10 downloads)
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-F "file=@/path/to/your/file.txt" \
|
||||||
|
-F "expire_value=10" \
|
||||||
|
-F "expire_style=count"
|
||||||
|
|
||||||
|
# Share text
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-F "text=This is the text content to share"
|
||||||
|
|
||||||
|
# Download file by extraction code
|
||||||
|
curl -L "http://localhost:12345/share/select/?code=YOUR_CODE" -o downloaded_file
|
||||||
|
```
|
||||||
|
|
||||||
|
**Parameters:**
|
||||||
|
- `expire_value`: Expiration value (default 1)
|
||||||
|
- `expire_style`: Expiration type
|
||||||
|
- `day` - Days
|
||||||
|
- `hour` - Hours
|
||||||
|
- `minute` - Minutes
|
||||||
|
- `count` - Download count
|
||||||
|
- `forever` - Never expire
|
||||||
|
|
||||||
|
**Response Example:**
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"code": 200,
|
||||||
|
"msg": "success",
|
||||||
|
"detail": {
|
||||||
|
"code": "abcd1234",
|
||||||
|
"name": "file.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: If guest upload is disabled in admin panel (`openUpload=false`), you need to login first to get a token, then add `Authorization: Bearer <token>` header to your requests.
|
||||||
|
|
||||||
|
**When Authentication Required:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. Login to get token
|
||||||
|
curl -X POST "http://localhost:12345/admin/login" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d '{"password": "FileCodeBox2023"}'
|
||||||
|
|
||||||
|
# Response:
|
||||||
|
# {"code":200,"msg":"success","detail":{"token":"xxx.xxx.xxx","token_type":"Bearer"}}
|
||||||
|
|
||||||
|
# 2. Upload file with token
|
||||||
|
curl -X POST "http://localhost:12345/share/file/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "file=@/path/to/your/file.txt"
|
||||||
|
|
||||||
|
# 3. Share text with token
|
||||||
|
curl -X POST "http://localhost:12345/share/text/" \
|
||||||
|
-H "Authorization: Bearer xxx.xxx.xxx" \
|
||||||
|
-F "text=This is the text content to share"
|
||||||
|
```
|
||||||
|
|
||||||
## 🛠 Development Guide
|
## 🛠 Development Guide
|
||||||
|
|
||||||
### Project Structure
|
### Project Structure
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
import{c as l,d as _,u as M,r as m,f as p,R as C,a as b,o as h,b as t,n as o,e,i as z,l as i,I as D,t as f,X as L,y as B,D as j,G as E,k as F,E as I,m as N}from"./index-B3zfsvgW.js";import{B as R}from"./box-COy3AQAQ.js";const S=l("cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);const V=l("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);const Z=l("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);const q=l("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]),A={class:"flex items-center"},$={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},G={class:"flex-1 overflow-y-auto custom-scrollbar"},H={class:"p-4 space-y-2"},O=["onClick"],T={class:"flex-1 flex flex-col h-full"},U={class:"flex items-center justify-between h-16 px-4"},P=_({__name:"AdminLayout",setup(W){const d=D(),{t:n}=M(),a=z("isDarkMode"),x=[{id:"Dashboard",name:n("admin.dashboard.title"),icon:Z,redirect:"/admin/dashboard"},{id:"FileManage",name:n("admin.fileManage.title"),icon:V,redirect:"/admin/files"},{id:"Settings",name:n("admin.settings.title"),icon:S,redirect:"/admin/settings"}],r=m(!0),g=()=>{r.value=!r.value},c=()=>{window.innerWidth>=1024?r.value=!0:r.value=!1};p(()=>{c(),window.addEventListener("resize",c)}),C(()=>{window.removeEventListener("resize",c)});const k=m({page:1,size:10,total:0}),v=async()=>{try{k.value.total=85}catch(u){console.error("加载文件列表失败:",u)}};return p(()=>{v()}),(u,y)=>{const w=E("router-view");return h(),b("div",{class:o(["h-screen flex flex-col lg:flex-row transition-colors duration-300",[e(a)?"bg-gray-900":"bg-gray-50"]])},[t("aside",{class:o(["fixed inset-y-0 border-transparent left-0 z-50 w-64 transform transition-all duration-300 ease-in-out lg:relative lg:translate-x-0 border-r flex flex-col h-full lg:h-screen",[e(a)?"bg-gray-800 bg-opacity-90 backdrop-filter backdrop-blur-xl ":"bg-white ",{"-translate-x-full":!r.value}]])},[t("div",{class:o(["flex items-center justify-between h-16 px-4 border-b",[e(a)?"border-gray-700":"border-gray-200"]])},[t("div",A,[t("div",$,[t("div",{class:o(["rounded-full p-1",[e(a)?"bg-gray-800":"bg-white"]])},[i(e(R),{class:o(["w-6 h-6",[e(a)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("h1",{onClick:y[0]||(y[0]=s=>e(d).push("/")),class:o(["ml-2 text-xl font-semibold cursor-pointer",[e(a)?"text-white":"text-gray-800"]])},f(e(n)("common.appName")),3)]),t("button",{onClick:g,class:"lg:hidden"},[i(e(L),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])],2),t("nav",G,[t("ul",H,[(h(),b(B,null,j(x,s=>t("li",{key:s.id},[t("a",{onClick:X=>e(d).push(s.redirect),class:o(["flex items-center p-2 rounded-lg transition-colors duration-200",[e(d).currentRoute.value.name===s.id?e(a)?"bg-indigo-900 text-indigo-400":"bg-indigo-100 text-indigo-600":e(a)?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-100"]])},[(h(),F(N(s.icon),{class:"w-5 h-5 mr-3"})),I(" "+f(s.name),1)],10,O)])),64))])])],2),t("div",T,[t("header",{class:o(["shadow-md border-b transition-colors duration-300 h-16",[e(a)?"bg-gray-800 border-gray-700":"bg-white border-gray-200"]])},[t("div",U,[t("button",{onClick:g,class:"lg:hidden"},[i(e(q),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])])],2),t("main",{class:o(["overflow-y-auto transition-colors duration-300 custom-scrollbar",[e(a)?"bg-gray-900":"bg-gray-50"]])},[i(w)],2)])],2)}}});export{P as default};
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import{c as l,d as _,u as M,r as m,f as p,R as C,a as b,o as h,b as t,n as o,e,i as z,l as i,I as D,t as f,X as L,y as B,D as j,G as E,k as F,E as I,m as N}from"./index-B9FIg8c4.js";import{B as R}from"./box-BaIzuVAS.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const S=l("cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const V=l("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const Z=l("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const q=l("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]),A={class:"flex items-center"},$={class:"rounded-full bg-gradient-to-r from-indigo-500 via-purple-500 to-pink-500 p-1 animate-spin-slow"},G={class:"flex-1 overflow-y-auto custom-scrollbar"},H={class:"p-4 space-y-2"},O=["onClick"],T={class:"flex-1 flex flex-col h-full"},U={class:"flex items-center justify-between h-16 px-4"},P=_({__name:"AdminLayout",setup(W){const d=D(),{t:n}=M(),a=z("isDarkMode"),x=[{id:"Dashboard",name:n("admin.dashboard.title"),icon:Z,redirect:"/admin/dashboard"},{id:"FileManage",name:n("admin.fileManage.title"),icon:V,redirect:"/admin/files"},{id:"Settings",name:n("admin.settings.title"),icon:S,redirect:"/admin/settings"}],r=m(!0),g=()=>{r.value=!r.value},c=()=>{window.innerWidth>=1024?r.value=!0:r.value=!1};p(()=>{c(),window.addEventListener("resize",c)}),C(()=>{window.removeEventListener("resize",c)});const k=m({page:1,size:10,total:0}),v=async()=>{try{k.value.total=85}catch(u){console.error("加载文件列表失败:",u)}};return p(()=>{v()}),(u,y)=>{const w=E("router-view");return h(),b("div",{class:o(["h-screen flex flex-col lg:flex-row transition-colors duration-300",[e(a)?"bg-gray-900":"bg-gray-50"]])},[t("aside",{class:o(["fixed inset-y-0 border-transparent left-0 z-50 w-64 transform transition-all duration-300 ease-in-out lg:relative lg:translate-x-0 border-r flex flex-col h-full lg:h-screen",[e(a)?"bg-gray-800 bg-opacity-90 backdrop-filter backdrop-blur-xl ":"bg-white ",{"-translate-x-full":!r.value}]])},[t("div",{class:o(["flex items-center justify-between h-16 px-4 border-b",[e(a)?"border-gray-700":"border-gray-200"]])},[t("div",A,[t("div",$,[t("div",{class:o(["rounded-full p-1",[e(a)?"bg-gray-800":"bg-white"]])},[i(e(R),{class:o(["w-6 h-6",[e(a)?"text-indigo-400":"text-indigo-600"]])},null,8,["class"])],2)]),t("h1",{onClick:y[0]||(y[0]=s=>e(d).push("/")),class:o(["ml-2 text-xl font-semibold cursor-pointer",[e(a)?"text-white":"text-gray-800"]])},f(e(n)("common.appName")),3)]),t("button",{onClick:g,class:"lg:hidden"},[i(e(L),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])],2),t("nav",G,[t("ul",H,[(h(),b(B,null,j(x,s=>t("li",{key:s.id},[t("a",{onClick:X=>e(d).push(s.redirect),class:o(["flex items-center p-2 rounded-lg transition-colors duration-200",[e(d).currentRoute.value.name===s.id?e(a)?"bg-indigo-900 text-indigo-400":"bg-indigo-100 text-indigo-600":e(a)?"text-gray-400 hover:bg-gray-700":"text-gray-600 hover:bg-gray-100"]])},[(h(),F(N(s.icon),{class:"w-5 h-5 mr-3"})),I(" "+f(s.name),1)],10,O)])),64))])])],2),t("div",T,[t("header",{class:o(["shadow-md border-b transition-colors duration-300 h-16",[e(a)?"bg-gray-800 border-gray-700":"bg-white border-gray-200"]])},[t("div",U,[t("button",{onClick:g,class:"lg:hidden"},[i(e(q),{class:o(["w-6 h-6",[e(a)?"text-gray-400":"text-gray-600"]])},null,8,["class"])])])],2),t("main",{class:o(["overflow-y-auto transition-colors duration-300 custom-scrollbar",[e(a)?"bg-gray-900":"bg-gray-50"]])},[i(w)],2)])],2)}}});export{P as default};
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#e5e7eb;transition:.4s}.dark .slider{background-color:#4b5563}input:checked+.slider{background-color:#4f46e5}.dark input:checked+.slider{background-color:#4f46e5}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.dark .slider:before{background-color:#e5e7eb}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin-slow{animation:spin 8s linear infinite}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.custom-scrollbar::-webkit-scrollbar{width:6px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:#cbd5e0;border-radius:3px}:global(.dark) .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#4a5568}
|
.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#e5e7eb;transition:.4s}.dark .slider{background-color:#4b5563}input:checked+.slider{background-color:#4f46e5}.dark input:checked+.slider{background-color:#4f46e5}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;transition:.4s}.dark .slider:before{background-color:#e5e7eb}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-spin-slow{animation:spin 8s linear infinite}.transition-colors{transition-property:background-color,border-color,color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s}.custom-scrollbar::-webkit-scrollbar{width:6px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{background-color:#cbd5e0;border-radius:3px}:is():hover{background-color:#a0aec0}:global(.dark) .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#4a5568}:is():hover{background-color:#2d3748}
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{c as _,d as S,g as x,a as M,o as v,n as d,e as t,i as k,b as s,t as r,k as w,m as D,K as F,u as U,V as B,f as z,l as g,v as m,E as C,W as $}from"./index-B3zfsvgW.js";import{F as T}from"./file-Ceuyr6iv.js";import{H as V}from"./hard-drive-5GIKYPKr.js";const H=_("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const N=_("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),j={class:"flex items-center justify-between"},b=S({__name:"StatCard",props:{title:{},value:{},icon:{},iconColor:{},descriptionType:{default:"neutral"}},setup(f){const l=f,e=k("isDarkMode"),a=x(()=>({indigo:e?"bg-indigo-900":"bg-indigo-100",purple:e?"bg-purple-900":"bg-purple-100",green:e?"bg-green-900":"bg-green-100",blue:e?"bg-blue-900":"bg-blue-100"})[l.iconColor]),h=x(()=>({indigo:e?"text-indigo-400":"text-indigo-600",purple:e?"text-purple-400":"text-purple-600",green:e?"text-green-400":"text-green-600",blue:e?"text-blue-400":"text-blue-600"})[l.iconColor]),p=x(()=>({success:e?"text-green-400":"text-green-600",error:e?"text-red-400":"text-red-600",neutral:e?"text-gray-400":"text-gray-600"})[l.descriptionType]);return(i,o)=>(v(),M("div",{class:d(["p-6 rounded-lg shadow-md transition-colors duration-300",[t(e)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[s("div",j,[s("div",null,[s("p",{class:d(["text-sm",[t(e)?"text-gray-400":"text-gray-600"]])},r(i.title),3),s("h3",{class:d(["text-2xl font-bold mt-1",[t(e)?"text-white":"text-gray-800"]])},r(i.value),3)]),s("div",{class:d(["p-3 rounded-full",a.value])},[(v(),w(D(i.icon),{class:d(["w-6 h-6",h.value])},null,8,["class"]))],2)]),s("p",{class:d(["text-sm mt-2",p.value])},[F(i.$slots,"description")],2)],2))}}),I={class:"p-6 overflow-y-auto custom-scrollbar"},L={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},A={class:"ml-2"},E={class:"ml-2"},K={class:"text-sm mt-1"},Y=S({__name:"DashboardView",setup(f){const l=k("isDarkMode"),{t:e}=U(),a=B({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),h=o=>{const c=new Date().getTime()-o,u=Math.floor(c/(1440*60*1e3)),y=Math.floor(c%(1440*60*1e3)/(3600*1e3));return`${u}天${y}小时`},p=o=>{const n=parseInt(o)/1024,c=n/1024,u=c/1024,y=u/1024;return y>1?`${y.toFixed(2)}TB`:u>1?`${u.toFixed(2)}GB`:c>1?`${c.toFixed(2)}MB`:n>1?`${n.toFixed(2)}KB`:`${o}B`},i=async()=>{const o=await $.getDashboard();o.detail&&(a.totalFiles=o.detail.totalFiles,a.storageUsed=p(o.detail.storageUsed.toString()),a.yesterdaySize=p(o.detail.yesterdaySize.toString()),a.todaySize=p(o.detail.todaySize.toString()),a.yesterdayCount=o.detail.yesterdayCount,a.todayCount=o.detail.todayCount,a.sysUptime=h(Number(o.detail.sysUptime)))};return z(()=>{i()}),(o,n)=>(v(),M("div",I,[s("h2",{class:d(["text-2xl font-bold mb-6",[t(l)?"text-white":"text-gray-800"]])},r(t(e)("admin.dashboard.title")),3),s("div",L,[g(b,{title:t(e)("admin.dashboard.totalFiles"),value:a.totalFiles,icon:t(T),"icon-color":"indigo","description-type":"success"},{description:m(()=>[s("span",null,r(t(e)("admin.dashboard.yesterday"))+":"+r(a.yesterdayCount),1),s("span",A,r(t(e)("admin.dashboard.today"))+":"+r(a.todayCount),1)]),_:1},8,["title","value","icon"]),g(b,{title:t(e)("admin.dashboard.storageSpace"),value:a.storageUsed,icon:t(V),"icon-color":"purple","description-type":"success"},{description:m(()=>[s("span",null,r(t(e)("admin.dashboard.yesterday"))+":"+r(a.yesterdaySize),1),s("span",E,r(t(e)("admin.dashboard.today"))+":"+r(a.todaySize),1)]),_:1},8,["title","value","icon"]),g(b,{title:t(e)("admin.dashboard.activeUsers"),value:"25",icon:t(N),"icon-color":"green","description-type":"error"},{description:m(()=>[s("span",null,r(t(e)("admin.dashboard.weeklyChange")),1)]),_:1},8,["title","icon"]),g(b,{title:t(e)("admin.dashboard.systemStatus"),value:t(e)("admin.dashboard.normal"),icon:t(H),"icon-color":"blue","description-type":"neutral"},{description:m(()=>[C(r(t(e)("admin.dashboard.serverUptime"))+": "+r(a.sysUptime),1)]),_:1},8,["title","value","icon"])]),s("div",{class:d(["mt-auto text-center py-4",[t(l)?"text-gray-400":"text-gray-600"]])},[n[1]||(n[1]=s("p",{class:"text-sm"}," 版本 v2.2.1 更新时间:2025-09-04 ",-1)),s("p",K,[C(" © "+r(new Date().getFullYear())+" ",1),n[0]||(n[0]=s("a",{href:"https://github.com/vastsa/FileCodeBox"},"FileCodeBox",-1))])],2)]))}});export{Y as default};
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import{c as _,d as S,g as x,a as M,o as v,n as d,e as t,i as k,b as s,t as r,k as w,m as D,K as F,u as U,V as B,f as z,l as g,v as m,E as C,W as $}from"./index-B9FIg8c4.js";import{F as T}from"./file-CSeBUDan.js";import{H as V}from"./hard-drive-DFfw9-r7.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const H=_("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const N=_("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),j={class:"flex items-center justify-between"},b=S({__name:"StatCard",props:{title:{},value:{},icon:{},iconColor:{},descriptionType:{default:"neutral"}},setup(f){const l=f,e=k("isDarkMode"),a=x(()=>({indigo:e?"bg-indigo-900":"bg-indigo-100",purple:e?"bg-purple-900":"bg-purple-100",green:e?"bg-green-900":"bg-green-100",blue:e?"bg-blue-900":"bg-blue-100"})[l.iconColor]),h=x(()=>({indigo:e?"text-indigo-400":"text-indigo-600",purple:e?"text-purple-400":"text-purple-600",green:e?"text-green-400":"text-green-600",blue:e?"text-blue-400":"text-blue-600"})[l.iconColor]),p=x(()=>({success:e?"text-green-400":"text-green-600",error:e?"text-red-400":"text-red-600",neutral:e?"text-gray-400":"text-gray-600"})[l.descriptionType]);return(i,o)=>(v(),M("div",{class:d(["p-6 rounded-lg shadow-md transition-colors duration-300",[t(e)?"bg-gray-800 bg-opacity-70":"bg-white"]])},[s("div",j,[s("div",null,[s("p",{class:d(["text-sm",[t(e)?"text-gray-400":"text-gray-600"]])},r(i.title),3),s("h3",{class:d(["text-2xl font-bold mt-1",[t(e)?"text-white":"text-gray-800"]])},r(i.value),3)]),s("div",{class:d(["p-3 rounded-full",a.value])},[(v(),w(D(i.icon),{class:d(["w-6 h-6",h.value])},null,8,["class"]))],2)]),s("p",{class:d(["text-sm mt-2",p.value])},[F(i.$slots,"description")],2)],2))}}),I={class:"p-6 overflow-y-auto custom-scrollbar"},L={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"},A={class:"ml-2"},E={class:"ml-2"},K={class:"text-sm mt-1"},Y=S({__name:"DashboardView",setup(f){const l=k("isDarkMode"),{t:e}=U(),a=B({totalFiles:0,storageUsed:0,yesterdayCount:0,todayCount:0,yesterdaySize:0,todaySize:0,sysUptime:0}),h=o=>{const c=new Date().getTime()-o,u=Math.floor(c/(1440*60*1e3)),y=Math.floor(c%(1440*60*1e3)/(3600*1e3));return`${u}天${y}小时`},p=o=>{const n=parseInt(o)/1024,c=n/1024,u=c/1024,y=u/1024;return y>1?`${y.toFixed(2)}TB`:u>1?`${u.toFixed(2)}GB`:c>1?`${c.toFixed(2)}MB`:n>1?`${n.toFixed(2)}KB`:`${o}B`},i=async()=>{const o=await $.getDashboard();o.detail&&(a.totalFiles=o.detail.totalFiles,a.storageUsed=p(o.detail.storageUsed.toString()),a.yesterdaySize=p(o.detail.yesterdaySize.toString()),a.todaySize=p(o.detail.todaySize.toString()),a.yesterdayCount=o.detail.yesterdayCount,a.todayCount=o.detail.todayCount,a.sysUptime=h(Number(o.detail.sysUptime)))};return z(()=>{i()}),(o,n)=>(v(),M("div",I,[s("h2",{class:d(["text-2xl font-bold mb-6",[t(l)?"text-white":"text-gray-800"]])},r(t(e)("admin.dashboard.title")),3),s("div",L,[g(b,{title:t(e)("admin.dashboard.totalFiles"),value:a.totalFiles,icon:t(T),"icon-color":"indigo","description-type":"success"},{description:m(()=>[s("span",null,r(t(e)("admin.dashboard.yesterday"))+":"+r(a.yesterdayCount),1),s("span",A,r(t(e)("admin.dashboard.today"))+":"+r(a.todayCount),1)]),_:1},8,["title","value","icon"]),g(b,{title:t(e)("admin.dashboard.storageSpace"),value:a.storageUsed,icon:t(V),"icon-color":"purple","description-type":"success"},{description:m(()=>[s("span",null,r(t(e)("admin.dashboard.yesterday"))+":"+r(a.yesterdaySize),1),s("span",E,r(t(e)("admin.dashboard.today"))+":"+r(a.todaySize),1)]),_:1},8,["title","value","icon"]),g(b,{title:t(e)("admin.dashboard.activeUsers"),value:"25",icon:t(N),"icon-color":"green","description-type":"error"},{description:m(()=>[s("span",null,r(t(e)("admin.dashboard.weeklyChange")),1)]),_:1},8,["title","icon"]),g(b,{title:t(e)("admin.dashboard.systemStatus"),value:t(e)("admin.dashboard.normal"),icon:t(H),"icon-color":"blue","description-type":"neutral"},{description:m(()=>[C(r(t(e)("admin.dashboard.serverUptime"))+": "+r(a.sysUptime),1)]),_:1},8,["title","value","icon"])]),s("div",{class:d(["mt-auto text-center py-4",[t(l)?"text-gray-400":"text-gray-600"]])},[n[1]||(n[1]=s("p",{class:"text-sm"}," 版本 v2.2.1 更新时间:2025-09-04 ",-1)),s("p",K,[C(" © "+r(new Date().getFullYear())+" ",1),n[0]||(n[0]=s("a",{href:"https://github.com/vastsa/FileCodeBox"},"FileCodeBox",-1))])],2)]))}});export{Y as default};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{Q as y,r as c,S as u,g as b,d as w,p as x,a as h,o as S,b as e,n as d,e as i,i as A,l as k,h as I,x as D,z as N,E as T,t as _,a1 as E,I as M,_ as O}from"./index-B3zfsvgW.js";import{B as V}from"./box-COy3AQAQ.js";const j=y("admin",()=>{const p=c(localStorage.getItem(u.ADMIN_PASSWORD)||""),s=c(localStorage.getItem(u.TOKEN)||""),a=c(!1),l=c(null),n=b(()=>a.value&&!!s.value),f=o=>{p.value=o,localStorage.setItem(u.ADMIN_PASSWORD,o)},g=o=>{s.value=o,localStorage.setItem(u.TOKEN,o)},m=o=>{l.value=o,a.value=!0,g(o.token)};return{adminPassword:p,token:s,isLoggedIn:a,userInfo:l,isAuthenticated:n,updateAdminPassword:f,setToken:g,setUserInfo:m,login:o=>{m(o)},logout:()=>{p.value="",s.value="",a.value=!1,l.value=null,localStorage.removeItem(u.ADMIN_PASSWORD),localStorage.removeItem(u.TOKEN)},initAuth:()=>{const o=localStorage.getItem(u.TOKEN);o&&(s.value=o,a.value=!0)}}}),B=j,K={class:"mx-auto h-16 w-16 relative"},P={class:"rounded-md shadow-sm -space-y-px"},R=["disabled"],z=w({__name:"LoginView",setup(p){const s=x(),a=c(""),l=c(!1),n=A("isDarkMode"),f=B(),g=()=>{let r=!0;return a.value?a.value.length<6&&(s.showAlert("密码长度至少为6位","error"),r=!1):(s.showAlert("无效的密码","error"),r=!1),r},m=M(),v=async()=>{if(g()){l.value=!0;try{const r=await E.login(a.value);r.detail?.token?(f.setToken(r.detail.token),m.push("/admin")):s.showAlert("登录失败:未获取到有效令牌","error")}catch(r){const t=r&&typeof r=="object"&&"response"in r&&r.response?.data?.detail||"登录失败";s.showAlert(t,"error")}finally{l.value=!1}}};return(r,t)=>(S(),h("div",{class:d(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",i(n)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:d(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[i(n)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",K,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:d(["absolute inset-1 rounded-full flex items-center justify-center",i(n)?"bg-gray-800":"bg-white"])},[k(i(V),{class:d(["h-8 w-8",i(n)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:d(["mt-6 text-center text-3xl font-extrabold",i(n)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:I(v,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",P,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),D(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=o=>a.value=o),class:d(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",i(n)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[N,a.value]])])]),e("div",null,[e("button",{type:"submit",class:d(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",i(n)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",l.value?"opacity-75 cursor-not-allowed":""]),disabled:l.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),T(" "+_(l.value?"登录中...":"登录"),1)],10,R)])],32)],2)],2))}}),C=O(z,[["__scopeId","data-v-894571a2"]]);export{C as default};
|
import{Q as y,r as c,S as u,g as b,d as w,p as x,a as h,o as S,b as e,n as d,e as i,i as A,l as k,h as I,x as D,z as N,E as T,t as _,a1 as E,I as M,_ as O}from"./index-B9FIg8c4.js";import{B as V}from"./box-BaIzuVAS.js";const j=y("admin",()=>{const p=c(localStorage.getItem(u.ADMIN_PASSWORD)||""),s=c(localStorage.getItem(u.TOKEN)||""),a=c(!1),l=c(null),n=b(()=>a.value&&!!s.value),f=o=>{p.value=o,localStorage.setItem(u.ADMIN_PASSWORD,o)},g=o=>{s.value=o,localStorage.setItem(u.TOKEN,o)},m=o=>{l.value=o,a.value=!0,g(o.token)};return{adminPassword:p,token:s,isLoggedIn:a,userInfo:l,isAuthenticated:n,updateAdminPassword:f,setToken:g,setUserInfo:m,login:o=>{m(o)},logout:()=>{p.value="",s.value="",a.value=!1,l.value=null,localStorage.removeItem(u.ADMIN_PASSWORD),localStorage.removeItem(u.TOKEN)},initAuth:()=>{const o=localStorage.getItem(u.TOKEN);o&&(s.value=o,a.value=!0)}}}),B=j,K={class:"mx-auto h-16 w-16 relative"},P={class:"rounded-md shadow-sm -space-y-px"},R=["disabled"],z=w({__name:"LoginView",setup(p){const s=x(),a=c(""),l=c(!1),n=A("isDarkMode"),f=B(),g=()=>{let r=!0;return a.value?a.value.length<6&&(s.showAlert("密码长度至少为6位","error"),r=!1):(s.showAlert("无效的密码","error"),r=!1),r},m=M(),v=async()=>{if(g()){l.value=!0;try{const r=await E.login(a.value);r.detail?.token?(f.setToken(r.detail.token),m.push("/admin")):s.showAlert("登录失败:未获取到有效令牌","error")}catch(r){const t=r&&typeof r=="object"&&"response"in r&&r.response?.data?.detail||"登录失败";s.showAlert(t,"error")}finally{l.value=!1}}};return(r,t)=>(S(),h("div",{class:d(["min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8 transition-colors duration-200 relative overflow-hidden",i(n)?"bg-gray-900":"bg-gray-50"])},[t[6]||(t[6]=e("div",{class:"absolute inset-0 z-0"},[e("div",{class:"cyber-grid"}),e("div",{class:"floating-particles"})],-1)),e("div",{class:d(["max-w-md w-full space-y-8 backdrop-blur-lg bg-opacity-20 p-8 rounded-xl border border-opacity-20",[i(n)?"bg-gray-800 border-gray-600":"bg-white/70 border-gray-200"]])},[e("div",null,[e("div",K,[t[1]||(t[1]=e("div",{class:"absolute inset-0 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full animate-spin-slow"},null,-1)),t[2]||(t[2]=e("div",{class:"absolute -inset-2 bg-gradient-to-r from-cyan-500 via-purple-500 to-pink-500 rounded-full opacity-50 blur-md animate-pulse"},null,-1)),e("div",{class:d(["absolute inset-1 rounded-full flex items-center justify-center",i(n)?"bg-gray-800":"bg-white"])},[k(i(V),{class:d(["h-8 w-8",i(n)?"text-cyan-400":"text-cyan-600"])},null,8,["class"])],2)]),e("h2",{class:d(["mt-6 text-center text-3xl font-extrabold",i(n)?"text-white":"text-gray-900"])}," 登录 ",2)]),e("form",{class:"mt-8 space-y-6",onSubmit:I(v,["prevent"])},[t[5]||(t[5]=e("input",{type:"hidden",name:"remember",value:"true"},null,-1)),e("div",P,[e("div",null,[t[3]||(t[3]=e("label",{for:"password",class:"sr-only"},"密码",-1)),D(e("input",{id:"password",name:"password",type:"password",autocomplete:"current-password",required:"","onUpdate:modelValue":t[0]||(t[0]=o=>a.value=o),class:d(["appearance-none rounded-t-md relative block w-full px-4 py-3 border transition-all duration-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-cyan-500 focus:border-cyan-500 focus:z-10 sm:text-sm backdrop-blur-sm",i(n)?"bg-gray-800/50 border-gray-600 text-white placeholder-gray-400 hover:border-gray-500":"bg-white/50 border-gray-300 text-gray-900 hover:border-gray-400"]),placeholder:"密码"},null,2),[[N,a.value]])])]),e("div",null,[e("button",{type:"submit",class:d(["group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white transition-all duration-300 transform hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500 shadow-lg hover:shadow-cyan-500/50",i(n)?"bg-gradient-to-r from-cyan-500 to-purple-500 hover:from-cyan-600 hover:to-purple-600":"bg-gradient-to-r from-cyan-600 to-purple-600 hover:from-cyan-700 hover:to-purple-700",l.value?"opacity-75 cursor-not-allowed":""]),disabled:l.value},[t[4]||(t[4]=e("span",{class:"absolute left-0 inset-y-0 flex items-center pl-3"},null,-1)),T(" "+_(l.value?"登录中...":"登录"),1)],10,R)])],32)],2)],2))}}),C=O(z,[["__scopeId","data-v-894571a2"]]);export{C as default};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.custom-scrollbar[data-v-bebdfe92]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.3) rgba(243,244,246,.5)}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar{width:6px;height:6px}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar-track{background:#f3f4f680;border-radius:3px}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:3px;-webkit-transition:background-color .3s;transition:background-color .3s}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar-thumb:hover{background-color:#9ca3afb3}[data-v-bebdfe92] [class*=dark] .custom-scrollbar{scrollbar-color:rgba(75,85,99,.5) rgba(31,41,55,.5)}[data-v-bebdfe92] [class*=dark] .custom-scrollbar::-webkit-scrollbar-track{background:#1f293780}[data-v-bebdfe92] [class*=dark] .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#4b556380}[data-v-bebdfe92] [class*=dark] .custom-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#4b5563b3}.fade-enter-active[data-v-832d304e],.fade-leave-active[data-v-832d304e]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-832d304e],.fade-leave-to[data-v-832d304e]{opacity:0;transform:translateY(10px)}@media(min-width:640px){.sm\:w-120[data-v-832d304e]{width:30rem}}.fade-enter-to[data-v-832d304e],.fade-leave-from[data-v-832d304e]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-832d304e],.drawer-leave-active[data-v-832d304e]{transition:transform .3s ease}.drawer-enter-from[data-v-832d304e],.drawer-leave-to[data-v-832d304e]{transform:translate(100%)}.list-enter-active[data-v-832d304e],.list-leave-active[data-v-832d304e]{transition:all .5s ease}.list-enter-from[data-v-832d304e],.list-leave-to[data-v-832d304e]{opacity:0;transform:translate(30px)}select option[data-v-832d304e]{padding:8px;margin:4px;border-radius:6px}select option[data-v-832d304e]:checked{background:linear-gradient(to right,#6366f180,#a855f780)!important;color:#fff!important}.dark select option[data-v-832d304e]:checked{background:linear-gradient(to right,#6366f1b3,#a855f7b3)!important}select option[data-v-832d304e]:hover{background-color:#6366f11a}.dark select option[data-v-832d304e]:hover{background-color:#6366f133}.custom-scrollbar[data-v-832d304e]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.4) rgba(243,244,246,.3)}.custom-scrollbar[data-v-832d304e]::-webkit-scrollbar{width:8px;height:8px}.custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-track{background:#f3f4f64d;border-radius:6px;margin:4px}.custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-thumb{background:linear-gradient(135deg,#6366f199,#a855f799);border-radius:6px;border:1px solid rgba(255,255,255,.2);-webkit-transition:all .3s ease;transition:all .3s ease}.custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-thumb:hover{background:linear-gradient(135deg,#6366f1cc,#a855f7cc);transform:scale(1.1)}.custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-corner{background:transparent}.dark .custom-scrollbar[data-v-832d304e]{scrollbar-color:rgba(75,85,99,.6) rgba(31,41,55,.4)}.dark .custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-track{background:#1f293766}.dark .custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-thumb{background:linear-gradient(135deg,#6366f1b3,#a855f7b3);border:1px solid rgba(255,255,255,.1)}.dark .custom-scrollbar[data-v-832d304e]::-webkit-scrollbar-thumb:hover{background:linear-gradient(135deg,#6366f1e6,#a855f7e6)}
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.border-progress-container[data-v-2fbf5085]{position:relative;width:100%;height:100%}.border-progress-canvas[data-v-2fbf5085]{position:absolute;top:0;left:0;width:100%;height:100%;transition:all .3s ease}.custom-scrollbar[data-v-bebdfe92]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.3) rgba(243,244,246,.5)}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar{width:6px;height:6px}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar-track{background:#f3f4f680;border-radius:3px}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:3px;-webkit-transition:background-color .3s;transition:background-color .3s}.custom-scrollbar[data-v-bebdfe92]::-webkit-scrollbar-thumb:hover{background-color:#9ca3afb3}[data-v-bebdfe92] [class*=dark] .custom-scrollbar{scrollbar-color:rgba(75,85,99,.5) rgba(31,41,55,.5)}[data-v-bebdfe92] [class*=dark] .custom-scrollbar::-webkit-scrollbar-track{background:#1f293780}[data-v-bebdfe92] [class*=dark] .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#4b556380}[data-v-bebdfe92] [class*=dark] .custom-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#4b5563b3}.fade-enter-active[data-v-0a16769d],.fade-leave-active[data-v-0a16769d]{transition:opacity .3s ease,transform .3s ease}.fade-enter-from[data-v-0a16769d],.fade-leave-to[data-v-0a16769d]{opacity:0;transform:translateY(10px)}@media (min-width: 640px){.sm\:w-120[data-v-0a16769d]{width:30rem}}.fade-enter-to[data-v-0a16769d],.fade-leave-from[data-v-0a16769d]{opacity:1;transform:translateY(0)}.drawer-enter-active[data-v-0a16769d],.drawer-leave-active[data-v-0a16769d]{transition:transform .3s ease}.drawer-enter-from[data-v-0a16769d],.drawer-leave-to[data-v-0a16769d]{transform:translate(100%)}.list-enter-active[data-v-0a16769d],.list-leave-active[data-v-0a16769d]{transition:all .5s ease}.list-enter-from[data-v-0a16769d],.list-leave-to[data-v-0a16769d]{opacity:0;transform:translate(30px)}select option[data-v-0a16769d]{padding:8px;margin:4px;border-radius:6px}select option[data-v-0a16769d]:checked{background:linear-gradient(to right,#6366f180,#a855f780)!important;color:#fff!important}.dark select option[data-v-0a16769d]:checked{background:linear-gradient(to right,#6366f1b3,#a855f7b3)!important}select option[data-v-0a16769d]:hover{background-color:#6366f11a}.dark select option[data-v-0a16769d]:hover{background-color:#6366f133}.custom-scrollbar[data-v-0a16769d]{scrollbar-width:thin;scrollbar-color:rgba(156,163,175,.4) rgba(243,244,246,.3)}.custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar{width:8px;height:8px}.custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-track{background:#f3f4f64d;border-radius:6px;margin:4px}.custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-thumb{background:linear-gradient(135deg,#6366f199,#a855f799);border-radius:6px;border:1px solid rgba(255,255,255,.2);-webkit-transition:all .3s ease;transition:all .3s ease}.custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-thumb:hover{background:linear-gradient(135deg,#6366f1cc,#a855f7cc);transform:scale(1.1)}.custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-corner{background:transparent}.dark .custom-scrollbar[data-v-0a16769d]{scrollbar-color:rgba(75,85,99,.6) rgba(31,41,55,.4)}.dark .custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-track{background:#1f293766}.dark .custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-thumb{background:linear-gradient(135deg,#6366f1b3,#a855f7b3);border:1px solid rgba(255,255,255,.1)}.dark .custom-scrollbar[data-v-0a16769d]::-webkit-scrollbar-thumb:hover{background:linear-gradient(135deg,#6366f1e6,#a855f7e6)}
|
||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
|||||||
|
import{c as a}from"./index-B9FIg8c4.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const e=a("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);export{e as B};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{c as a}from"./index-B3zfsvgW.js";const e=a("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);export{e as B};
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import{c}from"./index-B9FIg8c4.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const t=c("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);export{t as C};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{c}from"./index-B3zfsvgW.js";const t=c("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);export{t as C};
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import{c as a}from"./index-B9FIg8c4.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const t=a("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);export{t as F};
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{c as a}from"./index-B3zfsvgW.js";const t=a("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);export{t as F};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
import{c as e}from"./index-B3zfsvgW.js";const a=e("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);export{a as H};
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import{c as e}from"./index-B9FIg8c4.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const a=e("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);export{a as H};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
import{c as a}from"./index-B3zfsvgW.js";const c=a("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const t=a("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);export{c as E,t as T};
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import{c as a}from"./index-B9FIg8c4.js";/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const c=a("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
||||||
|
* @license lucide-vue-next v0.535.0 - ISC
|
||||||
|
*
|
||||||
|
* This source code is licensed under the ISC license.
|
||||||
|
* See the LICENSE file in the root directory of this source tree.
|
||||||
|
*/const t=a("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);export{c as E,t as T};
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
<link rel="manifest" href="/assets/manifest.json" />
|
<link rel="manifest" href="/assets/manifest.json" />
|
||||||
<meta name="github" content="https://github.com/vastsa/FileCodeBox" />
|
<meta name="github" content="https://github.com/vastsa/FileCodeBox" />
|
||||||
<title>{{title}}</title>
|
<title>{{title}}</title>
|
||||||
<script type="module" crossorigin src="/assets/index-B3zfsvgW.js"></script>
|
<script type="module" crossorigin src="/assets/index-B9FIg8c4.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BXCbdTRh.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-Xt5VatQo.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
Reference in New Issue
Block a user