2.0阶段3: 技能管理API(增删改/重命名/文件读写上传,路径防护+文本限制)+H5技能页三视图(列表/文件详情/全屏编辑器),smoke新增[9]技能段
This commit is contained in:
@@ -35,10 +35,46 @@
|
||||
<!-- ================= Tab:技能 ================= -->
|
||||
<div id="tab-skills" class="tab-page hidden">
|
||||
<div class="header">
|
||||
<div class="header-left"><h2>技能管理</h2></div>
|
||||
<button class="icon-btn hidden" id="skills-back-btn" onclick="skillsUI.back()" title="返回">
|
||||
<svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"></polyline></svg>
|
||||
</button>
|
||||
<div class="header-left"><h2 id="skills-title">技能管理</h2></div>
|
||||
<div class="header-right">
|
||||
<button class="icon-btn hidden" id="skill-newfile-btn" onclick="skillsUI.newFile()" title="新建文件">
|
||||
<svg viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="12" y1="12" x2="12" y2="18"></line><line x1="9" y1="15" x2="15" y2="15"></line></svg>
|
||||
</button>
|
||||
<label class="icon-btn hidden" id="skill-upload-btn" title="上传文件">
|
||||
<input type="file" id="skill-file-input" style="display:none;" onchange="skillsUI.onUpload(event)">
|
||||
<svg viewBox="0 0 24 24"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
|
||||
</label>
|
||||
<button class="icon-btn hidden" id="skill-rename-btn" onclick="skillsUI.renameSkill()" title="重命名">
|
||||
<svg viewBox="0 0 24 24"><path d="M17 3a2.83 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5z"></path></svg>
|
||||
</button>
|
||||
<button class="icon-btn hidden" id="skill-del-btn" onclick="skillsUI.deleteSkill()" title="删除技能">
|
||||
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>
|
||||
</button>
|
||||
<button class="icon-btn" id="skill-new-btn" onclick="skillsUI.openCreate()" title="新建技能">
|
||||
<svg viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-body-area">
|
||||
<div class="empty-tip">技能管理开发中(阶段 3):技能的创建 / 编辑 / 删除与技能文件管理。</div>
|
||||
<div class="tab-body-area" id="skills-list"></div>
|
||||
<div class="tab-body-area hidden" id="skill-detail"></div>
|
||||
|
||||
<!-- 技能文件编辑器(全屏覆盖本 Tab) -->
|
||||
<div id="skill-editor" class="hidden">
|
||||
<div class="header">
|
||||
<button class="icon-btn" onclick="skillsUI.closeEditor()" title="关闭编辑器">
|
||||
<svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"></polyline></svg>
|
||||
</button>
|
||||
<span class="chat-title" id="skill-editor-name"></span>
|
||||
<div class="header-right">
|
||||
<button class="icon-btn" onclick="skillsUI.saveFile()" title="保存">
|
||||
<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<textarea id="skill-editor-area" spellcheck="false" autocomplete="off" autocapitalize="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -150,6 +186,19 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 新建技能弹窗 -->
|
||||
<div id="skill-create-modal" class="modal-overlay hidden" onclick="if(event.target===this)skillsUI.closeCreate()">
|
||||
<div class="modal">
|
||||
<button class="modal-close-btn" onclick="skillsUI.closeCreate()">
|
||||
<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
|
||||
</button>
|
||||
<h3>新建技能</h3>
|
||||
<input type="text" id="skill-new-name" placeholder="技能名(字母/数字/-/_)" style="width:100%">
|
||||
<input type="text" id="skill-new-desc" placeholder="一句话描述(何时使用该技能)" style="width:100%">
|
||||
<button class="primary-btn" style="width:100%" onclick="skillsUI.createSkill()">创建</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 删除会话弹窗 -->
|
||||
<div id="delete-modal" class="modal-overlay hidden" onclick="if(event.target===this)ui.closeDelete()">
|
||||
<div class="modal">
|
||||
@@ -169,10 +218,10 @@
|
||||
<div class="toast hidden" id="toast"></div>
|
||||
|
||||
<!-- 发版时更新 v 参数,避免移动端浏览器缓存旧 JS -->
|
||||
<script src="/js/core.js?v=20260901d"></script>
|
||||
<script src="/js/tasks.js?v=20260901d"></script>
|
||||
<script src="/js/skills.js?v=20260901d"></script>
|
||||
<script src="/js/models.js?v=20260901d"></script>
|
||||
<script src="/js/settings.js?v=20260901d"></script>
|
||||
<script src="/js/core.js?v=20260901e"></script>
|
||||
<script src="/js/tasks.js?v=20260901e"></script>
|
||||
<script src="/js/skills.js?v=20260901e"></script>
|
||||
<script src="/js/models.js?v=20260901e"></script>
|
||||
<script src="/js/settings.js?v=20260901e"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user