123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>设置中心</title>
- <!-- Ionic 组件库 -->
- <link href="https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css" rel="stylesheet">
- <script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js"></script>
- <script nomodule src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js"></script>
- <style>
- :root {
- /* 基础中性色 */
- --bg-light: #FAFAFA;
- --surface: #FFFFFF;
- --border: #E0E0E0;
- /* 文本颜色 */
- --text-primary: #212121;
- --text-secondary: #424242;
- /* 主辅点缀色 */
- --primary: #6200EE;
- --secondary: #018786;
- --accent: #FFB300;
- /* 年度色彩 */
- --pantone-2025: #BFA6A0; /* Mocha Mousse */
- --bm-2025: #8E5F56; /* Cinnamon Slate */
- /* 额外点缀色 */
- --accent-alt: #FF6F61; /* 活力暖粉 */
- /* 圆角和间距 */
- --radius: 8px;
- --gap: 20px;
- --ion-font-family: "MiSans", system-ui;
- }
- body {
- background: var(--bg-light);
- color: var(--text-primary);
- font-family: var(--ion-font-family);
- display: grid;
- grid-template-columns: 220px 1fr;
- min-height: 100vh;
- margin: 0;
- }
- /* 优化后的侧边导航 */
- .sidebar {
- width: 220px;
- background: var(--surface);
- padding: 16px 12px;
- box-shadow: 2px 0 12px rgba(0,0,0,0.05);
- }
- .nav-group {
- margin-bottom: 2.5rem;
- }
- .nav-group-title {
- font-size: 0.85rem;
- color: var(--text-secondary);
- margin: 8px 0;
- text-transform: uppercase;
- letter-spacing: 0.5px;
- }
- ion-item.nav-item {
- --background: transparent;
- --border-color: transparent;
- --padding-start: 14px;
- --min-height: 44px;
- margin: 6px 0;
- border-radius: var(--radius);
- transition: background-color 0.2s ease, transform 0.1s ease;
- }
- ion-item.nav-item ion-icon {
- font-size: 1.2rem;
- margin-right: 12px;
- color: var(--primary);
- transition: color 0.2s ease;
- }
- ion-item.nav-item:hover {
- background-color: rgba(98,0,238,0.1);
- transform: translateX(4px);
- }
- ion-item.nav-item[aria-selected="true"] {
- --background: rgba(98,0,238,0.2);
- }
- /* 主内容区 */
- .main-content {
- padding: 2rem;
- display: flex;
- flex-direction: column;
- gap: var(--gap);
- max-width: 1200px;
- }
- .settings-card {
- background: var(--surface);
- border-radius: var(--radius);
- padding: 1.5rem;
- box-shadow: 0 4px 12px rgba(0,0,0,0.08);
- border: 1px solid var(--border);
- }
- .settings-card-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 1.5rem;
- }
- .settings-card-title {
- font-size: 1.25rem;
- font-weight: 500;
- color: var(--primary);
- }
- .settings-grid {
- display: grid;
- grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
- gap: 1.5rem;
- }
- /* 自定义Ionic组件样式 */
- ion-toggle::part(track) {
- background: var(--border);
- height: 24px;
- width: 48px;
- border-radius: 12px;
- transition: background-color 0.2s ease;
- }
- ion-toggle::part(handle) {
- width: 20px;
- height: 20px;
- top: 2px;
- }
- ion-button::part(native) {
- text-transform: none;
- letter-spacing: normal;
- background-color: var(--accent);
- color: var(--surface);
- border-radius: var(--radius);
- box-shadow: 0 2px 8px rgba(0,0,0,0.1);
- transition: background-color 0.2s ease, box-shadow 0.2s ease;
- }
- ion-button::part(native):hover {
- background-color: var(--accent-alt);
- box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
- }
- ion-range::part(bar) {
- background: var(--border);
- height: 4px;
- }
- ion-range::part(bar-active) {
- background: var(--primary);
- }
- /* 高级设置区 */
- .advanced-settings {
- border-top: 1px solid var(--border);
- margin-top: 1.5rem;
- padding-top: 1.5rem;
- }
- /* 版本信息 */
- .version-info {
- margin-top: auto;
- text-align: center;
- color: var(--text-secondary);
- padding: 2rem;
- font-size: 0.9rem;
- }
- </style>
- </head>
- <body>
- <!-- 侧边导航 -->
- <nav class="sidebar">
- <div class="nav-group">
- <div class="nav-group-title">核心设置</div>
- <ion-item class="nav-item" button aria-selected="true">
- <ion-icon name="desktop" slot="start"></ion-icon>
- <ion-label>图形设置</ion-label>
- </ion-item>
- <ion-item class="nav-item" button>
- <ion-icon name="settings" slot="start"></ion-icon>
- <ion-label>系统设置</ion-label>
- </ion-item>
- <ion-item class="nav-item" button>
- <ion-icon name="chatbubbles" slot="start"></ion-icon>
- <ion-label>互动设置</ion-label>
- </ion-item>
- </div>
- <div class="nav-group">
- <div class="nav-group-title">扩展功能</div>
- <ion-item class="nav-item" button>
- <ion-icon name="extension-puzzle" slot="start"></ion-icon>
- <ion-label>MOD管理</ion-label>
- </ion-item>
- <ion-item class="nav-item" button>
- <ion-icon name="medkit" slot="start"></ion-icon>
- <ion-label>诊断与反馈</ion-label>
- </ion-item>
- <ion-item class="nav-item" button>
- <ion-icon name="information-circle" slot="start"></ion-icon>
- <ion-label>关于</ion-label>
- </ion-item>
- </div>
- </nav>
- <!-- 主内容区 -->
- <main class="main-content">
- <!-- 系统设置 -->
- <div class="settings-card">
- <div class="settings-card-header">
- <h2 class="settings-card-title">系统设置</h2>
- <ion-button fill="clear" size="small">
- <ion-icon name="help-circle" slot="start"></ion-icon>
- 帮助
- </ion-button>
- </div>
-
- <div class="settings-grid">
- <ion-item>
- <ion-label position="stacked">置于顶层</ion-label>
- <ion-toggle checked></ion-toggle>
- </ion-item>
- <ion-item>
- <ion-label position="stacked">开机启动</ion-label>
- <ion-select value="steam">
- <ion-select-option value="disabled">禁用</ion-select-option>
- <ion-select-option value="system">系统启动</ion-select-option>
- <ion-select-option value="steam">Steam启动</ion-select-option>
- </ion-select>
- </ion-item>
- <ion-item>
- <ion-label position="stacked">缩放等级 (85%)</ion-label>
- <ion-range min="50" max="150" value="85">
- <ion-icon name="remove" slot="start"></ion-icon>
- <ion-icon name="add" slot="end"></ion-icon>
- </ion-range>
- </ion-item>
- </div>
- </div>
- <!-- 数据管理 -->
- <div class="settings-card">
- <div class="settings-card-header">
- <h2 class="settings-card-title">数据管理</h2>
- <ion-button fill="clear" size="small">
- <ion-icon name="time" slot="start"></ion-icon>
- 历史版本
- </ion-button>
- </div>
- <div class="settings-grid">
- <ion-item>
- <ion-label position="stacked">自动保存频率</ion-label>
- <ion-input type="number" value="20" min="5" max="60"></ion-input>
- <ion-note slot="end">分钟</ion-note>
- </ion-item>
- <ion-item>
- <ion-label position="stacked">最大备份数量</ion-label>
- <ion-input type="number" value="50" min="10" max="100"></ion-input>
- </ion-item>
- <ion-item>
- <ion-label>从备份还原</ion-label>
- <ion-button slot="end" fill="outline">
- <ion-icon name="cloud-download" slot="start"></ion-icon>
- 加载存档
- </ion-button>
- </ion-item>
- </div>
- </div>
- <!-- 高级互动设置 -->
- <div class="settings-card">
- <div class="settings-card-header">
- <h2 class="settings-card-title">高级互动设置</h2>
- <ion-button fill="clear" size="small">
- <ion-icon name="alert-circle" slot="start"></ion-icon>
- 实验性功能
- </ion-button>
- </div>
- <div class="settings-grid">
- <ion-item>
- <ion-label position="stacked">计算间隔</ion-label>
- <ion-input type="number" value="14.0" step="0.1"></ion-input>
- <ion-note slot="end">秒</ion-note>
- </ion-item>
- <ion-item>
- <ion-label position="stacked">互动周期</ion-label>
- <ion-input type="number" value="200" min="100" max="500"></ion-input>
- </ion-item>
- <ion-item>
- <ion-label>移动范围设置</ion-label>
- <div slot="end" style="display: flex; gap: 8px;">
- <ion-button size="small">
- <ion-icon name="expand" slot="start"></ion-icon>
- 重置为主屏
- </ion-button>
- <ion-button size="small" fill="outline">
- 自定范围
- </ion-button>
- </div>
- </ion-item>
- </div>
- <div class="advanced-settings">
- <ion-item>
- <ion-label>智能移动判断</ion-label>
- <ion-input type="number" value="30" slot="end"></ion-input>
- <ion-note slot="end">秒</ion-note>
- </ion-item>
- <ion-item>
- <ion-label>音量触发阈值</ion-label>
- <ion-range dual-knobs min="0" max="100" value="80,90">
- <ion-icon name="volume-low" slot="start"></ion-icon>
- <ion-icon name="volume-high" slot="end"></ion-icon>
- </ion-range>
- </ion-item>
- </div>
- </div>
- <!-- MOD管理 -->
- <div class="settings-card">
- <div class="settings-card-header">
- <h2 class="settings-card-title">MOD管理</h2>
- <ion-button fill="clear" size="small">
- <ion-icon name="logo-steam" slot="start"></ion-icon>
- Workshop
- </ion-button>
- </div>
- <div class="settings-grid">
- <ion-item>
- <ion-label>语音增强包</ion-label>
- <ion-toggle slot="end"></ion-toggle>
- </ion-item>
- <ion-item>
- <ion-label>动画扩展包</ion-label>
- <ion-badge color="warning" slot="end">v2.1.5</ion-badge>
- </ion-item>
- <ion-item>
- <ion-label>界面主题包</ion-label>
- <ion-button slot="end" fill="clear">
- <ion-icon name="color-palette"></ion-icon>
- </ion-button>
- </ion-item>
- <ion-item>
- <ion-button expand="block">
- <ion-icon name="add-circle" slot="start"></ion-icon>
- 添加MOD
- </ion-button>
- </ion-item>
- </div>
- </div>
- <!-- 版本信息 -->
- <div class="version-info">
- <ion-text color="medium">
- <p>当前版本 v1.10.48 x64</p>
- <p>Power By exLB.net 洛里斯杨远</p>
- <p>开源协议:MIT License</p>
- </ion-text>
- </div>
- </main>
- <script>
- // 初始化Ionic组件
- customElements.whenDefined('ion-toggle').then(() => {
- // 开关状态同步
- document.querySelectorAll('ion-toggle').forEach(toggle => {
- toggle.addEventListener('ionChange', (e) => {
- console.log(`Toggle ${e.target.checked ? '开启' : '关闭'}`);
- });
- });
- // 范围选择器交互
- document.querySelectorAll('ion-range').forEach(range => {
- range.addEventListener('ionChange', (e) => {
- console.log('范围值变更:', e.target.value);
- });
- });
- // 按钮点击事件
- document.querySelectorAll('ion-button').forEach(button => {
- button.addEventListener('click', (e) => {
- const target = e.target.closest('ion-button');
- console.log('按钮点击:', target.innerText.trim());
- });
- });
- // 表单验证
- document.querySelectorAll('ion-input').forEach(input => {
- input.addEventListener('ionInput', (e) => {
- const value = parseFloat(e.target.value);
- const min = parseFloat(e.target.min) || -Infinity;
- const max = parseFloat(e.target.max) || Infinity;
- if (value < min) e.target.value = min;
- if (value > max) e.target.value = max;
- });
- });
- });
- // 动态加载示例
- setTimeout(() => {
- const loadingToast = document.createElement('ion-toast');
- loadingToast.message = '设置加载完成';
- loadingToast.duration = 2000;
- document.body.appendChild(loadingToast);
- loadingToast.present();
- }, 1000);
- </script>
- </body>
- </html>
|