Compare commits
No commits in common. "main" and "1.0.0" have entirely different histories.
16
README.md
16
README.md
|
|
@ -14,12 +14,7 @@
|
|||
- 可设置最大号码(默认 75)
|
||||
- 支持 ±1 和 ±10 快速调整
|
||||
- 设置自动保存
|
||||
- 智能摇号,使得摇号更具有趣味
|
||||
|
||||
### 触摸屏友好
|
||||
- 课堂小助手专门为触摸屏做了优化,无需键盘,点点就即刻完成操作
|
||||
|
||||
1
|
||||
## 安装与运行
|
||||
|
||||
### 开发环境
|
||||
|
|
@ -39,6 +34,17 @@ npm run build:win
|
|||
|
||||
构建完成后,安装包位于 `dist` 目录。
|
||||
|
||||
## 配置文件
|
||||
|
||||
配置文件位置:`%APPDATA%\classroom-assistant\ca\memory.ini`
|
||||
|
||||
```ini
|
||||
[Random]
|
||||
MaxNumber=75
|
||||
|
||||
[Time]
|
||||
LastSeconds=300
|
||||
```
|
||||
|
||||
## 界面操作
|
||||
|
||||
|
|
|
|||
132
index.html
132
index.html
|
|
@ -940,17 +940,6 @@
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
.about-developer {
|
||||
font-size: 14px;
|
||||
color: #667eea;
|
||||
margin: 4px 0 0 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.about-developer strong {
|
||||
color: #5a6fd6;
|
||||
}
|
||||
|
||||
.about-link {
|
||||
font-size: 14px;
|
||||
color: #667eea;
|
||||
|
|
@ -965,74 +954,6 @@
|
|||
background: #667eea;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.license-modal-overlay {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 10000;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.license-modal-overlay.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.license-modal {
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
width: 90%;
|
||||
max-width: 600px;
|
||||
max-height: 80vh;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.license-modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
}
|
||||
|
||||
.license-modal-header h3 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.license-modal-close {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
font-size: 18px;
|
||||
color: #666;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.license-modal-close:hover {
|
||||
background: #e9ecef;
|
||||
}
|
||||
|
||||
.license-modal-body {
|
||||
padding: 20px;
|
||||
font-family: 'Consolas', 'Courier New', monospace;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -1060,19 +981,19 @@
|
|||
<div class="menu-title">功能菜单</div>
|
||||
<ul class="menu-list">
|
||||
<li class="menu-item active" onclick="showPage('home')">
|
||||
<span class="menu-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/><polyline points="9 22 9 12 15 12 15 22"/></svg></span>
|
||||
<span class="menu-icon"><EFBFBD></span>
|
||||
<span>工作台</span>
|
||||
</li>
|
||||
<li class="menu-item" onclick="showPage('timer')">
|
||||
<span class="menu-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg></span>
|
||||
<span class="menu-icon">⏱️</span>
|
||||
<span>高效计时</span>
|
||||
</li>
|
||||
<li class="menu-item" onclick="showPage('random')">
|
||||
<span class="menu-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><circle cx="15.5" cy="8.5" r="1.5"/><circle cx="8.5" cy="15.5" r="1.5"/><circle cx="15.5" cy="15.5" r="1.5"/></svg></span>
|
||||
<span class="menu-icon">🎲</span>
|
||||
<span>随机摇号</span>
|
||||
</li>
|
||||
<li class="menu-item" onclick="showPage('settings')">
|
||||
<span class="menu-icon"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg></span>
|
||||
<span class="menu-icon">⚙️</span>
|
||||
<span>设置</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
@ -1242,10 +1163,7 @@
|
|||
<div class="about-info">
|
||||
<h3 class="about-name">课堂小助手 Classroom Assistant</h3>
|
||||
<p class="about-version" id="about-version"></p>
|
||||
<p class="about-developer">由 <strong>Yunyun(云云)</strong> 开发</p>
|
||||
<a href="https://www.caellab.com/2026/ca/" target="_blank" class="about-link" onclick="openSourceCode(event)">介绍页</a>
|
||||
<a href="https://github.com/yunyun-3782/Classroom-Assistant" target="_blank" class="about-link" onclick="openSourceCode(event)">开源仓库</a>
|
||||
<a href="#" class="about-link" onclick="openLicenseModal(event)">查看许可证</a>
|
||||
<a href="#" class="about-link" onclick="openSourceCode(event)">源代码</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1259,37 +1177,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="license-modal-overlay" id="license-modal-overlay">
|
||||
<div class="license-modal">
|
||||
<div class="license-modal-header">
|
||||
<h3>许可证</h3>
|
||||
<button class="license-modal-close" onclick="closeLicenseModal()">×</button>
|
||||
</div>
|
||||
<div class="license-modal-body">CaelLab BY-SA Code License
|
||||
|
||||
Copyright (c) 2026 Yunyun(云云) By 虚舟实验室(CaelLab)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this work (the "Work"), to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and sell copies of the Work, for personal, commercial, or
|
||||
non-commercial purposes, subject to the following conditions:
|
||||
|
||||
1. Source Availability: If you distribute the Work, or any derivative work
|
||||
based on the Work, you must make the complete corresponding source code
|
||||
available under the terms of this same license.
|
||||
|
||||
2. License Preservation: The above copyright notice and this permission notice
|
||||
shall be included in all copies or substantial portions of the Work.
|
||||
|
||||
3. ShareAlike: Any distributed derivative work must be licensed under the
|
||||
CaelLab BY-SA Code License.
|
||||
|
||||
THE WORK 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.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function minimizeWindow() {
|
||||
if (window.electronAPI) {
|
||||
|
|
@ -1687,15 +1574,6 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.</div>
|
|||
}
|
||||
}
|
||||
|
||||
function openLicenseModal(e) {
|
||||
e.preventDefault()
|
||||
document.getElementById('license-modal-overlay').classList.add('active')
|
||||
}
|
||||
|
||||
function closeLicenseModal() {
|
||||
document.getElementById('license-modal-overlay').classList.remove('active')
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
loadAppInfo()
|
||||
loadRandomMax()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
@echo off
|
||||
chcp 65001 >nul
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
cd /d "C:\Users\yunyun\Desktop\111\ClassroomAssistant"
|
||||
|
||||
echo =================================================
|
||||
echo 当前目录: %cd%
|
||||
echo =================================================
|
||||
|
||||
echo.
|
||||
echo [1/5] 检查更改文件...
|
||||
git status --short
|
||||
echo.
|
||||
|
||||
echo [2/5] 显示文件差异统计...
|
||||
git diff --stat
|
||||
echo.
|
||||
|
||||
:: 修复:正确提取修改的文件名
|
||||
set "fileList="
|
||||
for /f "usebackq tokens=1,*" %%a in (`git status --short`) do (
|
||||
set "filename=%%b"
|
||||
if not "!filename!"=="" (
|
||||
if "!fileList!"=="" (
|
||||
set "fileList=!filename!"
|
||||
) else (
|
||||
set "fileList=!fileList! !filename!"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
:: 询问用户输入
|
||||
set /p userInput="请输入提交摘要(直接回车则自动生成): "
|
||||
|
||||
:: 如果用户有输入,使用用户输入;否则自动生成
|
||||
if not "%userInput%"=="" (
|
||||
set "commitTitle=%userInput%"
|
||||
set "commitBody="
|
||||
) else (
|
||||
if "!fileList!"=="" (
|
||||
echo.
|
||||
echo 没有检测到任何文件更改。
|
||||
echo 可能的情况:
|
||||
echo 1. 所有修改已经提交过了
|
||||
echo 2. 确实没有修改任何文件
|
||||
echo.
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
set "autoMsg=更新 !fileList!"
|
||||
|
||||
:: 截断逻辑:标题最多50字符
|
||||
set "commitTitle=!autoMsg!"
|
||||
set "commitBody="
|
||||
if not "!commitTitle:~50!"=="" (
|
||||
set "commitTitle=!autoMsg:~0,50!"
|
||||
set "commitBody=!autoMsg!"
|
||||
)
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [3/5] 添加所有更改...
|
||||
git add .
|
||||
|
||||
echo.
|
||||
echo [4/5] 提交到本地仓库...
|
||||
if "!commitBody!"=="" (
|
||||
git commit -m "!commitTitle!"
|
||||
) else (
|
||||
git commit -m "!commitTitle!" -m "!commitBody!"
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [5/5] 推送到远程服务器...
|
||||
git push
|
||||
|
||||
echo.
|
||||
echo 完成!
|
||||
pause
|
||||
Loading…
Reference in New Issue