1111
This commit is contained in:
+69
@@ -223,6 +223,75 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 编辑域名配置对话框 -->
|
||||
<div id="editConfigModal" class="modal">
|
||||
<div class="modal-content edit-config-content">
|
||||
<h3 data-i18n="editConfigTitle">编辑域名配置</h3>
|
||||
<div class="form-group">
|
||||
<label for="editDomain" data-i18n="domainLabel">域名 / URL 匹配规则</label>
|
||||
<input type="text" id="editDomain" data-i18n-placeholder="domainPlaceholder" placeholder="example.com 或 *.example.com 或 site.com/admin/*">
|
||||
<small data-i18n="domainHelp">支持通配符 *。带 / 时按 hostname+path 匹配,如 oa.com/login/*;不带 / 时只匹配域名</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editUsername" data-i18n="usernameLabel">用户名</label>
|
||||
<input type="text" id="editUsername" data-i18n-placeholder="usernamePlaceholder" placeholder="输入用户名">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editPassword" data-i18n="passwordLabel">密码</label>
|
||||
<div class="password-wrapper">
|
||||
<input type="password" id="editPassword" data-i18n-placeholder="passwordPlaceholder" placeholder="输入密码">
|
||||
<button class="toggle-pwd eye-open" type="button" data-target="editPassword" data-i18n-aria="togglePwdAria" aria-label="切换密码显示">👁</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editAlias" data-i18n="aliasLabel">别名(可选)</label>
|
||||
<input type="text" id="editAlias" data-i18n-placeholder="aliasPlaceholder" placeholder="例如: 公司OA、GitLab、邮箱">
|
||||
<small data-i18n="aliasHelp">方便识别该配置,留空则显示域名</small>
|
||||
</div>
|
||||
<details class="advanced-options">
|
||||
<summary data-i18n="advancedOptionsSummary">高级选项(选填,默认即可)</summary>
|
||||
<div class="advanced-options-body">
|
||||
<div class="form-group">
|
||||
<label for="editAutoSubmit" data-i18n="autoSubmitLabel">自动提交登录</label>
|
||||
<select id="editAutoSubmit">
|
||||
<option value="true" data-i18n="autoSubmitYes">是 - 自动点击登录按钮</option>
|
||||
<option value="false" data-i18n="autoSubmitNo">否 - 仅填充不提交</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editEnabled" data-i18n="enabledLabel">启用 / 禁用</label>
|
||||
<label class="toggle-switch">
|
||||
<input type="checkbox" id="editEnabled" checked>
|
||||
<span class="toggle-slider"></span>
|
||||
</label>
|
||||
<small data-i18n="enabledHelp">禁用后该条配置将不会生效</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="editDelayMs" data-i18n="delayMsLabel">填充延迟(毫秒,可选)</label>
|
||||
<input type="number" id="editDelayMs" min="0" max="10000" step="100" data-i18n-placeholder="delayMsPlaceholder" placeholder="留空=默认 300ms,可填 500-2000 用于 SPA 页面">
|
||||
<small data-i18n="delayMsHelp">某些页面(Ant Design、ASP.NET)需 JS 初始化,立即填充会失效</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="usernameSelectorLabel">用户名输入框位置</label>
|
||||
<input type="text" id="editUsernameSelector" data-i18n-placeholder="usernameSelectorPlaceholder" placeholder="留空=自动查找,如 #username 或 input[name=account]">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="passwordSelectorLabel">密码输入框位置</label>
|
||||
<input type="text" id="editPasswordSelector" data-i18n-placeholder="passwordSelectorPlaceholder" placeholder="留空=自动查找,如 #password 或 input[type=password]">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label data-i18n="submitSelectorLabel">登录按钮位置</label>
|
||||
<input type="text" id="editSubmitSelector" data-i18n-placeholder="submitSelectorPlaceholder" placeholder="留空=自动查找,如 #loginBtn 或 button[type=submit]">
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
<div class="modal-actions">
|
||||
<button type="button" id="editConfigCancel" class="btn-edit" data-i18n="cancelBtn">取消</button>
|
||||
<button type="button" id="editConfigSave" class="btn-primary" data-i18n="updateConfigBtn">更新配置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="utils.js"></script>
|
||||
<script src="env-store.js"></script>
|
||||
<script src="crypto-store.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user