fix(plugins): fix many bugs (in-app-menu, album-color-theme, blur-nav-bar)

This commit is contained in:
Su-Yong
2024-02-06 02:02:08 +09:00
parent ddb9968195
commit bb39481666
4 changed files with 28 additions and 6 deletions

View File

@ -1,11 +1,24 @@
import { createPlugin } from '@/utils';
import style from './style.css?inline';
import { t } from '@/i18n';
import style from './style.css?inline';
export default createPlugin({
name: () => t('plugins.blur-nav-bar.name'),
description: () => t('plugins.blur-nav-bar.description'),
restartNeeded: true,
stylesheets: [style],
renderer() {},
restartNeeded: false,
renderer: {
styleSheet: null as CSSStyleSheet | null,
async start() {
this.styleSheet = new CSSStyleSheet();
await this.styleSheet.replace(style);
document.adoptedStyleSheets = [...document.adoptedStyleSheets, this.styleSheet];
},
async stop() {
await this.styleSheet?.replace('');
},
},
});