23 Commits
Author SHA1 Message Date
zihluwang bd58369021 build: 更换 EULA 文件格式 2025-08-08 11:22:53 +08:00
zihluwang f2ab47ca39 build: 版本升级 2025-08-08 08:21:45 +08:00
zihluwang d7de5a1ed5 refactor: 在安装引导中添加 EULA
Closes #5
2025-08-08 07:43:59 +08:00
zihluwang 18be1fc099 build: 修改应用版本 2025-08-06 23:46:03 +08:00
zihluwang 825042e5b0 refactor: 修改应用图标 2025-08-06 23:44:33 +08:00
zihluwang 7d5a5cd14c build: 修改应用 identifier 2025-08-06 23:44:17 +08:00
zihluwang 65bc9cf80d chore: 移除 Square 和 Store Logo
根据 Tauri 官方文档 https://v2.tauri.app/develop/icons/,Square* 和 StoreLogo 都是为 AppX 和微软 Store 预留的图标。该应用没有上架应用商店的计划。
2025-08-06 23:39:42 +08:00
zihluwang 5dbddc69cd build: 发布 0.2.1 2025-07-30 11:26:15 +08:00
zihluwang 662b41cf44 docs: 添加 Mac 运行报错解决方案说明 2025-07-30 11:24:33 +08:00
zihluwang 32bd0ee261 docs: 根据原作者的要求移除其二维码 2025-07-30 11:24:11 +08:00
zihluwang 8daaa195ee fix: 修复无法获取上一条语录的问题 2025-07-29 16:17:39 +08:00
zihluwang a8d7519fb3 fix: 修复由于迁移数据库位置导致的无法启动的问题 2025-07-29 16:12:32 +08:00
zihluwang 84e06241aa feat: 禁用首条消息获取上一条功能 2025-07-29 16:04:28 +08:00
zihluwang e23a6e0cdc refactor: 应用 UI 工程化 2025-07-29 16:02:12 +08:00
zihluwang 404bbdd28a refactor: 添加使用许可说明 2025-07-29 14:07:41 +08:00
zihluwang 11bf8a7b66 refactor: 应用重命名为祖安语录 2025-07-29 11:30:07 +08:00
zihluwang ca79942a04 docs: 添加贡献指引 2025-07-29 11:01:21 +08:00
zihluwang 9627c4b1ad feat: 禁用窗口大小调节 2025-07-29 10:47:34 +08:00
zihluwang 68f70e9148 build: 针对 Windows 7 添加 WebView 安装引导
添加 WebView 安装引导
2025-07-29 10:43:29 +08:00
zihluwang 8e63340a27 docs: 添加构建配置
添加版权、作者信息,修改打包出的 Windows 安装包后缀 `en_US` 到 `zh_CN`
2025-07-29 10:38:55 +08:00
zihluwang 144f252759 docs: 修改错误的原仓库链接 2025-07-28 17:52:33 +08:00
zihluwang e91aecbef9 docs: 添加贡献文档 2025-07-28 17:51:04 +08:00
zihluwang c38905319d docs: add license and readme 2025-07-28 17:36:13 +08:00
30 changed files with 238 additions and 25 deletions

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
# Contributing
本项目基于 Tauri v2.0 开发,技术栈如下:
**后端**
- Rust 1.88.0
**前端**
- React v18
- Tailwind CSS v4
欢迎您从**代码**或**内容**两方面参与贡献,共同完善本项目。
## 贡献指引
### 代码贡献
1. 【可选】创建 Issue,讨论你的想法。
2. Fork 本仓库。
3. 基于 `develop` 分支创建新 `feature/<your_feature_name>` 分支。
4. 开始完善你的功能。
5. 测试功能。
6. 提交你的代码并通过创建 Pull Request 将代码合并到 `develop` 分支。
7. 等待上线。
### 内容贡献
**暂时还没想好怎么提交新内容,等待这里更新再说吧。**
+44
View File
@@ -0,0 +1,44 @@
# 最终用户许可协议
## 祖安语录
**版本**:0.3.x
**发布日期**:2025 年 x 月 x 日
通过安装、使用或分发本软件“祖安语录”(以下简称“软件”),您即表示您已阅读、理解并同意受本最终用户许可协议(以下简称“协议”)的约束。本软件由 Zihlu Wang(以下简称“开发者”)开发并提供。如果您不同意本协议的条款,请勿安装或使用本软件。
### 1. 软件概述
“祖安语录”是一款用于生成骂人语句的娱乐性软件,仅供娱乐用途。开发者不对用户使用本软件所生成内容的行为及其后果承担任何责任。
### 2. 许可授权
根据 MIT 开源许可证,本软件以免费形式提供给用户使用。开发者特此授予您一项全球范围内的、非独占的、不可转让的许可,允许您在遵守以下条件的情况下使用、分发和修改本软件:
- **使用**:您可以自由下载、安装和使用本软件。
- **分发**:您可以在附带原始项目仓库地址(`github.com/zihluwang/zuanbot`)的情况下分发本软件,但不得移除或修改原始版权声明和许可信息。
- **修改**:您可以自由修改本软件代码,前提是修改后的版本同样遵守 MIT 开源许可证。
### 3. 使用限制
本软件不设置任何特定的使用限制。然而,开发者提醒用户,骂人行为是不道德的,并且可能引发冲突或法律问题。用户在使用本软件生成的语句时,应自行判断其行为后果,并独自承担因此导致的所有责任。
### 4. 免责声明
- 本软件按“现状”提供,开发者不对其适销性、特定用途适用性或非侵权性作出任何明示或暗示的保证。
- 开发者不对因使用本软件而导致的任何直接或间接损害(包括但不限于数据丢失、精神损害或其他损失)承担责任。
- 用户使用本软件生成的任何内容所引发的纠纷、法律后果或其他责任,均由用户自行承担,与开发者无关。
### 5. 支持与更新
- 本软件为开源项目,若在使用过程中遇到问题,用户可前往 [GitHub 仓库](https://github.com/zihluwang/zuanbot)提交 Issue 获取社区支持。
- 技术支持以开源形式免费提供,开发者不保证问题的解决时间或结果。
### 6. 版权声明
版权 © 2025 Zihlu Wang 所有。本软件受 MIT 开源许可证保护,您可以在遵守许可证条款的前提下自由使用、分发和修改。
### 7. 联系方式
如有任何问题或建议,请访问 [GitHub 仓库](github.com/zihluwang/zuanbot) 与开发者联系。
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2025 Zihlu Wang
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+39 -4
View File
@@ -1,7 +1,42 @@
# Tauri + React + Typescript # 祖安语录桌面版
This template should help get you started developing with Tauri, React and Typescript in Vite. ![MIT Licence](https://img.shields.io/github/license/zihluwang/zuanbot)
## Recommended IDE Setup > 本仓库为 [cndiandian/zuanbot.com](https://github.com/cndiandian/zuanbot.com) 的客户端版本。
- [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) ## 有什么用
可以随机输出一条骂人的句子,有**口吐芬芳**与**火力全开**两个模式。
## 词库下载
[GitHub 下载](/src-tauri/resources/data.db)、[阿里云盘](https://www.aliyundrive.com/s/StTs9ojDAEF)、[蓝揍云](https://shadiao.lanzouw.com/b0116bgub) `密码hck1` 、 [诚通网盘](https://url08.ctfile.com/d/14688008-46477369-3732e0) `密码9919`
在线文档:[Notion文档](https://dians.notion.site/d865fac077f1430f9510d020f8713c8e)、[口吐芬芳(谷歌文档)](https://docs.google.com/document/d/1SskgYtDpYL6P_4qmX2A1ndBl8MY5NeDcBaYPxS-yxIo/edit?usp=sharing) 、[火力全开(谷歌文档)](https://docs.google.com/document/d/14YG9qaNDZk275av-Iss6B6YY-eDTdkS5w_my3f7349A/edit?usp=sharing)
## 如何使用
下载对应操作系统的安装包,执行安装即可。
包类型(文件后缀):
- Windows: `x64.msi`
- macOS
- Intel: `x64.dmg`
- Apple Silicon: `aarch64.dmg`
由于没有代码签名,在 Mac 上会因为没有开启允许所有开发者而提示软件损坏,此时可以打开**终端**,并输入 `xattr -d com.apple.quaratine /Applications/zuanbot.app` 再打开软件。
## 什么原理
收集整理了N条骂人的句子,然后随机读取一条输出即可。
核心代码就一行:
```sql
SELECT * FROM `main` ORDER BY RANDOM() limit 1
```
## 词库都是怎么来的
最初来源于网络收集了一些,后来基本就都是各位用户的投稿了,投稿渠道现已关闭。
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "zuanbot", "name": "zuanbot",
"private": true, "private": true,
"version": "0.2.0", "version": "0.3.1",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+1 -1
View File
@@ -5233,7 +5233,7 @@ dependencies = [
[[package]] [[package]]
name = "zuanbot" name = "zuanbot"
version = "0.2.0" version = "0.3.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"rusqlite", "rusqlite",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "zuanbot" name = "zuanbot"
version = "0.2.0" version = "0.3.1"
description = "祖安助手" description = "祖安助手"
authors = ["zihluwang"] authors = ["zihluwang"]
edition = "2021" edition = "2021"
Regular → Executable
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Regular → Executable
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Regular → Executable
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 974 B

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Regular → Executable
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 77 KiB

+43
View File
@@ -0,0 +1,43 @@
最终用户许可协议
祖安语录
版本:0.3.x
发布日期:2025 年 x 月 x 日
通过安装、使用或分发本软件“祖安语录”(以下简称“软件”),您即表示您已阅读、理解并同意受本最终用户许可协议(以下简称“协议”)的约束。本软件由 Zihlu Wang(以下简称“开发者”)开发并提供。如果您不同意本协议的条款,请勿安装或使用本软件。
1. 软件概述
“祖安语录”是一款用于生成骂人语句的娱乐性软件,仅供娱乐用途。开发者不对用户使用本软件所生成内容的行为及其后果承担任何责任。
2. 许可授权
根据 MIT 开源许可证,本软件以免费形式提供给用户使用。开发者特此授予您一项全球范围内的、非独占的、不可转让的许可,允许您在遵守以下条件的情况下使用、分发和修改本软件:
- 使用:您可以自由下载、安装和使用本软件。
- 分发:您可以在附带原始项目仓库地址(https://github.com/zihluwang/zuanbot)的情况下分发本软件,但不得移除或修改原始版权声明和许可信息。
- 修改:您可以自由修改本软件代码,前提是修改后的版本同样遵守 MIT 开源许可证。
3. 使用限制
本软件不设置任何特定的使用限制。然而,开发者提醒用户,骂人行为是不道德的,并且可能引发冲突或法律问题。用户在使用本软件生成的语句时,应自行判断其行为后果,并独自承担因此导致的所有责任。
4. 免责声明
- 本软件按“现状”提供,开发者不对其适销性、特定用途适用性或非侵权性作出任何明示或暗示的保证。
- 开发者不对因使用本软件而导致的任何直接或间接损害(包括但不限于数据丢失、精神损害或其他损失)承担责任。
- 用户使用本软件生成的任何内容所引发的纠纷、法律后果或其他责任,均由用户自行承担,与开发者无关。
5. 支持与更新
本软件为开源项目,若在使用过程中遇到问题,用户可前往 GitHub 仓库提交 Issue 获取社区支持。技术支持以开源形式免费提供,开发者不保证问题的解决时间或结果。
6. 版权声明
版权 © 2025 Zihlu Wang 所有。本软件受 MIT 开源许可证保护,您可以在遵守许可证条款的前提下自由使用、分发和修改。
7. 联系方式
如有任何问题或建议,请访问 GitHub 仓库与开发者联系。
File renamed without changes.
+1 -1
View File
@@ -30,7 +30,7 @@ impl Database {
fn get_bundled_database_path(app_handle: &tauri::AppHandle) -> Result<PathBuf> { fn get_bundled_database_path(app_handle: &tauri::AppHandle) -> Result<PathBuf> {
let resource_path = app_handle let resource_path = app_handle
.path() .path()
.resolve("data.db", tauri::path::BaseDirectory::Resource)?; .resolve("./resources/data.db", tauri::path::BaseDirectory::Resource)?;
println!("Database path: {:?}", resource_path); println!("Database path: {:?}", resource_path);
Ok(resource_path) Ok(resource_path)
+24 -7
View File
@@ -1,8 +1,8 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "zuanbot", "productName": "Zuanbot",
"version": "0.2.0", "version": "0.3.1",
"identifier": "io.github.zihluwang.zuanbot", "identifier": "me.zihluwang.zuanbot",
"build": { "build": {
"beforeDevCommand": "pnpm dev", "beforeDevCommand": "pnpm dev",
"devUrl": "http://localhost:1420", "devUrl": "http://localhost:1420",
@@ -12,9 +12,13 @@
"app": { "app": {
"windows": [ "windows": [
{ {
"title": "骂人宝典", "title": "祖安语录",
"width": 560, "width": 560,
"height": 400 "maxWidth": 560,
"minWidth": 560,
"height": 400,
"maxHeight": 400,
"minHeight": 400
} }
], ],
"security": { "security": {
@@ -23,7 +27,20 @@
}, },
"bundle": { "bundle": {
"active": true, "active": true,
"targets": "all", "publisher": "Zihlu Wang",
"category": "Utility",
"targets": ["dmg", "msi"],
"windows": {
"wix": {
"language": "zh-CN"
},
"webviewInstallMode": {
"type": "embedBootstrapper"
}
},
"license": "MIT",
"licenseFile": "./resources/EULA-zh_CN.txt",
"copyright": "Data Collected by @cndiandian, Developed by @zihluwang.",
"icon": [ "icon": [
"icons/32x32.png", "icons/32x32.png",
"icons/128x128.png", "icons/128x128.png",
@@ -32,7 +49,7 @@
"icons/icon.ico" "icons/icon.ico"
], ],
"resources": [ "resources": [
"./data.db" "./resources/data.db"
] ]
} }
} }
+21 -10
View File
@@ -1,10 +1,6 @@
import React, { useEffect, useState } from "react" import React, { useEffect, useState } from "react"
import { invoke } from "@tauri-apps/api/core" import { Level } from "@/types"
import * as service from "@/service"
enum Level {
min = "min",
max = "max",
}
export default function App() { export default function App() {
const [text, setText] = useState<string>("") const [text, setText] = useState<string>("")
@@ -12,26 +8,41 @@ export default function App() {
const [last, setLast] = useState<string>("") const [last, setLast] = useState<string>("")
useEffect(() => { useEffect(() => {
// 加载一条祖安语录
;(async () => { ;(async () => {
await getMessage() await getMessage()
})() })()
// 第一条消息,禁用上一条功能
setIsLast(true)
}, []) }, [])
/**
* 获取一条祖安语录
* @param level 语录等级
*/
const getMessage = async (level?: Level) => { const getMessage = async (level?: Level) => {
// 开放上一条功能
setIsLast(false)
// 保存上一条信息 // 保存上一条信息
setLast(text) setLast(text)
// 获取下一条信息 // 获取下一条信息
const nextMessage = await invoke<string>("get_message", { level }) const nextZuanMessage = await service.nextZuan(level)
setText(nextMessage) setText(nextZuanMessage)
} }
/**
* 展示上一条祖安语录
*/
const showLast = () => { const showLast = () => {
setIsLast(true) setIsLast(true)
setText(last) setText(last)
} }
// 复制文字到剪贴板 /**
* 复制文字到剪贴板
*/
const copyToClipboard = () => { const copyToClipboard = () => {
if (navigator.clipboard) { if (navigator.clipboard) {
navigator.clipboard.writeText(text).then( navigator.clipboard.writeText(text).then(
@@ -43,7 +54,7 @@ export default function App() {
} }
) )
} else { } else {
alert("当前浏览器不支持复制功能") alert("暂时不支持复制功能")
} }
} }
+10
View File
@@ -0,0 +1,10 @@
import { invoke } from "@tauri-apps/api/core"
import { Level } from "@/types"
/**
* 从服务端获取下一条祖安语录
* @param level 祖安级别
*/
export async function nextZuan(level?: Level) {
return await invoke<string>("get_message", { level })
}
+4
View File
@@ -0,0 +1,4 @@
export enum Level {
min = "min",
max = "max"
}