nbugs commited on
Commit
08694c5
·
verified ·
1 Parent(s): 3f31b27

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +58 -12
templates/index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>订阅转换星空工坊</title>
7
  <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
8
  <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600&display=swap" rel="stylesheet">
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
@@ -15,8 +15,11 @@
15
  <div class="container">
16
  <header>
17
  <div class="title-container">
18
- <h1>✨ 订阅转换 ✨</h1>
19
  <p>🚀 支持Clash全协议转换 🚀</p>
 
 
 
20
  </div>
21
  <div class="user-actions">
22
  <span>欢迎, {{ current_user.username }}</span>
@@ -25,11 +28,6 @@
25
  </header>
26
 
27
  <main>
28
- <div class="privacy-banner">
29
- <i class="fas fa-shield-alt"></i>
30
- <span>您的订阅数据在本地处理,不会发送到第三方服务,保护您的隐私安全</span>
31
- </div>
32
-
33
  <div class="card">
34
  <form id="convertForm">
35
  <div class="form-group">
@@ -54,8 +52,8 @@
54
  <option value="loon">Loon</option>
55
  <option value="ss">Shadowsocks</option>
56
  <option value="ssr">SSR</option>
57
- <option value="surfboard">Surfboard</option>
58
  <option value="v2ray">V2Ray</option>
 
59
  </select>
60
  </div>
61
 
@@ -81,22 +79,70 @@
81
  <i class="fas fa-copy"></i> 复制
82
  </button>
83
  </div>
 
 
 
 
 
 
 
 
84
  <div class="tip">
85
- <div class="privacy-info">
86
- <i class="fas fa-shield-alt"></i> 所有转换在您的服务器上进行,保护订阅地址隐私
87
- </div>
88
  <p>⭐️ 星空不灭,网络自由永存 ⭐️</p>
89
  </div>
90
  </div>
 
 
 
 
 
 
91
  </main>
92
 
93
  <footer>
94
- <p>订阅转换 &copy; 2025 | 感谢使用</p>
95
  </footer>
96
  </div>
97
 
98
  <div id="toast" class="toast"></div>
99
 
100
  <script src="{{ url_for('static', filename='script.js') }}"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  </body>
102
  </html>
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>订阅转换星空工坊 - 隐私保护版</title>
7
  <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
8
  <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600&display=swap" rel="stylesheet">
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
 
15
  <div class="container">
16
  <header>
17
  <div class="title-container">
18
+ <h1>✨ 订阅转换星空工坊 ✨</h1>
19
  <p>🚀 支持Clash全协议转换 🚀</p>
20
+ <div class="privacy-badge">
21
+ <i class="fas fa-shield-alt"></i> 隐私保护版 - 本地缓存转换结果
22
+ </div>
23
  </div>
24
  <div class="user-actions">
25
  <span>欢迎, {{ current_user.username }}</span>
 
28
  </header>
29
 
30
  <main>
 
 
 
 
 
31
  <div class="card">
32
  <form id="convertForm">
33
  <div class="form-group">
 
52
  <option value="loon">Loon</option>
53
  <option value="ss">Shadowsocks</option>
54
  <option value="ssr">SSR</option>
 
55
  <option value="v2ray">V2Ray</option>
56
+ <option value="sip002">SIP002</option>
57
  </select>
58
  </div>
59
 
 
79
  <i class="fas fa-copy"></i> 复制
80
  </button>
81
  </div>
82
+ <div class="privacy-info">
83
+ <i class="fas fa-shield-alt"></i>
84
+ <span>
85
+ 当前模式: {{ conversion_mode }}
86
+ <br>
87
+ 通过本地缓存加速转换并提高隐私保护 (命中率: {{ cache_hit_ratio }})
88
+ </span>
89
+ </div>
90
  <div class="tip">
 
 
 
91
  <p>⭐️ 星空不灭,网络自由永存 ⭐️</p>
92
  </div>
93
  </div>
94
+
95
+ <div class="admin-actions">
96
+ <button id="clearCacheBtn" class="btn-admin">
97
+ <i class="fas fa-trash"></i> 清除缓存
98
+ </button>
99
+ </div>
100
  </main>
101
 
102
  <footer>
103
+ <p>订阅转换星空工坊 - 隐私保护版 &copy; 2023</p>
104
  </footer>
105
  </div>
106
 
107
  <div id="toast" class="toast"></div>
108
 
109
  <script src="{{ url_for('static', filename='script.js') }}"></script>
110
+ <script>
111
+ // 添加清除缓存功能
112
+ document.getElementById('clearCacheBtn').addEventListener('click', function() {
113
+ if (confirm('确定要清除所有转换缓存吗?')) {
114
+ fetch('/clear-cache', {
115
+ method: 'POST'
116
+ })
117
+ .then(response => response.json())
118
+ .then(data => {
119
+ if (data.status === 'success') {
120
+ showToast('缓存已清除', 'success');
121
+ } else {
122
+ showToast(data.message, 'error');
123
+ }
124
+ })
125
+ .catch(error => {
126
+ showToast('请求失败: ' + error, 'error');
127
+ });
128
+ }
129
+ });
130
+
131
+ // 全局提示函数
132
+ function showToast(message, type = 'info') {
133
+ const toast = document.getElementById('toast');
134
+ let icon = '';
135
+ if (type === 'success') icon = '<i class="fas fa-check-circle"></i> ';
136
+ else if (type === 'error') icon = '<i class="fas fa-exclamation-circle"></i> ';
137
+ else icon = '<i class="fas fa-info-circle"></i> ';
138
+
139
+ toast.innerHTML = icon + message;
140
+ toast.className = 'toast show ' + type;
141
+
142
+ setTimeout(function() {
143
+ toast.className = 'toast';
144
+ }, 3000);
145
+ }
146
+ </script>
147
  </body>
148
  </html>