refactor: 主题初始化、资源缓存、UI交互等重构

This commit is contained in:
streakingman
2022-10-04 13:57:33 +08:00
parent 90852ce91d
commit 5e29a1e55a
53 changed files with 1075 additions and 555 deletions
+2 -16
View File
@@ -1,7 +1,6 @@
// 骚猪主题
import React from 'react';
import { Theme } from '../interface';
import { defaultSounds } from '../default';
import bgm from './sounds/bgm.mp3';
const soundUrls = import.meta.glob('./sounds/*.mp3', {
@@ -28,20 +27,7 @@ const images = Object.entries(imagesUrls).map(([key, value]) => ({
export const pddTheme: Theme<string> = {
title: '🐷猪了个猪🐷',
desc: (
<p>
<a
href="https://space.bilibili.com/81966051"
target="_blank"
rel="noreferrer"
>
</a>
</p>
),
name: '骚猪',
desc: '感谢 @猪酱的日常 提供素材',
bgm: bgm,
icons: images.map(({ name, content }) => ({
name,
@@ -49,5 +35,5 @@ export const pddTheme: Theme<string> = {
clickSound: 'button-click',
tripleSound: name,
})),
sounds: [defaultSounds[0], ...sounds],
sounds,
};