feat(plugin): migrate some plugin (WIP)

Co-authored-by: JellyBrick <shlee1503@naver.com>
This commit is contained in:
Su-Yong
2023-11-11 00:03:26 +09:00
parent e0e17cac99
commit 5cd1d9abe8
29 changed files with 938 additions and 796 deletions

View File

@ -0,0 +1,37 @@
import hudStyle from './volume-hud.css?inline';
import { createPluginBuilder } from '../utils/builder';
export type PreciseVolumePluginConfig = {
enabled: boolean;
steps: number;
arrowsShortcut: boolean;
globalShortcuts: {
volumeUp: string;
volumeDown: string;
};
savedVolume: number | undefined;
};
const builder = createPluginBuilder('precise-volume', {
name: 'Precise Volume',
config: {
enabled: false,
steps: 1, // Percentage of volume to change
arrowsShortcut: true, // Enable ArrowUp + ArrowDown local shortcuts
globalShortcuts: {
volumeUp: '',
volumeDown: '',
},
savedVolume: undefined, // Plugin save volume between session here
} as PreciseVolumePluginConfig,
styles: [hudStyle],
});
export default builder;
declare global {
interface PluginBuilderList {
[builder.id]: typeof builder;
}
}