feat(themes): ow主题

This commit is contained in:
streakingman
2022-09-22 21:18:39 +08:00
parent 3a3ea6037f
commit 4b09bd08c7
22 changed files with 63 additions and 2 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

+50
View File
@@ -0,0 +1,50 @@
import { Theme } from '../interface';
import React from 'react';
import { defaultSounds } from '../default';
const soundUrls = import.meta.glob('./sounds/*.mp3', {
import: 'default',
eager: true,
});
const sounds = Object.entries(soundUrls).map(([key, value]) => ({
name: key.slice(9, -4),
src: value,
})) as Theme<string>['sounds'];
const imagesUrls = import.meta.glob('./images/*.png', {
import: 'default',
eager: true,
});
const icons = Object.entries(imagesUrls).map(([key, value]) => ({
name: key.slice(9, -4),
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
content: <img src={value} alt="" />,
}));
export const owTheme: Theme<string> = {
title: '守望先锋',
desc: (
<p>
<a
href="https://space.bilibili.com/228122468"
target="_blank"
rel="noreferrer"
>
</a>
</p>
),
name: 'OW',
icons: icons.map(({ name, content }) => ({
name,
content,
clickSound: 'button-click',
tripleSound: name === 'ow' ? 'triple' : name,
})),
sounds: [...defaultSounds, ...sounds],
};
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.