Add ccweb app icons
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const ASSET_VERSION = '20260622-streaming-restore';
|
const ASSET_VERSION = '20260624-icon-refresh';
|
||||||
const WS_URL = `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/ws`;
|
const WS_URL = `${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/ws`;
|
||||||
const RENDER_DEBOUNCE = 100;
|
const RENDER_DEBOUNCE = 100;
|
||||||
const COMPOSER_SUGGESTION_DEBOUNCE = 120;
|
const COMPOSER_SUGGESTION_DEBOUNCE = 120;
|
||||||
@@ -7569,6 +7569,7 @@
|
|||||||
navigator.serviceWorker.ready.then((reg) => {
|
navigator.serviceWorker.ready.then((reg) => {
|
||||||
reg.showNotification('CC-Web', {
|
reg.showNotification('CC-Web', {
|
||||||
body: `「${title}」任务完成`,
|
body: `「${title}」任务完成`,
|
||||||
|
icon: '/icon-192.png',
|
||||||
tag: 'cc-web-task',
|
tag: 'cc-web-task',
|
||||||
renotify: true,
|
renotify: true,
|
||||||
});
|
});
|
||||||
@@ -8533,7 +8534,7 @@
|
|||||||
panel.className = 'force-change-panel';
|
panel.className = 'force-change-panel';
|
||||||
|
|
||||||
panel.innerHTML = `
|
panel.innerHTML = `
|
||||||
<div class="login-logo">CC</div>
|
<img class="login-logo" src="icon-192.png" alt="CC-Web">
|
||||||
<h2>修改初始密码</h2>
|
<h2>修改初始密码</h2>
|
||||||
<p>首次登录需要设置新密码</p>
|
<p>首次登录需要设置新密码</p>
|
||||||
<div class="force-change-form">
|
<div class="force-change-form">
|
||||||
|
|||||||
BIN
public/apple-touch-icon.png
Normal file
BIN
public/apple-touch-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
public/favicon-32x32.png
Normal file
BIN
public/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
public/icon-192.png
Normal file
BIN
public/icon-192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
public/icon-512.png
Normal file
BIN
public/icon-512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
@@ -5,7 +5,13 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="application-name" content="CC-Web">
|
||||||
|
<meta name="theme-color" content="#020c16">
|
||||||
<title>CC-Web</title>
|
<title>CC-Web</title>
|
||||||
|
<link rel="icon" href="favicon.ico" sizes="any">
|
||||||
|
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png">
|
||||||
|
<link rel="manifest" href="site.webmanifest">
|
||||||
<script>
|
<script>
|
||||||
(function () {
|
(function () {
|
||||||
var theme = localStorage.getItem('cc-web-theme') || 'washi';
|
var theme = localStorage.getItem('cc-web-theme') || 'washi';
|
||||||
@@ -14,14 +20,14 @@
|
|||||||
document.documentElement.dataset.dividerTime = dividerTime;
|
document.documentElement.dataset.dividerTime = dividerTime;
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<link rel="stylesheet" href="style.css?v=20260622-streaming-restore">
|
<link rel="stylesheet" href="style.css?v=20260624-icon-refresh">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Login -->
|
<!-- Login -->
|
||||||
<div id="login-overlay" class="login-overlay">
|
<div id="login-overlay" class="login-overlay">
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<div class="login-logo">CC</div>
|
<img class="login-logo" src="icon-192.png" alt="CC-Web">
|
||||||
<h2>CC-Web</h2>
|
<h2>CC-Web</h2>
|
||||||
<p>Claude / Codex Web Chat</p>
|
<p>Claude / Codex Web Chat</p>
|
||||||
<form id="login-form">
|
<form id="login-form">
|
||||||
@@ -163,6 +169,6 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.1/marked.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.1/marked.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js"></script>
|
||||||
<script src="app.js?v=20260622-streaming-restore"></script>
|
<script src="app.js?v=20260624-icon-refresh"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
20
public/site.webmanifest
Normal file
20
public/site.webmanifest
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "CC-Web",
|
||||||
|
"short_name": "CC-Web",
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#020c16",
|
||||||
|
"theme_color": "#020c16",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "icon-192.png",
|
||||||
|
"sizes": "192x192",
|
||||||
|
"type": "image/png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "icon-512.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -811,12 +811,10 @@ body {
|
|||||||
.login-logo {
|
.login-logo {
|
||||||
width: 64px; height: 64px;
|
width: 64px; height: 64px;
|
||||||
margin: 0 auto 16px;
|
margin: 0 auto 16px;
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
display: flex; align-items: center; justify-content: center;
|
display: block;
|
||||||
font-size: 24px; font-weight: 800;
|
object-fit: contain;
|
||||||
letter-spacing: -1px;
|
filter: drop-shadow(0 10px 18px rgba(0, 20, 34, 0.24));
|
||||||
}
|
}
|
||||||
.login-box h2 {
|
.login-box h2 {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
@@ -4245,11 +4243,9 @@ html[data-divider-time='hide'] .msg-bubble .agent-message-divider span {
|
|||||||
.force-change-panel .login-logo {
|
.force-change-panel .login-logo {
|
||||||
width: 56px; height: 56px;
|
width: 56px; height: 56px;
|
||||||
margin: 0 auto 12px;
|
margin: 0 auto 12px;
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
display: flex; align-items: center; justify-content: center;
|
display: block;
|
||||||
font-size: 20px; font-weight: 800;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
.force-change-panel h2 {
|
.force-change-panel h2 {
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ self.addEventListener('message', (event) => {
|
|||||||
event.waitUntil(
|
event.waitUntil(
|
||||||
self.registration.showNotification(event.data.title || 'CC-Web', {
|
self.registration.showNotification(event.data.title || 'CC-Web', {
|
||||||
body: event.data.body || '',
|
body: event.data.body || '',
|
||||||
icon: event.data.icon || undefined,
|
icon: event.data.icon || '/icon-192.png',
|
||||||
tag: 'cc-web-task',
|
tag: 'cc-web-task',
|
||||||
renotify: true,
|
renotify: true,
|
||||||
data: event.data.data || {},
|
data: event.data.data || {},
|
||||||
|
|||||||
Reference in New Issue
Block a user