web: link profiles to shared config editor
This commit is contained in:
@@ -20,6 +20,11 @@ function assert(condition: unknown, message: string): asserts condition {
|
|||||||
Deno.test("settings section navigation stays under the settings route", () => {
|
Deno.test("settings section navigation stays under the settings route", () => {
|
||||||
assert(SETTINGS_ROUTE === "/settings", "settings route should be stable");
|
assert(SETTINGS_ROUTE === "/settings", "settings route should be stable");
|
||||||
|
|
||||||
|
assert(
|
||||||
|
settingsSectionHref("configuration-sources") === "/settings/configuration",
|
||||||
|
"shared configuration editor route should stay canonical",
|
||||||
|
);
|
||||||
|
|
||||||
for (const section of SETTINGS_SECTIONS) {
|
for (const section of SETTINGS_SECTIONS) {
|
||||||
const href = settingsSectionHref(section.id);
|
const href = settingsSectionHref(section.id);
|
||||||
assert(
|
assert(
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import DiagnosticsList from "$lib/workspace/settings/DiagnosticsList.svelte";
|
import DiagnosticsList from "$lib/workspace/settings/DiagnosticsList.svelte";
|
||||||
|
import { settingsSectionHref } from "$lib/workspace/settings/model";
|
||||||
import { fetchProfileSettings } from "$lib/workspace/settings/profile-api";
|
import { fetchProfileSettings } from "$lib/workspace/settings/profile-api";
|
||||||
import type { ProfileSettingsResponse } from "$lib/workspace/settings/profile-types";
|
import type { ProfileSettingsResponse } from "$lib/workspace/settings/profile-types";
|
||||||
import type { PageProps } from "./$types";
|
import type { PageProps } from "./$types";
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
<p class="eyebrow">Workspace configuration projection</p>
|
<p class="eyebrow">Workspace configuration projection</p>
|
||||||
<h2 id="profiles-title">Profiles</h2>
|
<h2 id="profiles-title">Profiles</h2>
|
||||||
</div>
|
</div>
|
||||||
<a class="badge" href={`/w/${encodeURIComponent(workspaceId)}/settings/configuration-sources`}>
|
<a class="badge" href={`/w/${encodeURIComponent(workspaceId)}${settingsSectionHref("configuration-sources")}`}>
|
||||||
Edit configuration
|
Edit configuration
|
||||||
</a>
|
</a>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
Reference in New Issue
Block a user