mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-16 13:00:01 -04:00
Whoops, forgot that shit
This commit is contained in:
parent
e2566121d9
commit
c5124db29f
2 changed files with 4 additions and 3 deletions
|
@ -19,7 +19,8 @@ async function getAssets() {
|
|||
const items = JSON.parse(localStorage.getItem(Settings.PluginSettings.plugins)) || [];
|
||||
const promises = items.map(getItem);
|
||||
const dataArray = await Promise.all(promises);
|
||||
const accumulatedData = dataArray.filter((data) => data !== null);
|
||||
let accumulatedData = dataArray.filter((data) => data !== null);
|
||||
accumulatedData = accumulatedData.filter(({ remove }) => remove === true);
|
||||
console.log(JSON.stringify(accumulatedData));
|
||||
return accumulatedData;
|
||||
}
|
||||
|
@ -37,7 +38,7 @@ let compRef = [];
|
|||
<div class="h-2/6 text-center content-center p-3 font-semibold items-center flex flex-col">
|
||||
<div class="text-2xl"> {asset.title} </div>
|
||||
<div class="flex flex-row">
|
||||
<div class="h-8 w-8 cursor-pointer" on:click={() => {settings.marketPlaceSettings.uninstall(asset.type, asset.name); compRef[key].$destroy()}}>
|
||||
<div class="h-8 w-8 cursor-pointer" on:click={() => {settings.marketPlaceSettings.uninstall(asset.type === "page" ? "plugin-page" : "plugin-sw", asset.package_name); compRef[key].$destroy()}}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 256 256" {...$$props}>
|
||||
<path fill="currentColor" d="M216 48h-40v-8a24 24 0 0 0-24-24h-48a24 24 0 0 0-24 24v8H40a8 8 0 0 0 0 16h8v144a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16V64h8a8 8 0 0 0 0-16M112 168a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm48 0a8 8 0 0 1-16 0v-64a8 8 0 0 1 16 0Zm0-120H96v-8a8 8 0 0 1 8-8h48a8 8 0 0 1 8 8Z" />
|
||||
</svg>
|
||||
|
|
|
@ -58,7 +58,7 @@ import type { SWPagePlugin } from "@utils/settings/types";
|
|||
const cssItemExists = cssItems.indexOf(packageName) !== -1;
|
||||
const pluginItems = JSON.parse(localStorage.getItem(Settings.PluginSettings.plugins) as string) || [];
|
||||
//@ts-ignore
|
||||
const pluginItemExists = pluginItems.find(({ name }) => name === packageName);
|
||||
const pluginItemExists = pluginItems.find(({ name, remove }) => name === packageName && remove !== true);
|
||||
const installButton = document.getElementById("install") as HTMLButtonElement;
|
||||
const uninstallButton = document.getElementById("uninstall") as HTMLButtonElement;
|
||||
const payload = assetsJson ? JSON.parse(assetsJson) : undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue