diff --git a/httpd-client/index.ts b/httpd-client/index.ts index 82dadc087..47ba2c967 100644 --- a/httpd-client/index.ts +++ b/httpd-client/index.ts @@ -28,6 +28,7 @@ import type { Range, Review, Revision, + Verdict, } from "./lib/project/patch.js"; import type { RequestOptions, Method } from "./lib/fetcher.js"; import type { ZodSchema } from "zod"; @@ -65,6 +66,7 @@ export type { Review, Revision, Tree, + Verdict, }; export interface Node { diff --git a/httpd-client/lib/project/patch.ts b/httpd-client/lib/project/patch.ts index 47b5619d0..0dfee9fa1 100644 --- a/httpd-client/lib/project/patch.ts +++ b/httpd-client/lib/project/patch.ts @@ -53,7 +53,7 @@ const mergeSchema = object({ timestamp: number(), }) satisfies ZodSchema; -type Verdict = "accept" | "reject"; +export type Verdict = "accept" | "reject"; export interface Review { author: { id: string; alias?: string }; diff --git a/index.html b/index.html index f30661f8e..7a89dc6d3 100644 --- a/index.html +++ b/index.html @@ -18,57 +18,51 @@ - diff --git a/public/colors.css b/public/colors.css index c37e9787e..0487d8591 100644 --- a/public/colors.css +++ b/public/colors.css @@ -1,121 +1,87 @@ :root { - --color-primary: #ff55ff; - --color-primary-1: #ff55ff09; - --color-primary-2: #ff55ff11; - --color-primary-3: #ff55ff22; - --color-primary-4: #ff55ff33; - --color-primary-5: #ff55ff77; - --color-primary-6: hsl(300, 100%, 90%); - - --color-secondary: #5555ff; - --color-secondary-1: #5555ff09; - --color-secondary-2: #5555ff11; - --color-secondary-3: #5555ff22; - --color-secondary-4: #5555ff33; - --color-secondary-5: #5555ff77; - --color-secondary-6: hsl(240, 100%, 90%); - - --color-tertiary: #55ffff; - --color-tertiary-1: #55ffff09; - --color-tertiary-2: #55ffff11; - --color-tertiary-3: #55ffff22; - --color-tertiary-4: #55ffff33; - --color-tertiary-5: #55ffff77; - --color-tertiary-6: #abf9f9; - - --color-caution: #ffff99; - --color-caution-1: #ffff9909; - --color-caution-2: #ffff9911; - --color-caution-3: #ffff9922; - --color-caution-4: #ffff9933; - --color-caution-5: #ffff9977; - --color-caution-6: hsl(60, 100%, 90%); - - --color-positive: #53db53; - --color-positive-1: #53db5309; - --color-positive-2: #53db5311; - --color-positive-3: #53db5322; - --color-positive-4: #53db5333; - --color-positive-5: #53db5377; - --color-positive-6: hsl(120, 100%, 90%); - - --color-negative: #ff5555; - --color-negative-1: #ff555509; - --color-negative-2: #ff555511; - --color-negative-3: #ff555522; - --color-negative-4: #ff555533; - --color-negative-5: #ff555577; - --color-negative-6: hsl(0, 100%, 90%); - - --color-foreground: #ffffff; - --color-foreground-1: #121a21; - --color-foreground-2: #181f28; - --color-foreground-3: #212832; - --color-foreground-4: #2b313d; - --color-foreground-5: #585c6f; - --color-foreground-6: #c2c3d4; - - --color-background: #0b131a; - --color-background-1: #121a21; + --color-background-default: #f5f5ff; + --color-background-float: #fafaff; + --color-background-dip: #ebebff; + --color-foreground-contrast: #14151a; + --color-foreground-dim: #70718f; + --color-foreground-emphasized: #7070ff; + --color-foreground-emphasized-hover: #8585ff; + --color-foreground-match-background: #f5f5ff; + --color-foreground-white: #ffffff; + --color-foreground-black: #000000; + --color-foreground-primary: #ff55ff; + --color-foreground-success: #4fa877; + --color-foreground-red: #aa5078; + --color-foreground-yellow: #e5c001; + --color-foreground-gray: #9494b8; + --color-foreground-disabled: #b2b2cc; + --color-border-hint: #e5e5ff; + --color-border-focus: #7070ff; + --color-border-contrast: #24252d; + --color-border-default: #b8b8ff; + --color-border-error: #aa5078; + --color-border-merged: #ffe5ff; + --color-border-match-background: #f5f5ff; + --color-fill-secondary: #7070ff; + --color-fill-secondary-hover: #8585ff; + --color-fill-ghost: #e5e5ff; + --color-fill-ghost-hover: #ebebff; + --color-fill-separator: #eaeaf1; + --color-fill-primary: #ff70ff; + --color-fill-success: #4fa877; + --color-fill-yellow: #ffe609; + --color-fill-danger: #be7495; + --color-fill-gray: #9494b8; + --color-fill-primary-hover: #ff80ff; + --color-fill-diff-green: #badeca; + --color-fill-diff-green-light: #dcefe5; + --color-fill-diff-red: #efdce4; + --color-fill-diff-red-light: #f7eef2; + --color-fill-float: #fafaff; + --color-fill-float-hover: #ffffff; + --color-fill-merged: #ffeeff; } -[data-theme="light"] { - --color-primary: #ff55ff; - --color-primary-1: #ff55ff30; - --color-primary-2: #ff55ff45; - --color-primary-3: #ff55ff60; - --color-primary-4: #ff55ff80; - --color-primary-5: #ff55ffaa; - --color-primary-6: hsl(300, 40%, 30%); - - --color-secondary: #5555ff; - --color-secondary-1: #5555ff10; - --color-secondary-2: #5555ff20; - --color-secondary-3: #5555ff60; - --color-secondary-4: #5555ff80; - --color-secondary-5: #5555ffaa; - --color-secondary-6: hsl(240, 40%, 30%); - - --color-tertiary: #2ed4c1; - --color-tertiary-1: #2ed4c120; - --color-tertiary-2: #2ed4c140; - --color-tertiary-3: #2ed4c160; - --color-tertiary-4: #2ed4c180; - --color-tertiary-5: #2ed4c1aa; - --color-tertiary-6: #005050; - - --color-caution: hsl(60, 100%, 30%); - --color-caution-1: #d3d34d20; - --color-caution-2: #d3d34d40; - --color-caution-3: #d3d34d60; - --color-caution-4: #d3d34d80; - --color-caution-5: #d3d34daa; - --color-caution-6: hsl(60, 82%, 22%); - - --color-positive: #53db53; - --color-positive-1: #53db5320; - --color-positive-2: #53db5340; - --color-positive-3: #53db5360; - --color-positive-4: #53db5380; - --color-positive-5: #53db53aa; - --color-positive-6: hsl(120, 40%, 30%); - - --color-negative: #ff5555; - --color-negative-1: #ff555520; - --color-negative-2: #ff555540; - --color-negative-3: #ff555560; - --color-negative-4: #ff555580; - --color-negative-5: #ff5555aa; - --color-negative-6: hsl(0, 40%, 30%); - - --color-foreground: #1a1a2c; - --color-foreground-1: #ebecf8; - --color-foreground-2: #e3e3f3; - --color-foreground-3: #d2d2e8; - --color-foreground-4: #9b9bc0; - --color-foreground-5: #6f6f8a; - --color-foreground-6: #42425a; - - --color-background: #f3f6fd; - --color-background-1: #ffffff; +:root[data-theme="dark"] { + --color-background-default: #0a0d10; + --color-background-float: #14151a; + --color-background-dip: #000000; + --color-foreground-contrast: #f9f9fb; + --color-foreground-dim: #9494b8; + --color-foreground-emphasized: #7070ff; + --color-foreground-emphasized-hover: #8585ff; + --color-foreground-match-background: #0a0d10; + --color-foreground-white: #ffffff; + --color-foreground-black: #000000; + --color-foreground-primary: #ff55ff; + --color-foreground-success: #4fa877; + --color-foreground-red: #aa5078; + --color-foreground-gray: #9494b8; + --color-foreground-yellow: #e5c001; + --color-foreground-disabled: #494a5a; + --color-border-hint: #24252d; + --color-border-focus: #7070ff; + --color-border-contrast: #ebebff; + --color-border-default: #2e2f38; + --color-border-error: #aa5078; + --color-border-merged: #3d003d; + --color-border-match-background: #0a0d10; + --color-fill-secondary: #7070ff; + --color-fill-secondary-hover: #8585ff; + --color-fill-ghost: #24252d; + --color-fill-ghost-hover: #2e2f38; + --color-fill-separator: #24252d; + --color-fill-primary: #ff70ff; + --color-fill-success: #4fa877; + --color-fill-danger: #6b2b42; + --color-fill-yellow: #ffe609; + --color-fill-gray: #9494b8; + --color-fill-primary-hover: #ff80ff; + --color-fill-diff-red: #4d1929; + --color-fill-diff-red-light: #2d060d; + --color-fill-diff-green: #183425; + --color-fill-diff-green-light: #142a1d; + --color-fill-float: #14151a; + --color-fill-float-hover: #1b1c22; + --color-fill-merged: #1a001a; } diff --git a/public/elevations.css b/public/elevations.css index 20e595bb2..d3a8f1341 100644 --- a/public/elevations.css +++ b/public/elevations.css @@ -1,11 +1,7 @@ :root { - --elevation-low: 0px 16px 32px 32px #00000070; - --elevation-high: 0px 0px 1px var(--color-secondary), - 0px 8px 64px var(--color-secondary-5); + --elevation-low: 0 0 64px 0 #00000099; } [data-theme="light"] { - --elevation-low: 0px 16px 32px 16px #00000020; - --elevation-high: 0px 0px 1px var(--color-secondary), - 0px 8px 64px var(--color-secondary-3); + --elevation-low: 0 0 64px 0 #0000001a; } diff --git a/public/fonts/Inter-Bold.otf b/public/fonts/Inter-Bold.otf deleted file mode 100644 index 24c150914..000000000 Binary files a/public/fonts/Inter-Bold.otf and /dev/null differ diff --git a/public/fonts/Inter-Bold.woff2 b/public/fonts/Inter-Bold.woff2 new file mode 100644 index 000000000..2846f29cc Binary files /dev/null and b/public/fonts/Inter-Bold.woff2 differ diff --git a/public/fonts/Inter-Medium.woff2 b/public/fonts/Inter-Medium.woff2 new file mode 100644 index 000000000..f92498a2e Binary files /dev/null and b/public/fonts/Inter-Medium.woff2 differ diff --git a/public/fonts/Inter-Regular.otf b/public/fonts/Inter-Regular.otf deleted file mode 100644 index 2e3c5f4d3..000000000 Binary files a/public/fonts/Inter-Regular.otf and /dev/null differ diff --git a/public/fonts/Inter-Regular.woff b/public/fonts/Inter-Regular.woff deleted file mode 100644 index 7ff51b7d8..000000000 Binary files a/public/fonts/Inter-Regular.woff and /dev/null differ diff --git a/public/fonts/Inter-Regular.woff2 b/public/fonts/Inter-Regular.woff2 new file mode 100644 index 000000000..6c2b6893d Binary files /dev/null and b/public/fonts/Inter-Regular.woff2 differ diff --git a/public/fonts/Inter-SemiBold.otf b/public/fonts/Inter-SemiBold.otf deleted file mode 100644 index 7e014c941..000000000 Binary files a/public/fonts/Inter-SemiBold.otf and /dev/null differ diff --git a/public/fonts/Inter-SemiBold.woff2 b/public/fonts/Inter-SemiBold.woff2 new file mode 100644 index 000000000..611e90c95 Binary files /dev/null and b/public/fonts/Inter-SemiBold.woff2 differ diff --git a/public/fonts/JetBrainsMono-Bold.ttf b/public/fonts/JetBrainsMono-Bold.ttf deleted file mode 100644 index 0a9280916..000000000 Binary files a/public/fonts/JetBrainsMono-Bold.ttf and /dev/null differ diff --git a/public/fonts/JetBrainsMono-Bold.woff2 b/public/fonts/JetBrainsMono-Bold.woff2 new file mode 100644 index 000000000..4917f4341 Binary files /dev/null and b/public/fonts/JetBrainsMono-Bold.woff2 differ diff --git a/public/fonts/JetBrainsMono-BoldItalic.ttf b/public/fonts/JetBrainsMono-BoldItalic.ttf deleted file mode 100644 index d051920c1..000000000 Binary files a/public/fonts/JetBrainsMono-BoldItalic.ttf and /dev/null differ diff --git a/public/fonts/JetBrainsMono-Italic.ttf b/public/fonts/JetBrainsMono-Italic.ttf deleted file mode 100644 index e54a46ee9..000000000 Binary files a/public/fonts/JetBrainsMono-Italic.ttf and /dev/null differ diff --git a/public/fonts/JetBrainsMono-Medium.woff2 b/public/fonts/JetBrainsMono-Medium.woff2 new file mode 100644 index 000000000..669d04cdf Binary files /dev/null and b/public/fonts/JetBrainsMono-Medium.woff2 differ diff --git a/public/fonts/JetBrainsMono-Regular.ttf b/public/fonts/JetBrainsMono-Regular.ttf deleted file mode 100644 index 8da8aa405..000000000 Binary files a/public/fonts/JetBrainsMono-Regular.ttf and /dev/null differ diff --git a/public/fonts/JetBrainsMono-Regular.woff2 b/public/fonts/JetBrainsMono-Regular.woff2 new file mode 100644 index 000000000..40da42765 Binary files /dev/null and b/public/fonts/JetBrainsMono-Regular.woff2 differ diff --git a/public/fonts/JetBrainsMono-SemiBold.ttf b/public/fonts/JetBrainsMono-SemiBold.ttf deleted file mode 100644 index 94c1b18c2..000000000 Binary files a/public/fonts/JetBrainsMono-SemiBold.ttf and /dev/null differ diff --git a/public/fonts/JetBrainsMono-SemiBold.woff2 b/public/fonts/JetBrainsMono-SemiBold.woff2 new file mode 100644 index 000000000..5ead7b0d6 Binary files /dev/null and b/public/fonts/JetBrainsMono-SemiBold.woff2 differ diff --git a/public/fonts/JetBrainsMono-SemiBoldItalic.ttf b/public/fonts/JetBrainsMono-SemiBoldItalic.ttf deleted file mode 100644 index 51d8fdd2e..000000000 Binary files a/public/fonts/JetBrainsMono-SemiBoldItalic.ttf and /dev/null differ diff --git a/public/index.css b/public/index.css index 9dffa232c..bd041305a 100644 --- a/public/index.css +++ b/public/index.css @@ -4,9 +4,9 @@ } :root { - --border-radius: 0.75rem; - --border-radius-tiny: 0.25rem; - --border-radius-small: 0.5rem; + --border-radius-tiny: 2px; + --border-radius-small: 4px; + --border-radius-regular: 8px; --border-radius-round: 10rem; --content-max-width: 1920px; @@ -17,20 +17,6 @@ --button-regular-height: 2.5rem; --button-small-height: 2rem; --button-tiny-height: 1.5rem; - - --header-gradient: linear-gradient( - 180deg, - var(--color-secondary-3) 0%, - transparent 100% - ); -} - -[data-theme="light"] { - --header-gradient: linear-gradient( - 180deg, - var(--color-secondary-2) 0%, - transparent 100% - ); } html { @@ -45,12 +31,12 @@ body { height: 100%; margin: 0; padding: 0; - color: var(--color-foreground); + color: var(--color-foreground-contrast); text-align: left; - background-color: var(--color-background); + background-color: var(--color-background-default); scrollbar-width: thin; scrollbar-height: thin; - scrollbar-color: var(--color-foreground-4) transparent; + scrollbar-color: var(--color-fill-ghost) transparent; } @media (max-width: 720px) { @@ -60,8 +46,8 @@ body { } ::selection { - background: var(--color-primary); - color: var(--color-background); + background: var(--color-fill-yellow); + color: var(--color-foreground-black); } /* Chrome/Edge/Safari scrollbar */ @@ -74,14 +60,14 @@ body { } *::-webkit-scrollbar-thumb { background: transparent; - border-radius: var(--border-radius); + border-radius: var(--border-radius-regular); } *::-webkit-scrollbar-corner { background: transparent; } *:hover::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb { - background-color: var(--color-foreground-4); + background-color: var(--color-fill-ghost); } main { @@ -93,7 +79,13 @@ a { text-decoration: none; } -a:hover { - color: var(--color-foreground); - border-bottom-color: var(--color-foreground); +pre { + margin: 0; +} + +.global-hash { + color: var(--color-foreground-emphasized); + font-size: var(--font-size-small); + font-family: var(--font-family-monospace); + font-weight: var(--font-weight-regular); } diff --git a/public/typography.css b/public/typography.css index 7eed0696d..816d08e82 100644 --- a/public/typography.css +++ b/public/typography.css @@ -3,21 +3,28 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url("fonts/Inter-Regular.woff"); + src: url("fonts/Inter-Regular.woff2"); +} + +@font-face { + font-family: "Inter"; + font-weight: 500; + font-display: swap; + src: url("fonts/Inter-Medium.woff2"); } @font-face { font-family: "Inter"; font-weight: 600; font-display: swap; - src: url("fonts/Inter-SemiBold.otf"); + src: url("fonts/Inter-SemiBold.woff2"); } @font-face { font-family: "Inter"; font-weight: 700; font-display: swap; - src: url("fonts/Inter-Bold.otf"); + src: url("fonts/Inter-Bold.woff2"); } @font-face { @@ -25,60 +32,45 @@ font-style: normal; font-weight: 400; font-display: swap; - src: url("fonts/JetBrainsMono-Regular.ttf"); + src: url("fonts/JetBrainsMono-Regular.woff2"); +} + +@font-face { + font-family: "JetBrains Mono"; + font-style: normal; + font-weight: 500; + font-display: swap; + src: url("fonts/JetBrainsMono-Medium.woff2"); } @font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; - src: url("fonts/JetBrainsMono-SemiBold.ttf"); + src: url("fonts/JetBrainsMono-SemiBold.woff2"); } @font-face { font-family: "JetBrains Mono"; font-weight: 700; font-display: swap; - src: url("fonts/JetBrainsMono-Bold.ttf"); -} - -@font-face { - font-family: "JetBrains Mono"; - font-style: italic; - font-weight: 400; - font-display: swap; - src: url("fonts/JetBrainsMono-Italic.ttf"); -} - -@font-face { - font-family: "JetBrains Mono"; - font-style: italic; - font-weight: 600; - font-display: swap; - src: url("fonts/JetBrainsMono-SemiBoldItalic.ttf"); -} - -@font-face { - font-family: "JetBrains Mono"; - font-style: italic; - font-weight: 700; - font-display: swap; - src: url("fonts/JetBrainsMono-BoldItalic.ttf"); + src: url("fonts/JetBrainsMono-Bold.woff2"); } :root { --font-family-sans-serif: Inter, sans-serif; --font-family-monospace: monospace; - --font-weight-normal: 400; - --font-weight-medium: 600; + --font-weight-regular: 400; + --font-weight-medium: 500; + --font-weight-semibold: 600; --font-weight-bold: 700; - --font-size-tiny: 0.75rem; - --font-size-small: 0.875rem; - --font-size-regular: 1rem; - --font-size-medium: 1.25rem; - --font-size-large: 1.75rem; - --font-size-x-large: 2rem; - --font-size-xx-large: 3rem; + --font-size-tiny: 0.75rem; /* 12px */ + --font-size-small: 0.875rem; /* 14px */ + --font-size-regular: 1rem; /* 16px */ + --font-size-medium: 1.25rem; /* 20px */ + --font-size-large: 1.5rem; /* 24px */ + --font-size-x-large: 2rem; /* 32px */ + --font-size-xx-large: 3rem; /* 48px */ } [data-codefont="system"] { @@ -94,21 +86,17 @@ html { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; font-family: var(--font-family-sans-serif); - font-feature-settings: "ss01", "ss02", "cv01", "cv03"; + font-feature-settings: "ss01", "cv01", "cv03"; /* The root element font size has to be set in px, * otherwise Safari breaks. */ font-size: 16px; - font-weight: var(--font-weight-normal); + font-weight: var(--font-weight-regular); line-height: 1.5; } p { margin: 1rem 0; } -.txt-highlight { - color: var(--color-secondary); -} - .txt-tiny { font-size: var(--font-size-tiny); } @@ -138,17 +126,13 @@ p { font-weight: var(--font-weight-bold) !important; } .txt-missing { - color: var(--color-foreground-5); - font-style: italic; + color: var(--color-foreground-dim); } .txt-link { - color: var(--color-foreground-6); text-decoration: none; - border-bottom: 1px dashed var(--color-foreground-5); } .txt-link:hover { - color: var(--color-foreground); - border-bottom-color: var(--color-foreground); + color: var(--color-fill-primary); } .txt-emoji { height: 1em; diff --git a/src/App.svelte b/src/App.svelte index b130181db..98dcf737c 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -5,10 +5,11 @@ import * as httpd from "@app/lib/httpd"; import { unreachable } from "@app/lib/utils"; + import Footer from "./App/Footer.svelte"; + import FullscreenModalPortal from "./App/FullscreenModalPortal.svelte"; import Header from "./App/Header.svelte"; import Hotkeys from "./App/Hotkeys.svelte"; import LoadingBar from "./App/LoadingBar.svelte"; - import ModalPortal from "./App/ModalPortal.svelte"; import Commit from "@app/views/projects/Commit.svelte"; import History from "@app/views/projects/History.svelte"; @@ -42,17 +43,8 @@ @@ -61,42 +53,43 @@ {/if} - +
-
- {#if $activeRouteStore.resource === "booting"} - - {:else if $activeRouteStore.resource === "home"} - - {:else if $activeRouteStore.resource === "nodes"} - - {:else if $activeRouteStore.resource === "session"} - - {:else if $activeRouteStore.resource === "project.source"} - - {:else if $activeRouteStore.resource === "project.history"} - - {:else if $activeRouteStore.resource === "project.commit"} - - {:else if $activeRouteStore.resource === "project.issues"} - - {:else if $activeRouteStore.resource === "project.newIssue"} - - {:else if $activeRouteStore.resource === "project.issue"} - - {:else if $activeRouteStore.resource === "project.patches"} - - {:else if $activeRouteStore.resource === "project.patch"} - - {:else if $activeRouteStore.resource === "loadError"} - - {:else if $activeRouteStore.resource === "notFound"} - - {:else} - {unreachable($activeRouteStore)} - {/if} + {#if $activeRouteStore.resource === "booting"} + + {:else if $activeRouteStore.resource === "home"} + + {:else if $activeRouteStore.resource === "nodes"} + + {:else if $activeRouteStore.resource === "session"} + + {:else if $activeRouteStore.resource === "project.source"} + + {:else if $activeRouteStore.resource === "project.history"} + + {:else if $activeRouteStore.resource === "project.commit"} + + {:else if $activeRouteStore.resource === "project.issues"} + + {:else if $activeRouteStore.resource === "project.newIssue"} + + {:else if $activeRouteStore.resource === "project.issue"} + + {:else if $activeRouteStore.resource === "project.patches"} + + {:else if $activeRouteStore.resource === "project.patch"} + + {:else if $activeRouteStore.resource === "loadError"} + + {:else if $activeRouteStore.resource === "notFound"} + + {:else} + {unreachable($activeRouteStore)} + {/if} +
+
diff --git a/src/App/Footer.svelte b/src/App/Footer.svelte new file mode 100644 index 000000000..63e216c40 --- /dev/null +++ b/src/App/Footer.svelte @@ -0,0 +1,84 @@ + + + + + diff --git a/src/App/ModalPortal.svelte b/src/App/FullscreenModalPortal.svelte similarity index 92% rename from src/App/ModalPortal.svelte rename to src/App/FullscreenModalPortal.svelte index 7c2095a40..2aa410e67 100644 --- a/src/App/ModalPortal.svelte +++ b/src/App/FullscreenModalPortal.svelte @@ -30,8 +30,9 @@ {#if $modalStore}
-
diff --git a/src/App/Header.svelte b/src/App/Header.svelte index cb6e3bf7e..e724d2cd5 100644 --- a/src/App/Header.svelte +++ b/src/App/Header.svelte @@ -1,11 +1,8 @@
@@ -70,13 +51,5 @@
- -
- -
- -
diff --git a/src/App/Header/Connect.svelte b/src/App/Header/Connect.svelte index 9ce279393..e98eab347 100644 --- a/src/App/Header/Connect.svelte +++ b/src/App/Header/Connect.svelte @@ -2,26 +2,18 @@ import type { HttpdState } from "@app/lib/httpd"; import * as httpd from "@app/lib/httpd"; - import { closeFocused } from "@app/components/Floating.svelte"; + import * as modal from "@app/lib/modal"; + import { closeFocused } from "@app/components/Popover.svelte"; import { httpdStore } from "@app/lib/httpd"; - import Authorship from "@app/components/Authorship.svelte"; import Button from "@app/components/Button.svelte"; - import Clipboard from "@app/components/Clipboard.svelte"; - import Command from "@app/components/Command.svelte"; - import Floating from "@app/components/Floating.svelte"; + import ConnectModal from "@app/modals/ConnectModal.svelte"; import Icon from "@app/components/Icon.svelte"; + import IconButton from "@app/components/IconButton.svelte"; import Link from "@app/components/Link.svelte"; - import PortInput from "@app/App/Header/Connect/PortInput.svelte"; + import NodeId from "@app/components/NodeId.svelte"; + import Popover from "@app/components/Popover.svelte"; - $: customUrl = `${httpd.api.baseUrl.scheme}://${httpd.api.baseUrl.hostname}:${customPort}`; - $: command = import.meta.env.PROD - ? `rad web --backend ${customUrl}` - : `rad web --frontend ${ - new URL(import.meta.url).origin - } --backend ${customUrl}`; - - let customPort = httpd.api.port; const buttonTitle: Record = { stopped: "radicle-httpd is stopped", running: "radicle-httpd is running", @@ -30,147 +22,149 @@ - -
+{#if $httpdStore.state === "authenticated"} + -
-
- {#if $httpdStore.state === "authenticated"} -