Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11ff6011ce | ||
|
|
9b746da864
|
||
|
|
2be4bb11b2
|
||
|
|
ef85c82ecb
|
||
|
|
fd37b663db
|
||
|
|
907d31177e
|
||
|
|
9eac6a5957
|
||
|
|
f5e4688a79
|
||
|
|
c584834692
|
||
|
|
00ac6214e1
|
||
|
|
a936e2cfd6
|
||
|
|
8c05558528
|
||
|
|
7f477b519d
|
No files matched your search
@@ -0,0 +1,64 @@
|
|||||||
|
name: Package and Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
|
||||||
|
name: Build Application Installer
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- platform: 'macos-latest'
|
||||||
|
args: '--target aarch64-apple-darwin'
|
||||||
|
- platform: 'macos-latest'
|
||||||
|
args: '--target x86_64-apple-darwin'
|
||||||
|
- platform: 'windows-latest'
|
||||||
|
args: ''
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4.1.0
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
|
||||||
|
- name: Setup Node
|
||||||
|
uses: actions/setup-node@v4.4.0
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
- name: Install Rust Stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
|
||||||
|
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: './src-tauri -> target'
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tagName: __VERSION__
|
||||||
|
releaseName: 'v__VERSION__'
|
||||||
|
args: ${{ matrix.args }}
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "zuanbot",
|
"name": "zuanbot",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
Generated
+1
-1
@@ -5233,7 +5233,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zuanbot"
|
name = "zuanbot"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"rusqlite",
|
"rusqlite",
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "zuanbot"
|
name = "zuanbot"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
description = "A Tauri App"
|
description = "祖安助手"
|
||||||
authors = ["you"]
|
authors = ["zihluwang"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://schema.tauri.app/config/2",
|
"$schema": "https://schema.tauri.app/config/2",
|
||||||
"productName": "zuanbot",
|
"productName": "zuanbot",
|
||||||
"version": "0.1.0",
|
"version": "0.2.0",
|
||||||
"identifier": "io.github.zihluwang.zuanbot",
|
"identifier": "io.github.zihluwang.zuanbot",
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "pnpm dev",
|
"beforeDevCommand": "pnpm dev",
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
"app": {
|
"app": {
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"title": "zuanbot",
|
"title": "骂人宝典",
|
||||||
"width": 800,
|
"width": 560,
|
||||||
"height": 600
|
"height": 400
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
|
|||||||
+13
-14
@@ -7,7 +7,6 @@ enum Level {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function App() {
|
export default function App() {
|
||||||
// 文本内容状态
|
|
||||||
const [text, setText] = useState<string>("")
|
const [text, setText] = useState<string>("")
|
||||||
const [isLast, setIsLast] = useState<boolean>(false)
|
const [isLast, setIsLast] = useState<boolean>(false)
|
||||||
const [last, setLast] = useState<string>("")
|
const [last, setLast] = useState<string>("")
|
||||||
@@ -50,33 +49,33 @@ export default function App() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-100 text-gray-700 flex flex-col">
|
<div className="min-h-screen bg-gray-100 text-gray-700 flex flex-col">
|
||||||
<header className="bg-purple-700 text-white flex flex-col md:flex-row items-center md:justify-between px-6 py-5 sticky top-0 z-40 shadow-md">
|
<main className="flex-grow max-w-[800px] p-4 row-auto">
|
||||||
<h3 className="text-xl font-semibold mb-2 md:mb-0">骂人宝典</h3>
|
<section className="mb-6 flex flex-wrap justify-center gap-4 columns-2">
|
||||||
<nav className="flex space-x-6 text-sm md:text-base"></nav>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<main className="flex-grow max-w-4xl mx-auto p-4">
|
|
||||||
<section className="mb-6 flex flex-wrap justify-center gap-4">
|
|
||||||
<button
|
<button
|
||||||
onClick={() => getMessage(Level.min)}
|
onClick={() => getMessage(Level.max)}
|
||||||
className="bg-pink-600 hover:bg-pink-700 text-white font-semibold py-3 px-6 rounded shadow-md transition">
|
className="bg-pink-600 hover:bg-pink-700 text-white font-semibold py-3 px-6 rounded-md shadow-md transition">
|
||||||
😤 火力全开
|
😤 火力全开
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => getMessage(Level.max)}
|
onClick={() => getMessage(Level.min)}
|
||||||
className="bg-teal-500 hover:bg-teal-600 text-white font-semibold py-3 px-6 rounded shadow-md transition">
|
className="bg-teal-500 hover:bg-teal-600 text-white font-semibold py-3 px-6 rounded-md shadow-md transition">
|
||||||
🙂 口吐莲花
|
🙂 口吐莲花
|
||||||
</button>
|
</button>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{text}
|
<textarea
|
||||||
|
className="mb-6 p-2 border rounded-md block mx-auto w-full max-w-[400px] columns-1"
|
||||||
|
rows={4}
|
||||||
|
value={text}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
|
||||||
<section className="mb-6 flex flex-wrap justify-center items-center gap-4">
|
<section className="mb-6 flex flex-wrap justify-center items-center gap-4">
|
||||||
<button
|
<button
|
||||||
onClick={showLast}
|
onClick={showLast}
|
||||||
disabled={isLast}
|
disabled={isLast}
|
||||||
className="bg-green-600 hover:bg-green-700 text-white font-semibold py-3 px-6 rounded shadow-md transition">
|
className="bg-green-600 hover:bg-green-700 text-white font-semibold py-3 px-6 rounded shadow-md transition disabled:bg-[#CCCCCC]">
|
||||||
上一条
|
上一条
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user