-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6906dec
commit 968f9d6
Showing
21 changed files
with
173 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { Theme } from '../interface'; | ||
|
||
const icons = <const>[ | ||
`🎨`, | ||
`🌈`, | ||
`⚙️`, | ||
`💻`, | ||
`📚`, | ||
`🐯`, | ||
`🐤`, | ||
`🐼`, | ||
`🐏`, | ||
`🍀`, | ||
]; | ||
|
||
export type DefaultSoundNames = 'button-click' | 'triple'; | ||
|
||
import soundButtonClickUrl from './sounds/sound-button-click.mp3'; | ||
import soundTripleUrl from './sounds/sound-triple.mp3'; | ||
export const defaultSounds: Theme<DefaultSoundNames>['sounds'] = [ | ||
{ | ||
name: 'button-click', | ||
src: soundButtonClickUrl, | ||
}, | ||
{ | ||
name: 'triple', | ||
src: soundTripleUrl, | ||
}, | ||
]; | ||
|
||
export const defaultTheme: Theme<DefaultSoundNames> = { | ||
name: '默认', | ||
icons: icons.map((icon) => ({ | ||
name: icon, | ||
content: icon, | ||
clickSound: 'button-click', | ||
tripleSound: 'triple', | ||
})), | ||
sounds: defaultSounds, | ||
}; |
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// 钓鱼佬主题 | ||
import React from 'react'; | ||
import { Theme } from '../interface'; | ||
import { DefaultSoundNames, defaultSounds } from '../default'; | ||
|
||
const imagesUrls = import.meta.glob('./images/*.png', { | ||
import: 'default', | ||
eager: true, | ||
}); | ||
|
||
const fishes = 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 fishermanTheme: Theme<DefaultSoundNames> = { | ||
name: '钓鱼佬', | ||
icons: fishes.map(({ name, content }) => ({ | ||
name, | ||
content, | ||
clickSound: 'button-click', | ||
tripleSound: 'triple', | ||
})), | ||
sounds: defaultSounds, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ReactNode } from 'react'; | ||
|
||
export interface Icon<T = string> { | ||
name: string; | ||
content: ReactNode; | ||
clickSound: T; | ||
tripleSound: T; | ||
} | ||
|
||
interface Sound<T = string> { | ||
name: T; | ||
src: string; | ||
} | ||
|
||
export interface Theme<SoundNames> { | ||
name: string; | ||
icons: Icon<SoundNames>[]; | ||
sounds: Sound<SoundNames>[]; | ||
} |
968f9d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
solvable-sheep-game – ./
solvable-sheep-game.streakingman.com
solvable-sheep-game-streakingman.vercel.app
solvable-sheep-game.vercel.app
solvable-sheep-game-git-master-streakingman.vercel.app