Add files via upload
This commit is contained in:
@@ -77,8 +77,8 @@ export function parsePresetData(data, generateId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function exportPreset(preset) {
|
export function exportPreset(preset) {
|
||||||
const author = prompt("请输入你的作者名 (将显示在云端):", "") || "";
|
const author = prompt("请输入你的作者名:", "") || "";
|
||||||
const description = prompt("简介 (可选):", "") || "";
|
const description = prompt("简介 (画风介绍):", "") || "";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: 'novel-draw-preset',
|
type: 'novel-draw-preset',
|
||||||
|
|||||||
@@ -84,7 +84,17 @@ body {
|
|||||||
transition: opacity 0.2s; white-space: nowrap;
|
transition: opacity 0.2s; white-space: nowrap;
|
||||||
}
|
}
|
||||||
.header-credit:hover { opacity: 0.9; }
|
.header-credit:hover { opacity: 0.9; }
|
||||||
.credit-author { font-style: normal; color: var(--text-secondary); }
|
.credit-author {
|
||||||
|
font-style: normal;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
transition: color 0.15s, opacity 0.15s;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
.credit-author:hover {
|
||||||
|
color: var(--accent);
|
||||||
|
opacity: 1;
|
||||||
|
text-shadow: 0 0 8px rgba(212, 165, 116, 0.5);
|
||||||
|
}
|
||||||
.nav-item {
|
.nav-item {
|
||||||
display: flex; align-items: center; gap: 10px; padding: 10px 14px;
|
display: flex; align-items: center; gap: 10px; padding: 10px 14px;
|
||||||
border-radius: 8px; color: var(--text-secondary); cursor: pointer;
|
border-radius: 8px; color: var(--text-secondary); cursor: pointer;
|
||||||
@@ -351,7 +361,7 @@ select.input { cursor: pointer; }
|
|||||||
<header class="app-header">
|
<header class="app-header">
|
||||||
<div class="header-logo"><i class="fa-solid fa-palette"></i><span>Novel Draw</span></div>
|
<div class="header-logo"><i class="fa-solid fa-palette"></i><span>Novel Draw</span></div>
|
||||||
<div id="nd_badge" class="header-badge"><i class="fa-solid fa-circle"></i><span>未启用</span></div>
|
<div id="nd_badge" class="header-badge"><i class="fa-solid fa-circle"></i><span>未启用</span></div>
|
||||||
<span class="header-credit">· <span class="credit-author">𝓡𝓸𝓻𝓸𝓵𝓵𝓵𝓷</span></span>
|
<span class="header-credit" id="nd_credits"></span>
|
||||||
<div class="header-spacer"></div>
|
<div class="header-spacer"></div>
|
||||||
<div class="header-mode">
|
<div class="header-mode">
|
||||||
<button data-mode="manual" class="active">手动</button>
|
<button data-mode="manual" class="active">手动</button>
|
||||||
@@ -858,6 +868,16 @@ function parseDelay(str) {
|
|||||||
return { ...DEFAULTS.requestDelay };
|
return { ...DEFAULTS.requestDelay };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function shuffleCredits() {
|
||||||
|
const authors = ['𝓡𝓸𝓻𝓸𝓵𝓵𝓵𝓷', '纤濯', '小白狐'];
|
||||||
|
const shuffled = authors.sort(() => Math.random() - 0.5);
|
||||||
|
const el = document.getElementById('nd_credits');
|
||||||
|
if (el) {
|
||||||
|
el.innerHTML = shuffled
|
||||||
|
.map(name => `· <span class="credit-author">${name}</span>`)
|
||||||
|
.join(' ');
|
||||||
|
}
|
||||||
|
}
|
||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
// UI 更新
|
// UI 更新
|
||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
@@ -1374,6 +1394,7 @@ window.addEventListener('message', event => {
|
|||||||
gallerySummary = data.gallerySummary || {};
|
gallerySummary = data.gallerySummary || {};
|
||||||
loadedCharPreviews = {};
|
loadedCharPreviews = {};
|
||||||
applyStateToUI();
|
applyStateToUI();
|
||||||
|
shuffleCredits();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'CHARACTER_PREVIEWS_LOADED':
|
case 'CHARACTER_PREVIEWS_LOADED':
|
||||||
@@ -1448,6 +1469,7 @@ window.addEventListener('message', event => {
|
|||||||
// ═══════════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
shuffleCredits();
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
// 导航切换
|
// 导航切换
|
||||||
// ═══════════════════════════════════════════════════════════════════════
|
// ═══════════════════════════════════════════════════════════════════════
|
||||||
|
|||||||
Reference in New Issue
Block a user