ci: auto build & obfuscate [2026-04-06 19:02:37] (Jenkins #10)

This commit is contained in:
Jenkins CI
2026-04-06 19:02:37 +08:00
parent 0421e44e0f
commit 0c5ac2c70b
13 changed files with 694 additions and 82 deletions

View File

@@ -223,7 +223,10 @@
<button id="amily2_open_text_optimization" class="menu_button wide_button"><i class="fas fa-cogs"></i> 正文优化</button>
<button id="amily2_open_world_editor" class="menu_button wide_button"><i class="fas fa-globe"></i> 世界编辑</button>
<button id="amily2_open_glossary" class="menu_button wide_button"><i class="fas fa-book"></i> 术语表单</button>
</div>
<div class="button-group" style="display: flex; justify-content: space-between; gap: 8px; margin-top: 8px;">
<button id="amily2_open_renderer" class="menu_button wide_button"><i class="fas fa-paint-brush"></i> 前端渲染</button>
<button id="amily2_open_sfigen" class="menu_button wide_button"><i class="fas fa-image"></i> 硅基生图</button>
</div>
</fieldset>

View File

@@ -74,15 +74,14 @@
</div>
</fieldset>
<!-- 新建/编辑 Profile 弹窗 -->
<div id="amily2_profile_modal" class="amily2-modal-overlay" style="display:none;">
<div class="amily2-modal-content">
<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:14px;">
<strong id="amily2_profile_modal_title"><i class="fas fa-key"></i> 新建连接配置</strong>
<button id="amily2_profile_modal_close" class="menu_button small_button secondary interactable"></button>
</div>
<!-- 新建/编辑 Profile 表单details 折叠) -->
<details id="amily2_profile_form_details" class="settings-group amily2-profile-form">
<summary>
<i id="amily2_profile_form_icon" class="fas fa-plus"></i>
<span id="amily2_profile_modal_title">新建连接配置</span>
</summary>
<div style="padding-top:10px;">
<!-- 类型选择 -->
<div class="amily2_settings_block">
<label for="amily2_pf_type">配置类型</label>
@@ -111,7 +110,7 @@
<label for="amily2_pf_url">API 地址</label>
<input id="amily2_pf_url" type="text" class="text_pole" placeholder="https://api.example.com/v1" />
</div>
<!-- Google 专属提示(选 Google 时显示) -->
<!-- Google 专属提示 -->
<div id="amily2_pf_google_note" style="display:none; margin-bottom:8px;">
<small class="notes" style="display:block; padding:6px 10px; background:var(--black10a); border-radius:4px; border-left:3px solid #4285f4;">
<i class="fas fa-info-circle" style="color:#4285f4;"></i>
@@ -125,13 +124,11 @@
<small class="notes">留空则不修改现有 Key。</small>
</div>
<!-- 模型选择(带获取按钮) -->
<!-- 模型选择 -->
<div class="amily2_settings_block">
<label for="amily2_pf_model">模型</label>
<div style="display:flex; gap:6px; align-items:stretch;">
<input id="amily2_pf_model" type="text" class="text_pole"
placeholder="手动填写或点击「获取」"
style="flex:1;" />
<input id="amily2_pf_model" type="text" class="text_pole" placeholder="手动填写或点击「获取」" style="flex:1;" />
<select id="amily2_pf_model_select" class="text_pole" style="flex:1; display:none;"></select>
<button id="amily2_pf_fetch_models" class="menu_button small_button interactable" type="button" title="从 API 获取可用模型列表(需先填写地址和 Key">
<i class="fas fa-list"></i> 获取
@@ -147,7 +144,7 @@
<span id="amily2_pf_test_result" style="font-size:0.85em;"></span>
</div>
<!-- Chat 高级参数(折叠) -->
<!-- Chat 高级参数 -->
<div id="amily2_pf_chat_params">
<details class="amily2_advanced_section" style="margin-top:4px;">
<summary style="cursor:pointer; font-size:0.88em; color:var(--SmartThemeQuoteColor); user-select:none; padding:4px 0;">
@@ -166,7 +163,7 @@
</details>
</div>
<!-- Embedding 高级参数(折叠) -->
<!-- Embedding 高级参数 -->
<div id="amily2_pf_embedding_params" style="display:none;">
<details class="amily2_advanced_section" style="margin-top:4px;">
<summary style="cursor:pointer; font-size:0.88em; color:var(--SmartThemeQuoteColor); user-select:none; padding:4px 0;">
@@ -208,11 +205,13 @@
</div>
<!-- 操作按钮 -->
<div style="display:flex; gap:8px; margin-top:16px; justify-content:flex-end;">
<button id="amily2_profile_modal_cancel" class="menu_button secondary interactable">取消</button>
<div style="display:flex; gap:8px; margin-top:16px;">
<button id="amily2_profile_modal_cancel" class="menu_button secondary interactable">
<i class="fas fa-times"></i> 取消
</button>
<button id="amily2_profile_modal_save" class="menu_button interactable">
<i class="fas fa-save"></i> 保存
</button>
</div>
</div>
</div>
</details>

View File

@@ -0,0 +1,77 @@
<div class="amily2-header">
<button id="amily2_sfigen_back_to_main" class="menu_button secondary small_button interactable">
<i class="fas fa-arrow-left"></i> 返回主殿
</button>
<div class="additional-features-title interactable" title="SiliconFlow Image Gen">
<i class="fas fa-image"></i> 硅基流动生图
</div>
</div>
<hr class="header-divider">
<fieldset class="settings-group">
<legend><i class="fas fa-cog"></i> 基础配置</legend>
<div class="flex-container">
<label for="sfigen_api_key">API Key (Bearer Token):</label>
<input id="sfigen_api_key" class="text_pole" type="password" placeholder="sk-..." />
</div>
<div class="flex-container">
<label for="sfigen_model">Model (模型):</label>
<input id="sfigen_model" class="text_pole" type="text" value="Qwen/Qwen-Image" />
</div>
<div class="flex-container">
<label for="sfigen_negative_prompt">Negative Prompt (反向提示词):</label>
<input id="sfigen_negative_prompt" class="text_pole" type="text" value="模糊, 低分辨率, 水印, 文字" />
</div>
<div class="flex-container">
<label for="sfigen_image_size">Image Size (分辨率):</label>
<select id="sfigen_image_size" class="text_pole">
<option value="1024x1024">1024x1024</option>
<option value="512x1024">512x1024</option>
<option value="768x512">768x512</option>
<option value="768x1024">768x1024</option>
<option value="1024x576">1024x576</option>
<option value="576x1024">576x1024</option>
<option value="1664x928" selected>1664x928</option>
</select>
</div>
<div class="flex-container">
<label for="sfigen_steps">Steps (步数):</label>
<input id="sfigen_steps" class="text_pole" type="number" value="50" min="1" max="100" />
</div>
<div class="flex-container">
<label for="sfigen_cfg">CFG Scale:</label>
<input id="sfigen_cfg" class="text_pole" type="number" value="4.0" step="0.1" min="1.0" max="20.0" />
</div>
<div class="flex-container">
<label for="sfigen_regex_tag">触发标签 (Tag):</label>
<input id="sfigen_regex_tag" class="text_pole" type="text" value="sfigen" title="例如填入 sfigen则会抓取 [sfigen: 提示词] 标签" />
</div>
</fieldset>
<fieldset class="settings-group">
<legend><i class="fas fa-paint-brush"></i> 风格预设</legend>
<div class="flex-container" style="flex-direction: column; align-items: flex-start;">
<label for="sfigen_prefix_prompt">固定前缀提示词 (Prefix Prompt):</label>
<div id="sfigen_style_tags" style="display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0;">
<span class="sfigen-style-tag" data-prompt="masterpiece, best quality, high detail anime art, sharp line art, 8K, ultra HD" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">日系高清二次元</span>
<span class="sfigen-style-tag" data-prompt="doujinshi style, illustration, vibrant colors, detailed background, pixiv" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">同人插画风</span>
<span class="sfigen-style-tag" data-prompt="ancient chinese style, hanfu, traditional clothes, ink painting style, wuxia" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">古风</span>
<span class="sfigen-style-tag" data-prompt="photorealistic, realistic, RAW photo, 8k uhd, dslr, soft lighting, high quality" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">写实摄影</span>
<span class="sfigen-style-tag" data-prompt="cyberpunk style, neon lights, futuristic, sci-fi, dark city" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">赛博朋克</span>
<span class="sfigen-style-tag" data-prompt="watercolor painting, soft edges, artistic, brush strokes" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">水彩画</span>
<span class="sfigen-style-tag" data-prompt="clear skin texture, obvious body contour, soft warm dim lamp shadow" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">质感光影</span>
<span class="sfigen-style-tag" data-prompt="1girl, solo, beautiful face, detailed eyes" style="background: var(--SmartThemeQuoteColor); color: var(--SmartThemeBodyColor); padding: 4px 12px; border-radius: 16px; cursor: pointer; font-size: 0.85em; border: 1px solid var(--SmartThemeBorderColor); user-select: none; transition: opacity 0.2s;">单人特写</span>
</div>
<textarea id="sfigen_prefix_prompt" class="text_pole" rows="3" placeholder="点击上方标签快速插入,或在此手动输入..." style="width: 100%; box-sizing: border-box;"></textarea>
</div>
</fieldset>
<fieldset class="settings-group">
<legend><i class="fas fa-info-circle"></i> 使用说明</legend>
<small>
<b>仅需填入硅基流动密钥0.3元(赠金亦可,模型默认)一张图。</b><br><br>
<b>使用方法 1</b> 在聊天框输入 <code>/sfigen 你的提示词</code><br>
<b>使用方法 2</b> 让 AI 在回复中输出 <code>[sfigen: 生图提示词]</code>,插件会自动将其替换为生图按钮。<br>
<b>固定前缀:</b> 每次生成时,会自动将“固定前缀提示词”加在您的提示词前面,以保证画风统一。
</small>
</fieldset>

View File

@@ -752,56 +752,23 @@ hr.header-divider {
}
}
/* === Profile 弹窗 === */
.amily2-modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 9999;
/* === Profile 表单details 折叠) === */
.amily2-profile-form > summary {
cursor: pointer;
user-select: none;
list-style: none;
display: flex;
align-items: center;
justify-content: center;
padding: 12px;
box-sizing: border-box;
gap: 6px;
font-weight: bold;
}
.amily2-modal-content {
background: var(--SmartThemeBlurTintColor);
border: 1px solid var(--SmartThemeBorderColor);
border-radius: 8px;
padding: 20px;
width: min(500px, 100%);
max-height: 90dvh;
overflow-y: auto;
box-sizing: border-box;
-webkit-overflow-scrolling: touch;
.amily2-profile-form > summary::-webkit-details-marker {
display: none;
}
@media (max-width: 600px) {
.amily2-modal-overlay {
align-items: flex-end;
padding: 0;
}
.amily2-modal-content {
width: 100%;
max-height: 92dvh;
border-radius: 12px 12px 0 0;
padding: 16px 14px;
}
/* 按钮行在窄屏下撑满宽度 */
.amily2-modal-content > div:last-child {
flex-wrap: wrap;
}
.amily2-modal-content > div:last-child .menu_button {
flex: 1;
min-width: 80px;
}
/* 模型获取按钮行 */
.amily2-modal-content #amily2_pf_fetch_models {
white-space: nowrap;
}
.amily2-profile-form[open] > summary {
margin-bottom: 4px;
padding-bottom: 8px;
border-bottom: 1px solid var(--SmartThemeBorderColor);
}