Ver Fonte

ref: random stuff

Sven há 10 meses atrás
pai
commit
c386d66069

+ 1 - 0
src/components/ExportImportDialog.ts

@@ -37,6 +37,7 @@ export class ExImDialog extends BytmDialog {
     super({
       renderHeader: () => ExImDialog.renderHeader(options),
       renderBody: () => ExImDialog.renderBody(options),
+      renderFooter: undefined,
       closeOnBgClick: true,
       closeOnEscPress: true,
       closeBtnEnabled: true,

+ 1 - 1
src/dialogs/autoLike.ts

@@ -52,7 +52,7 @@ export async function getAutoLikeDialog() {
         : JSON.stringify(autoLikeStore.getData()),
       // copy plain when shift-clicking the copy button
       exportDataSpecial: () => JSON.stringify(autoLikeStore.getData()),
-      onImport: async (data) => {
+      async onImport(data) {
         try {
           const parsed = await tryToDecompressAndParse<AutoLikeData>(data);
           log("Trying to import auto-like data:", parsed);

+ 2 - 1
src/interface.ts

@@ -7,7 +7,7 @@ import { getFeatures, setFeatures } from "./config.js";
 import { autoLikeStore, featInfo, fetchLyricsUrlTop, getLyricsCacheEntry, sanitizeArtists, sanitizeSong } from "./features/index.js";
 import { allSiteEvents, type SiteEventsMap } from "./siteEvents.js";
 import { LogLevel, type FeatureConfig, type FeatureInfo, type LyricsCacheEntry, type PluginDef, type PluginInfo, type PluginRegisterResult, type PluginDefResolvable, type PluginEventMap, type PluginItem, type BytmObject, type AutoLikeData } from "./types.js";
-import { BytmDialog, createCircularBtn, createHotkeyInput, createRipple, createToggleInput, showIconToast, showToast } from "./components/index.js";
+import { BytmDialog, ExImDialog, createCircularBtn, createHotkeyInput, createRipple, createToggleInput, showIconToast, showToast } from "./components/index.js";
 
 const { getUnsafeWindow, randomId } = UserUtils;
 
@@ -172,6 +172,7 @@ export function initInterface() {
     // classes
     NanoEmitter,
     BytmDialog,
+    ExImDialog,
     // libraries
     UserUtils,
     compareVersions,

+ 1 - 1
src/menu/menu_old.ts

@@ -185,7 +185,7 @@ async function mountCfgMenu() {
       ? await compress(JSON.stringify({ formatVersion, data: getFeatures() }), compressionFormat, "string")
       : exportDataSpecial(),
     exportDataSpecial,
-    onImport: async (data) => {
+    async onImport(data) {
       try {
         const parsed = await tryToDecompressAndParse<{ data: FeatureConfig, formatVersion: number }>(data.trim());
         log("Trying to import configuration:", parsed);