feat: SodiumPet 小钠桌宠 v0.1.0(Live2D 桌宠 / 经济任务 / 音乐 / 成就 / 编辑器 / MOD)
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
const fs = require('fs')
|
||||
const p = 'C:/Users/ASUS/Documents/deepseek-harness/default-workspace/desktop-pet/src/renderer/src/panel/Panel.tsx'
|
||||
let c = fs.readFileSync(p, 'utf8')
|
||||
|
||||
function rep(from, to) {
|
||||
if (!c.includes(from)) {
|
||||
console.log('MISS ::', from.slice(0, 70).replace(/\n/g, '\\n'))
|
||||
return
|
||||
}
|
||||
c = c.replace(from, to)
|
||||
}
|
||||
|
||||
// 设置-互动分区:歌词浮窗样式
|
||||
rep(
|
||||
` <p className="tips">作息会让她到点自己睡觉 / 起床。</p>`,
|
||||
` <p className="tips">作息会让她到点自己睡觉 / 起床。</p>
|
||||
|
||||
<div className="section-title">歌词浮窗</div>
|
||||
<div className="field">
|
||||
<span>浮窗底色</span>
|
||||
<input
|
||||
className="text-input"
|
||||
value={cfg.lyricBg}
|
||||
onChange={(e) => void patchConfig({ lyricBg: e.target.value })}
|
||||
/>
|
||||
</div>
|
||||
<div className="field">
|
||||
<span>文字颜色</span>
|
||||
<input
|
||||
type="color"
|
||||
value={cfg.lyricColor}
|
||||
onChange={(e) => void patchConfig({ lyricColor: e.target.value })}
|
||||
/>
|
||||
</div>
|
||||
<div className="field">
|
||||
<span>描边颜色</span>
|
||||
<input
|
||||
type="color"
|
||||
value={cfg.lyricOutline}
|
||||
onChange={(e) => void patchConfig({ lyricOutline: e.target.value })}
|
||||
/>
|
||||
</div>
|
||||
<div className="field">
|
||||
<span>字号</span>
|
||||
<input
|
||||
type="range"
|
||||
min={14}
|
||||
max={40}
|
||||
step={1}
|
||||
value={cfg.lyricSize}
|
||||
onChange={(e) => void patchConfig({ lyricSize: Number(e.target.value) })}
|
||||
/>
|
||||
<b className="set-value">{cfg.lyricSize}px</b>
|
||||
</div>
|
||||
<div className="new-profile">
|
||||
<button className="mini" onClick={() => api()?.openLyric()}>
|
||||
打开歌词浮窗
|
||||
</button>
|
||||
<button className="mini" onClick={() => api()?.openMusic()}>
|
||||
打开音乐播放器
|
||||
</button>
|
||||
</div>`
|
||||
)
|
||||
|
||||
fs.writeFileSync(p, c, 'utf8')
|
||||
console.log('lyric settings patched')
|
||||
Reference in New Issue
Block a user