Small tweaks
This commit is contained in:
@@ -299,9 +299,9 @@
|
|||||||
<div
|
<div
|
||||||
class="w-full -mt-10 -mx-10 px-6 py-2 bg-base-200 border-b border-base-300 flex items-center gap-2 flex-wrap text-sm"
|
class="w-full -mt-10 -mx-10 px-6 py-2 bg-base-200 border-b border-base-300 flex items-center gap-2 flex-wrap text-sm"
|
||||||
>
|
>
|
||||||
<span class="label">Configuration</span>
|
<span class="label">Configuration: </span>
|
||||||
<select
|
<select
|
||||||
class="select select-sm"
|
class="select select-sm w-36"
|
||||||
value={currentEditor.configId ?? ""}
|
value={currentEditor.configId ?? ""}
|
||||||
onchange={(e) => loadConfig(e.currentTarget.value)}
|
onchange={(e) => loadConfig(e.currentTarget.value)}
|
||||||
>
|
>
|
||||||
@@ -320,63 +320,23 @@
|
|||||||
<span class="badge badge-success badge-sm">Live</span>
|
<span class="badge badge-success badge-sm">Live</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<details class="dropdown">
|
|
||||||
<summary
|
|
||||||
class="btn btn-ghost btn-sm gap-1 font-normal opacity-70 list-none [&::-webkit-details-marker]:hidden"
|
|
||||||
>
|
|
||||||
More ▾
|
|
||||||
</summary>
|
|
||||||
<div
|
|
||||||
class="dropdown-content z-10 menu bg-base-100 rounded-box shadow p-4 gap-3 w-64 mt-2"
|
|
||||||
>
|
|
||||||
<label class="w-full">
|
|
||||||
<span class="label mb-1">Configuration name</span>
|
|
||||||
<input
|
|
||||||
class="input input-sm w-full"
|
|
||||||
bind:value={currentEditor.name}
|
|
||||||
placeholder="Config name"
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
<label class="w-full">
|
|
||||||
<span class="label mb-1">Dataset</span>
|
|
||||||
<select
|
|
||||||
class="select select-sm w-full"
|
|
||||||
value={currentEditor.datasetId}
|
|
||||||
onchange={(e) => onDatasetChange(e.currentTarget.value)}
|
|
||||||
>
|
|
||||||
{#each datasets as dataset}
|
|
||||||
<option value={dataset.id}>{dataset.name}</option>
|
|
||||||
{/each}
|
|
||||||
</select>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<div class="flex-1"></div>
|
<div class="flex-1"></div>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-ghost btn-sm"
|
class="btn btn-ghost btn-sm"
|
||||||
disabled={!isDirty}
|
hidden={!isDirty}
|
||||||
onclick={discard}
|
onclick={discard}
|
||||||
>
|
>
|
||||||
Discard
|
Discard changes
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="btn btn-outline btn-sm"
|
class="btn btn-outline btn-sm"
|
||||||
disabled={settingLive ||
|
hidden={currentEditor.configId === liveConfigId || isDirty}
|
||||||
isDirty ||
|
disabled={settingLive || isDirty}
|
||||||
currentEditor.configId === liveConfigId}
|
|
||||||
onclick={setLive}
|
onclick={setLive}
|
||||||
>
|
>
|
||||||
{settingLive ? "Setting live..." : "Set as live"}
|
{settingLive ? "Setting live..." : "Set as live"}
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
class="btn btn-outline btn-sm"
|
|
||||||
disabled={saving || !currentEditor.name}
|
|
||||||
onclick={saveAsNew}
|
|
||||||
>
|
|
||||||
Save as new
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary btn-sm"
|
class="btn btn-primary btn-sm"
|
||||||
disabled={saving || !isDirty}
|
disabled={saving || !isDirty}
|
||||||
@@ -384,6 +344,13 @@
|
|||||||
>
|
>
|
||||||
{saving ? "Saving..." : "Save"}
|
{saving ? "Saving..." : "Save"}
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="btn btn-outline btn-sm"
|
||||||
|
disabled={saving || !currentEditor.name}
|
||||||
|
onclick={saveAsNew}
|
||||||
|
>
|
||||||
|
Save as new
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if saveError}
|
{#if saveError}
|
||||||
@@ -394,10 +361,26 @@
|
|||||||
|
|
||||||
<section class="w-full flex gap-4 flex-wrap mt-6">
|
<section class="w-full flex gap-4 flex-wrap mt-6">
|
||||||
<fieldset class="fieldset bg-base-200 p-4">
|
<fieldset class="fieldset bg-base-200 p-4">
|
||||||
<legend class="fieldset-legend text-lg font-semibold"
|
<label class="flex flex-col gap-1">
|
||||||
>Global Parameters</legend
|
<span class="label text-xs">Name</span>
|
||||||
|
<input
|
||||||
|
class="input input-sm w-36"
|
||||||
|
bind:value={currentEditor.name}
|
||||||
|
placeholder="Config name"
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label class="flex flex-col gap-1">
|
||||||
|
<span class="label text-xs">Dataset</span>
|
||||||
|
<select
|
||||||
|
class="select select-sm w-36"
|
||||||
|
value={currentEditor.datasetId}
|
||||||
|
onchange={(e) => onDatasetChange(e.currentTarget.value)}
|
||||||
>
|
>
|
||||||
|
{#each datasets as dataset}
|
||||||
|
<option value={dataset.id}>{dataset.name}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
<label class="flex flex-col gap-1">
|
<label class="flex flex-col gap-1">
|
||||||
<span class="label text-xs">Max level</span>
|
<span class="label text-xs">Max level</span>
|
||||||
<input
|
<input
|
||||||
@@ -413,13 +396,12 @@
|
|||||||
|
|
||||||
<fieldset class="fieldset bg-base-200 p-4">
|
<fieldset class="fieldset bg-base-200 p-4">
|
||||||
<legend class="fieldset-legend text-lg font-semibold"
|
<legend class="fieldset-legend text-lg font-semibold"
|
||||||
>{activityMetadata.name} Parameters</legend
|
>Parameters</legend
|
||||||
>
|
>
|
||||||
|
|
||||||
<label class="flex flex-col gap-1 mb-3">
|
<label class="flex flex-col gap-1 mb-3">
|
||||||
<span class="label text-xs">Activity</span>
|
|
||||||
<select
|
<select
|
||||||
class="select select-sm w-36"
|
class="select select-md w-36"
|
||||||
name="activities"
|
name="activities"
|
||||||
bind:value={activity}
|
bind:value={activity}
|
||||||
>
|
>
|
||||||
@@ -439,9 +421,9 @@
|
|||||||
|
|
||||||
<PercentInput
|
<PercentInput
|
||||||
label="Difficulty (%)"
|
label="Difficulty (%)"
|
||||||
min={-100}
|
min={-200}
|
||||||
max={100}
|
max={200}
|
||||||
step={5}
|
step={1}
|
||||||
value={activityParams.difficultyModifier}
|
value={activityParams.difficultyModifier}
|
||||||
onchange={(v) => (activityParams.difficultyModifier = v)}
|
onchange={(v) => (activityParams.difficultyModifier = v)}
|
||||||
/>
|
/>
|
||||||
@@ -545,7 +527,6 @@
|
|||||||
|
|
||||||
{#if activeTab === "standards"}
|
{#if activeTab === "standards"}
|
||||||
<div class="flex items-center gap-4 text-sm opacity-70 mt-6">
|
<div class="flex items-center gap-4 text-sm opacity-70 mt-6">
|
||||||
<span>Filter:</span>
|
|
||||||
<label class="flex items-center gap-2">
|
<label class="flex items-center gap-2">
|
||||||
<span class="label">Gender</span>
|
<span class="label">Gender</span>
|
||||||
<select
|
<select
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "blade-and-brawn",
|
"name": "blade-and-brawn",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sinclair/typebox": "^0.34.49",
|
"@sinclair/typebox": "^0.34.50",
|
||||||
"pino": "^10.3.1",
|
"pino": "^10.3.1",
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
|
|
||||||
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.59.0", "", { "os": "win32", "cpu": "x64" }, "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA=="],
|
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.59.0", "", { "os": "win32", "cpu": "x64" }, "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA=="],
|
||||||
|
|
||||||
"@sinclair/typebox": ["@sinclair/typebox@0.34.49", "", {}, "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A=="],
|
"@sinclair/typebox": ["@sinclair/typebox@0.34.50", "", {}, "sha512-ydBWw0G6WFwWHzh9RK4B5c690UkreOG0llq0r+DaI7LgKgxigf8mhHzIPI3S0850g1BPkq/zpuCfrq4QFgUlTQ=="],
|
||||||
|
|
||||||
"@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
|
"@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -17,6 +17,6 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"pino": "^10.3.1",
|
"pino": "^10.3.1",
|
||||||
"@sinclair/typebox": "^0.34.49"
|
"@sinclair/typebox": "^0.34.50"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -537,7 +537,7 @@ export class Standards {
|
|||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
},
|
},
|
||||||
getOne: function (): Standard | undefined {
|
getOne: function(): Standard | undefined {
|
||||||
return execMethods.exact.getAll()[0];
|
return execMethods.exact.getAll()[0];
|
||||||
},
|
},
|
||||||
getNearest(
|
getNearest(
|
||||||
|
|||||||
Reference in New Issue
Block a user