Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Nov 22, 2024
1 parent 7bd56ac commit f0f4808
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const config: KnipConfig = {
"esbuild",
"@ubiquity-os/plugin-sdk",
"markdown-it",
"@types/markdown-it"
"@types/markdown-it",
],
eslint: true,
};
Expand Down
3 changes: 1 addition & 2 deletions static/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { AuthService } from "./scripts/authentication";
import { ManifestFetcher } from "./scripts/fetch-manifest";
import { ManifestRenderer } from "./scripts/render-manifest";
import { renderOrgPicker } from "./scripts/rendering/org-select";
import { updateGuiTitle } from "./scripts/rendering/utils";
import { toastNotification } from "./utils/toaster";

async function handleAuth() {
Expand Down Expand Up @@ -48,4 +47,4 @@ export async function mainModule() {
}
}

mainModule().catch(console.error);
mainModule().catch(console.error);
2 changes: 1 addition & 1 deletion static/scripts/fetch-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ManifestFetcher {

async fetchOfficialPluginConfig() {
await this.fetchOrgsUbiquityOsConfigs();
const officialPluginConfig = getOfficialPluginConfig()
const officialPluginConfig = getOfficialPluginConfig();

this.workerUrls.forEach((url) => {
officialPluginConfig[url] = { workerUrl: url };
Expand Down
4 changes: 2 additions & 2 deletions static/scripts/rendering/config-editor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Manifest, ManifestCache, Plugin } from "../../types/plugins";
import { Manifest, Plugin } from "../../types/plugins";
import { controlButtons } from "./control-buttons";
import { ManifestRenderer } from "../render-manifest";
import { processProperties } from "./input-parsing";
Expand Down Expand Up @@ -79,7 +79,7 @@ export function renderConfigEditor(renderer: ManifestRenderer, pluginManifest: M

resetToDefaultButton.hidden = !!plugin;

const manifestCache = getManifestCache()
const manifestCache = getManifestCache();
const pluginUrls = Object.keys(manifestCache);
const pluginUrl = pluginUrls.find((url) => {
return manifestCache[url].name === pluginManifest?.name;
Expand Down
2 changes: 1 addition & 1 deletion static/scripts/rendering/plugin-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function renderPluginSelector(renderer: ManifestRenderer): void {
renderer.manifestGuiBody.innerHTML = null;
controlButtons({ hide: true });

const manifestCache = getManifestCache()
const manifestCache = getManifestCache();
const pluginUrls = Object.keys(manifestCache);

const pickerRow = document.createElement("tr");
Expand Down
6 changes: 3 additions & 3 deletions static/utils/storage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ManifestCache } from "../types/plugins";

export function getManifestCache(): ManifestCache {
return JSON.parse(localStorage.getItem("manifestCache") || "{}");
return JSON.parse(localStorage.getItem("manifestCache") || "{}");
}

export function getOfficialPluginConfig() {
return JSON.parse(localStorage.getItem("officialPluginConfig") || "{}");
}
return JSON.parse(localStorage.getItem("officialPluginConfig") || "{}");
}

0 comments on commit f0f4808

Please sign in to comment.