diff --git a/.changeset/config.json b/.changeset/config.json index 5d747f3..7dd188e 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,12 +1,12 @@ { - "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", - "changelog": ["@changesets/changelog-github", { "repo": "nebulaservices/nebula" }], - "commit": false, - "fixed": [], - "linked": [], - "access": "public", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": [], - "privatePackages": { "version": true, "tag": true } + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "nebulaservices/nebula" }], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [], + "privatePackages": { "version": true, "tag": true } } diff --git a/public/nebula.css b/public/nebula.css index 954e7c1..128833b 100644 --- a/public/nebula.css +++ b/public/nebula.css @@ -1,19 +1,19 @@ :root { - --background-primary: #191724; - --background-lighter: #16121f; - --navbar-color: #26233a; - --navbar-height: 60px; - --navbar-text-color: #7967dd; - --navbar-link-color: #e0def4; - --navbar-link-hover-color: gray; - --navbar-font: "Roboto"; - --input-text-color: #e0def4; - --input-placeholder-color: white; - --input-background-color: #1f1d2e; - --input-border-color: #eb6f92; - --input-border-size: 1.3px; - --navbar-logo-filter: none; - --dropdown-option-hover-color: #312a49; - --tab-color: var(--black); - --border-color: #16121f; + --background-primary: #191724; + --background-lighter: #16121f; + --navbar-color: #26233a; + --navbar-height: 60px; + --navbar-text-color: #7967dd; + --navbar-link-color: #e0def4; + --navbar-link-hover-color: gray; + --navbar-font: "Roboto"; + --input-text-color: #e0def4; + --input-placeholder-color: white; + --input-background-color: #1f1d2e; + --input-border-color: #eb6f92; + --input-border-size: 1.3px; + --navbar-logo-filter: none; + --dropdown-option-hover-color: #312a49; + --tab-color: var(--black); + --border-color: #16121f; } diff --git a/public/sw.js b/public/sw.js index 4271464..0e18e2d 100644 --- a/public/sw.js +++ b/public/sw.js @@ -9,7 +9,7 @@ const ww = new WorkerWare({ debug: false }); if (navigator.userAgent.includes("Firefox")) { Object.defineProperty(globalThis, "crossOriginIsolated", { value: true, - writable: true + writable: true }); } diff --git a/server/serverFactory.ts b/server/serverFactory.ts index 06a0333..6e770da 100644 --- a/server/serverFactory.ts +++ b/server/serverFactory.ts @@ -1,33 +1,29 @@ import { createServer } from "node:http"; -import { - FastifyServerFactory, - FastifyServerFactoryHandler, - RawServerDefault, -} from "fastify"; +import { FastifyServerFactory, FastifyServerFactoryHandler, RawServerDefault } from "fastify"; import wisp from "wisp-server-node"; import { LOG_LEVEL, WispOptions } from "wisp-server-node/dist/Types.js"; import { parsedDoc } from "./config.js"; const wispOptions: WispOptions = { - logLevel: parsedDoc.server.server.logging ? LOG_LEVEL.DEBUG : LOG_LEVEL.NONE, - pingInterval: 30, + logLevel: parsedDoc.server.server.logging ? LOG_LEVEL.DEBUG : LOG_LEVEL.NONE, + pingInterval: 30 }; const serverFactory: FastifyServerFactory = ( - handler: FastifyServerFactoryHandler + handler: FastifyServerFactoryHandler ): RawServerDefault => { - const httpServer = createServer(); - httpServer.on("request", (req, res) => { - handler(req, res); - }); - httpServer.on("upgrade", (req, socket, head) => { - if (parsedDoc.server.server.wisp) { - if (req.url?.endsWith("/wisp/")) { - wisp.routeRequest(req, socket as any, head, wispOptions); - } - } - }); - return httpServer; + const httpServer = createServer(); + httpServer.on("request", (req, res) => { + handler(req, res); + }); + httpServer.on("upgrade", (req, socket, head) => { + if (parsedDoc.server.server.wisp) { + if (req.url?.endsWith("/wisp/")) { + wisp.routeRequest(req, socket as any, head, wispOptions); + } + } + }); + return httpServer; }; export { serverFactory }; diff --git a/src/components/settings/SettingsCard.astro b/src/components/settings/SettingsCard.astro index a73dee5..696d952 100644 --- a/src/components/settings/SettingsCard.astro +++ b/src/components/settings/SettingsCard.astro @@ -3,12 +3,22 @@ interface Inputs { input: boolean; required?: boolean; placeholder?: string; + validate?: boolean; + validateString?: string; } interface SelectOptions { value: string; name: string; disabled: boolean; } + +interface Both { + enabled: boolean; + showOnSelect?: { + value: string; + }; + showOnInput?: boolean; +} interface Selects { select: boolean; name?: string; @@ -24,27 +34,31 @@ interface Props { description: string; input: Inputs; select: Selects; + both: Both; button: Buttons; } -const { title, description, input, select, button } = Astro.props; +const { title, description, input, select, both, button } = Astro.props; --- -
+

{ title }

{ description }

- {input.input && + {(input.input && !both.enabled) && } {select.select && - {select.options!.map((option) => ( - + ))} - + + } + {(both.enabled && both.showOnSelect?.value) && + }