mirror of
https://github.com/maigamo/Daily-Task-Auto-Generator.git
synced 2026-07-22 12:40:26 +00:00
Compare commits
No commits in common. "main" and "1.0.2" have entirely different histories.
6 changed files with 580 additions and 335 deletions
63
.github/workflows/main.yml
vendored
63
.github/workflows/main.yml
vendored
|
|
@ -1,63 +0,0 @@
|
||||||
name: Plugin CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-and-build:
|
|
||||||
name: Type Check & Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# 拉取代码
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# 设置 Node.js 环境
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
# 安装依赖
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
# 检查代码是否包含禁止的 console.log/warn/error
|
|
||||||
- name: Check for forbidden console logs
|
|
||||||
run: |
|
|
||||||
if grep -rE 'console\.log|console\.warn|console\.error' src/; then
|
|
||||||
echo "❌ 代码中包含 console.log/warn/error,禁止提交"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TypeScript 类型检查(失败不阻断)
|
|
||||||
- name: Type Check (non-strict)
|
|
||||||
run: |
|
|
||||||
echo "Running TypeScript check..."
|
|
||||||
npx tsc --noEmit || echo "⚠️ TypeScript check failed, but continuing."
|
|
||||||
|
|
||||||
# 构建插件(使用 package.json 中的 build 脚本)
|
|
||||||
- name: Build plugin
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
# 列出当前目录,方便调试
|
|
||||||
- name: List files after build
|
|
||||||
run: ls -lah
|
|
||||||
|
|
||||||
# 检查构建产物是否存在
|
|
||||||
- name: Check output files
|
|
||||||
run: |
|
|
||||||
echo "当前工作目录:$(pwd)"
|
|
||||||
if [ ! -f main.js ]; then
|
|
||||||
echo "❌ main.js not found after build"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ ! -f manifest.json ]; then
|
|
||||||
echo "❌ manifest.json not found"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
214
LICENSE
214
LICENSE
|
|
@ -1,201 +1,21 @@
|
||||||
Apache License
|
MIT License
|
||||||
Version 2.0, January 2004
|
|
||||||
http://www.apache.org/licenses/
|
|
||||||
|
|
||||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
Copyright (c) 2025 maigamo
|
||||||
|
|
||||||
1. Definitions.
|
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:
|
||||||
|
|
||||||
"License" shall mean the terms and conditions for use, reproduction,
|
The above copyright notice and this permission notice shall be included in all
|
||||||
and distribution as defined by Sections 1 through 9 of this document.
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
"Licensor" shall mean the copyright owner or entity authorized by
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
the copyright owner that is granting the License.
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
"Legal Entity" shall mean the union of the acting entity and all
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
other entities that control, are controlled by, or are under common
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
control with that entity. For the purposes of this definition,
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
"control" means (i) the power, direct or indirect, to cause the
|
SOFTWARE.
|
||||||
direction or management of such entity, whether by contract or
|
|
||||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
||||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
||||||
|
|
||||||
"You" (or "Your") shall mean an individual or Legal Entity
|
|
||||||
exercising permissions granted by this License.
|
|
||||||
|
|
||||||
"Source" form shall mean the preferred form for making modifications,
|
|
||||||
including but not limited to software source code, documentation
|
|
||||||
source, and configuration files.
|
|
||||||
|
|
||||||
"Object" form shall mean any form resulting from mechanical
|
|
||||||
transformation or translation of a Source form, including but
|
|
||||||
not limited to compiled object code, generated documentation,
|
|
||||||
and conversions to other media types.
|
|
||||||
|
|
||||||
"Work" shall mean the work of authorship, whether in Source or
|
|
||||||
Object form, made available under the License, as indicated by a
|
|
||||||
copyright notice that is included in or attached to the work
|
|
||||||
(an example is provided in the Appendix below).
|
|
||||||
|
|
||||||
"Derivative Works" shall mean any work, whether in Source or Object
|
|
||||||
form, that is based on (or derived from) the Work and for which the
|
|
||||||
editorial revisions, annotations, elaborations, or other modifications
|
|
||||||
represent, as a whole, an original work of authorship. For the purposes
|
|
||||||
of this License, Derivative Works shall not include works that remain
|
|
||||||
separable from, or merely link (or bind by name) to the interfaces of,
|
|
||||||
the Work and Derivative Works thereof.
|
|
||||||
|
|
||||||
"Contribution" shall mean any work of authorship, including
|
|
||||||
the original version of the Work and any modifications or additions
|
|
||||||
to that Work or Derivative Works thereof, that is intentionally
|
|
||||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
||||||
or by an individual or Legal Entity authorized to submit on behalf of
|
|
||||||
the copyright owner. For the purposes of this definition, "submitted"
|
|
||||||
means any form of electronic, verbal, or written communication sent
|
|
||||||
to the Licensor or its representatives, including but not limited to
|
|
||||||
communication on electronic mailing lists, source code control systems,
|
|
||||||
and issue tracking systems that are managed by, or on behalf of, the
|
|
||||||
Licensor for the purpose of discussing and improving the Work, but
|
|
||||||
excluding communication that is conspicuously marked or otherwise
|
|
||||||
designated in writing by the copyright owner as "Not a Contribution."
|
|
||||||
|
|
||||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
||||||
on behalf of whom a Contribution has been received by Licensor and
|
|
||||||
subsequently incorporated within the Work.
|
|
||||||
|
|
||||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
copyright license to reproduce, prepare Derivative Works of,
|
|
||||||
publicly display, publicly perform, sublicense, and distribute the
|
|
||||||
Work and such Derivative Works in Source or Object form.
|
|
||||||
|
|
||||||
3. Grant of Patent License. Subject to the terms and conditions of
|
|
||||||
this License, each Contributor hereby grants to You a perpetual,
|
|
||||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
||||||
(except as stated in this section) patent license to make, have made,
|
|
||||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
||||||
where such license applies only to those patent claims licensable
|
|
||||||
by such Contributor that are necessarily infringed by their
|
|
||||||
Contribution(s) alone or by combination of their Contribution(s)
|
|
||||||
with the Work to which such Contribution(s) was submitted. If You
|
|
||||||
institute patent litigation against any entity (including a
|
|
||||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
||||||
or a Contribution incorporated within the Work constitutes direct
|
|
||||||
or contributory patent infringement, then any patent licenses
|
|
||||||
granted to You under this License for that Work shall terminate
|
|
||||||
as of the date such litigation is filed.
|
|
||||||
|
|
||||||
4. Redistribution. You may reproduce and distribute copies of the
|
|
||||||
Work or Derivative Works thereof in any medium, with or without
|
|
||||||
modifications, and in Source or Object form, provided that You
|
|
||||||
meet the following conditions:
|
|
||||||
|
|
||||||
(a) You must give any other recipients of the Work or
|
|
||||||
Derivative Works a copy of this License; and
|
|
||||||
|
|
||||||
(b) You must cause any modified files to carry prominent notices
|
|
||||||
stating that You changed the files; and
|
|
||||||
|
|
||||||
(c) You must retain, in the Source form of any Derivative Works
|
|
||||||
that You distribute, all copyright, patent, trademark, and
|
|
||||||
attribution notices from the Source form of the Work,
|
|
||||||
excluding those notices that do not pertain to any part of
|
|
||||||
the Derivative Works; and
|
|
||||||
|
|
||||||
(d) If the Work includes a "NOTICE" text file as part of its
|
|
||||||
distribution, then any Derivative Works that You distribute must
|
|
||||||
include a readable copy of the attribution notices contained
|
|
||||||
within such NOTICE file, excluding those notices that do not
|
|
||||||
pertain to any part of the Derivative Works, in at least one
|
|
||||||
of the following places: within a NOTICE text file distributed
|
|
||||||
as part of the Derivative Works; within the Source form or
|
|
||||||
documentation, if provided along with the Derivative Works; or,
|
|
||||||
within a display generated by the Derivative Works, if and
|
|
||||||
wherever such third-party notices normally appear. The contents
|
|
||||||
of the NOTICE file are for informational purposes only and
|
|
||||||
do not modify the License. You may add Your own attribution
|
|
||||||
notices within Derivative Works that You distribute, alongside
|
|
||||||
or as an addendum to the NOTICE text from the Work, provided
|
|
||||||
that such additional attribution notices cannot be construed
|
|
||||||
as modifying the License.
|
|
||||||
|
|
||||||
You may add Your own copyright statement to Your modifications and
|
|
||||||
may provide additional or different license terms and conditions
|
|
||||||
for use, reproduction, or distribution of Your modifications, or
|
|
||||||
for any such Derivative Works as a whole, provided Your use,
|
|
||||||
reproduction, and distribution of the Work otherwise complies with
|
|
||||||
the conditions stated in this License.
|
|
||||||
|
|
||||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
||||||
any Contribution intentionally submitted for inclusion in the Work
|
|
||||||
by You to the Licensor shall be under the terms and conditions of
|
|
||||||
this License, without any additional terms or conditions.
|
|
||||||
Notwithstanding the above, nothing herein shall supersede or modify
|
|
||||||
the terms of any separate license agreement you may have executed
|
|
||||||
with Licensor regarding such Contributions.
|
|
||||||
|
|
||||||
6. Trademarks. This License does not grant permission to use the trade
|
|
||||||
names, trademarks, service marks, or product names of the Licensor,
|
|
||||||
except as required for reasonable and customary use in describing the
|
|
||||||
origin of the Work and reproducing the content of the NOTICE file.
|
|
||||||
|
|
||||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
||||||
agreed to in writing, Licensor provides the Work (and each
|
|
||||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
||||||
implied, including, without limitation, any warranties or conditions
|
|
||||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
||||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
||||||
appropriateness of using or redistributing the Work and assume any
|
|
||||||
risks associated with Your exercise of permissions under this License.
|
|
||||||
|
|
||||||
8. Limitation of Liability. In no event and under no legal theory,
|
|
||||||
whether in tort (including negligence), contract, or otherwise,
|
|
||||||
unless required by applicable law (such as deliberate and grossly
|
|
||||||
negligent acts) or agreed to in writing, shall any Contributor be
|
|
||||||
liable to You for damages, including any direct, indirect, special,
|
|
||||||
incidental, or consequential damages of any character arising as a
|
|
||||||
result of this License or out of the use or inability to use the
|
|
||||||
Work (including but not limited to damages for loss of goodwill,
|
|
||||||
work stoppage, computer failure or malfunction, or any and all
|
|
||||||
other commercial damages or losses), even if such Contributor
|
|
||||||
has been advised of the possibility of such damages.
|
|
||||||
|
|
||||||
9. Accepting Warranty or Additional Liability. While redistributing
|
|
||||||
the Work or Derivative Works thereof, You may choose to offer,
|
|
||||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
||||||
or other liability obligations and/or rights consistent with this
|
|
||||||
License. However, in accepting such obligations, You may act only
|
|
||||||
on Your own behalf and on Your sole responsibility, not on behalf
|
|
||||||
of any other Contributor, and only if You agree to indemnify,
|
|
||||||
defend, and hold each Contributor harmless for any liability
|
|
||||||
incurred by, or claims asserted against, such Contributor by reason
|
|
||||||
of your accepting any such warranty or additional liability.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
APPENDIX: How to apply the Apache License to your work.
|
|
||||||
|
|
||||||
To apply the Apache License to your work, attach the following
|
|
||||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
||||||
replaced with your own identifying information. (Don't include
|
|
||||||
the brackets!) The text should be enclosed in the appropriate
|
|
||||||
comment syntax for the file format. We also recommend that a
|
|
||||||
file or class name and description of purpose be included on the
|
|
||||||
same "printed page" as the copyright notice for easier
|
|
||||||
identification within third-party archives.
|
|
||||||
|
|
||||||
Copyright 2025 maigamo
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
格式:
|
|
||||||
<type>: 简短的描述
|
|
||||||
|
|
||||||
example:
|
|
||||||
feat: 添加新功能
|
|
||||||
fix(tasks): 修复任务时间显示
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"id": "daily-task-auto-generator",
|
"id": "daily-task-auto-generator",
|
||||||
"name": "Daily Task Auto Generator",
|
"name": "Daily Task Auto Generator",
|
||||||
"version": "1.0.2",
|
"version": "1.0.1",
|
||||||
"minAppVersion": "1.8.0",
|
"minAppVersion": "1.8.0",
|
||||||
"description": "Automatically generate daily tasks in specified folders with custom templates",
|
"description": "Automatically generate daily tasks with custom templates, statistics and multi-language support",
|
||||||
"author": "maigamo",
|
"author": "maigamo",
|
||||||
"authorUrl": "https://github.com/maigamo",
|
"authorUrl": "https://github.com/maigamo",
|
||||||
"isDesktopOnly": false
|
"isDesktopOnly": false
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,19 @@
|
||||||
width: 20% !important;
|
width: 20% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 自定义通知样式 */
|
||||||
|
.daily-task-success-notice {
|
||||||
|
background-color: rgba(0, 255, 127, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-warning-notice {
|
||||||
|
background-color: rgba(255, 165, 0, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-error-notice {
|
||||||
|
background-color: rgba(255, 69, 0, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* 输入框样式 */
|
/* 输入框样式 */
|
||||||
.daily-task-input {
|
.daily-task-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -167,62 +180,4 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
|
||||||
|
|
||||||
/* 通知样式 - 使用与Obsidian一致的原生样式 */
|
|
||||||
.notice-success, .notice-warning, .notice-error {
|
|
||||||
margin-top: 8px;
|
|
||||||
padding: 8px 10px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 1.4;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
|
||||||
animation: fadeInUp 0.3s ease forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 成功通知 - 绿色 */
|
|
||||||
.notice-success {
|
|
||||||
background-color: var(--background-modifier-success);
|
|
||||||
color: var(--text-normal);
|
|
||||||
border-left: 3px solid var(--color-green);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 警告通知 - 黄色 */
|
|
||||||
.notice-warning {
|
|
||||||
background-color: var(--background-modifier-warning);
|
|
||||||
color: var(--text-normal);
|
|
||||||
border-left: 3px solid var(--color-yellow);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 错误通知 - 红色 */
|
|
||||||
.notice-error {
|
|
||||||
background-color: var(--background-modifier-error);
|
|
||||||
color: var(--text-normal);
|
|
||||||
border-left: 3px solid var(--color-red);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 通知动画 */
|
|
||||||
@keyframes fadeInUp {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(10px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 移动设备上的通知样式优化 */
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
.notice-success, .notice-warning, .notice-error {
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
max-width: 100%;
|
|
||||||
margin: 8px auto;
|
|
||||||
padding: 8px 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
541
styles.css
541
styles.css
|
|
@ -2,6 +2,7 @@
|
||||||
.daily-task-setting-tab {
|
.daily-task-setting-tab {
|
||||||
padding: 10px 30px;
|
padding: 10px 30px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,6 +187,73 @@ button {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 不同类型的通知样式 */
|
||||||
|
.daily-task-success-notice {
|
||||||
|
background-color: rgba(46, 160, 67, 0.9) !important;
|
||||||
|
color: white !important;
|
||||||
|
border-left: 4px solid #2ea043 !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
padding-left: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-success-notice::before {
|
||||||
|
content: '✓';
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 8px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-warning-notice {
|
||||||
|
background-color: rgba(209, 154, 10, 0.9) !important;
|
||||||
|
color: white !important;
|
||||||
|
border-left: 4px solid #d19a0a !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
padding-left: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-warning-notice::before {
|
||||||
|
content: '⚠';
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 8px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-error-notice {
|
||||||
|
background-color: rgba(203, 36, 49, 0.9) !important;
|
||||||
|
color: white !important;
|
||||||
|
border-left: 4px solid #cb2431 !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
padding-left: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-error-notice::before {
|
||||||
|
content: '✗';
|
||||||
|
display: inline-block;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 8px;
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
/* 模板预览容器 */
|
/* 模板预览容器 */
|
||||||
.template-preview {
|
.template-preview {
|
||||||
background-color: var(--background-primary);
|
background-color: var(--background-primary);
|
||||||
|
|
@ -342,4 +410,475 @@ button {
|
||||||
.template-preview-header button {
|
.template-preview-header button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 任务统计样式 */
|
||||||
|
.daily-task-statistics {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
padding: 15px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: rgba(var(--interactive-accent-rgb), 0.1);
|
||||||
|
border-left: 4px solid var(--interactive-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-statistics h3 {
|
||||||
|
margin-top: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 1.1em;
|
||||||
|
color: var(--text-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-statistics h4 {
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-size: 0.95em;
|
||||||
|
color: var(--text-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 提示建议样式 */
|
||||||
|
.daily-task-suggestions {
|
||||||
|
padding: 10px 15px;
|
||||||
|
border-radius: 6px;
|
||||||
|
background-color: rgba(var(--background-modifier-success-rgb), 0.1);
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 任务统计开关样式 */
|
||||||
|
.task-statistics-toggle {
|
||||||
|
position: relative;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-statistics-toggle:hover {
|
||||||
|
transform: scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-statistics-toggle.is-enabled {
|
||||||
|
background-color: var(--interactive-accent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 自定义滚动条样式 */
|
||||||
|
.daily-task-setting-tab ::-webkit-scrollbar {
|
||||||
|
width: 8px; /* 设置滚动条宽度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-setting-tab ::-webkit-scrollbar-track {
|
||||||
|
background: var(--background-secondary); /* 设置轨道背景 */
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-setting-tab ::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--interactive-accent); /* 设置滑块颜色 */
|
||||||
|
border-radius: 4px;
|
||||||
|
opacity: 0.7;
|
||||||
|
transition: background 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-setting-tab ::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--interactive-accent-hover); /* 滑块悬停颜色 */
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 应用滚动条样式到所有可滚动元素 */
|
||||||
|
.daily-task-slim-scrollbar {
|
||||||
|
scrollbar-width: thin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-slim-scrollbar::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-slim-scrollbar::-webkit-scrollbar-track {
|
||||||
|
background: var(--background-secondary);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-slim-scrollbar::-webkit-scrollbar-thumb {
|
||||||
|
background: var(--interactive-accent);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-slim-scrollbar::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--interactive-accent-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置组件样式 */
|
||||||
|
.daily-task-settings-section {
|
||||||
|
margin-top: 24px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
padding: 12px 0;
|
||||||
|
border-top: 1px solid var(--background-modifier-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-button {
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-preview-button, .daily-task-reset-button {
|
||||||
|
display: inline-block;
|
||||||
|
text-align: center !important;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-editor {
|
||||||
|
height: 200px;
|
||||||
|
margin-top: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-vertical-stack {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-text-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-text-center {
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-slim-scrollbar .CodeMirror-vscrollbar {
|
||||||
|
width: 20% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 自定义通知样式 */
|
||||||
|
.daily-task-success-notice {
|
||||||
|
background-color: rgba(0, 255, 127, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-warning-notice {
|
||||||
|
background-color: rgba(255, 165, 0, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-error-notice {
|
||||||
|
background-color: rgba(255, 69, 0, 0.2) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 输入框样式 */
|
||||||
|
.daily-task-input {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px 35px 8px 10px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 保存指示器样式 */
|
||||||
|
.daily-task-save-indicator {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 成功图标样式 */
|
||||||
|
.daily-task-success-icon {
|
||||||
|
color: #4CAF50;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 设置页面顶部间距 */
|
||||||
|
.daily-task-setting-top-space {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 输入容器样式 */
|
||||||
|
.daily-task-input-container {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 模式切换容器样式 */
|
||||||
|
.mode-toggle-container {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 20%;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 模式选项样式 */
|
||||||
|
.mode-toggle-option {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5px 0;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 2;
|
||||||
|
transition: color 0.3s ease;
|
||||||
|
font-size: 0.75em;
|
||||||
|
border-radius: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 活跃模式选项样式 */
|
||||||
|
.mode-toggle-option.active {
|
||||||
|
color: var(--text-on-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滑块样式 */
|
||||||
|
.mode-toggle-slider {
|
||||||
|
position: absolute;
|
||||||
|
width: 33.33%;
|
||||||
|
height: 80%;
|
||||||
|
background-color: var(--interactive-accent);
|
||||||
|
border-radius: 16px;
|
||||||
|
top: 10%;
|
||||||
|
left: 0;
|
||||||
|
transition: left 0.3s ease;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 模板编辑器样式 */
|
||||||
|
.template-editor {
|
||||||
|
height: 200px !important;
|
||||||
|
border: 1px solid var(--background-modifier-border-hover) !important;
|
||||||
|
border-radius: 4px !important;
|
||||||
|
padding: 12px !important;
|
||||||
|
line-height: 1.5 !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-family: var(--font-monospace) !important;
|
||||||
|
transition: all 0.2s ease !important;
|
||||||
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
|
||||||
|
background-color: var(--background-primary) !important;
|
||||||
|
color: var(--text-normal) !important;
|
||||||
|
resize: vertical !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-editor:focus {
|
||||||
|
border: 1px solid var(--interactive-accent) !important;
|
||||||
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1) !important;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 预览面板样式 */
|
||||||
|
.template-preview {
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1px dashed var(--background-modifier-border);
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
display: none;
|
||||||
|
max-height: 200px;
|
||||||
|
overflow: auto;
|
||||||
|
box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-preview.visible {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 模板预览标题样式 */
|
||||||
|
.template-preview-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮通用样式 */
|
||||||
|
.daily-task-button-common {
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮尺寸 */
|
||||||
|
.daily-task-button-md {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.daily-task-button-lg {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 危险按钮样式 */
|
||||||
|
.danger-button {
|
||||||
|
background-color: var(--background-modifier-error) !important;
|
||||||
|
color: var(--text-on-accent) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 加载状态按钮 */
|
||||||
|
.loading {
|
||||||
|
opacity: 0.7;
|
||||||
|
cursor: wait;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 模板设置描述样式 */
|
||||||
|
.template-description {
|
||||||
|
font-size: 0.85em;
|
||||||
|
opacity: 0.8;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 模板变量说明样式 */
|
||||||
|
.template-variables {
|
||||||
|
font-size: 0.85em;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按钮容器样式 */
|
||||||
|
.button-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 添加设置页面元素样式类 */
|
||||||
|
.setting-top-spacing {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-container {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-width-input {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px 35px 8px 10px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.save-indicator {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.save-indicator-visible {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success-icon {
|
||||||
|
color: #4CAF50;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggles-container {
|
||||||
|
width: 20%;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-icon {
|
||||||
|
margin-right: 8px;
|
||||||
|
color: var(--text-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-description {
|
||||||
|
font-size: 0.85em;
|
||||||
|
opacity: 0.8;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-variables {
|
||||||
|
font-size: 0.85em;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-container {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-textarea {
|
||||||
|
height: 200px;
|
||||||
|
border: 1px solid var(--background-modifier-border-hover);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 12px;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: var(--font-monospace);
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
background-color: var(--background-primary);
|
||||||
|
color: var(--text-normal);
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
.template-textarea-focused {
|
||||||
|
border: 1px solid var(--interactive-accent);
|
||||||
|
box-shadow: 0 0 0 2px rgba(var(--interactive-accent-rgb), 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-element {
|
||||||
|
margin-top: 15px;
|
||||||
|
padding: 15px;
|
||||||
|
border: 1px dashed var(--background-modifier-border);
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: var(--background-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-center {
|
||||||
|
text-align: center;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-width-normal {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reset-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-task-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.success-button {
|
||||||
|
background-color: #4CAF50 !important;
|
||||||
|
color: white !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 滑块位置类 */
|
||||||
|
.slider-position-0 { left: 0%; }
|
||||||
|
.slider-position-1 { left: 33.33%; }
|
||||||
|
.slider-position-2 { left: 66.66%; }
|
||||||
|
|
||||||
|
/* 显示/隐藏控制 */
|
||||||
|
.hidden-element { display: none; }
|
||||||
|
.visible-element { display: block; }
|
||||||
|
|
||||||
|
/* 保存指示器状态 */
|
||||||
|
.save-indicator-visible { opacity: 1; }
|
||||||
|
.save-indicator-hidden { opacity: 0; }
|
||||||
|
|
||||||
|
/* 容器宽度 */
|
||||||
|
.full-width-container { width: 100%; }
|
||||||
Loading…
Reference in a new issue