Small tweaks
This commit is contained in:
@@ -299,9 +299,9 @@
|
||||
<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"
|
||||
>
|
||||
<span class="label">Configuration</span>
|
||||
<span class="label">Configuration: </span>
|
||||
<select
|
||||
class="select select-sm"
|
||||
class="select select-sm w-36"
|
||||
value={currentEditor.configId ?? ""}
|
||||
onchange={(e) => loadConfig(e.currentTarget.value)}
|
||||
>
|
||||
@@ -320,63 +320,23 @@
|
||||
<span class="badge badge-success badge-sm">Live</span>
|
||||
{/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>
|
||||
|
||||
<button
|
||||
class="btn btn-ghost btn-sm"
|
||||
disabled={!isDirty}
|
||||
hidden={!isDirty}
|
||||
onclick={discard}
|
||||
>
|
||||
Discard
|
||||
Discard changes
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-outline btn-sm"
|
||||
disabled={settingLive ||
|
||||
isDirty ||
|
||||
currentEditor.configId === liveConfigId}
|
||||
hidden={currentEditor.configId === liveConfigId || isDirty}
|
||||
disabled={settingLive || isDirty}
|
||||
onclick={setLive}
|
||||
>
|
||||
{settingLive ? "Setting live..." : "Set as live"}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-outline btn-sm"
|
||||
disabled={saving || !currentEditor.name}
|
||||
onclick={saveAsNew}
|
||||
>
|
||||
Save as new
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary btn-sm"
|
||||
disabled={saving || !isDirty}
|
||||
@@ -384,6 +344,13 @@
|
||||
>
|
||||
{saving ? "Saving..." : "Save"}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-outline btn-sm"
|
||||
disabled={saving || !currentEditor.name}
|
||||
onclick={saveAsNew}
|
||||
>
|
||||
Save as new
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{#if saveError}
|
||||
@@ -394,10 +361,26 @@
|
||||
|
||||
<section class="w-full flex gap-4 flex-wrap mt-6">
|
||||
<fieldset class="fieldset bg-base-200 p-4">
|
||||
<legend class="fieldset-legend text-lg font-semibold"
|
||||
>Global Parameters</legend
|
||||
<label class="flex flex-col gap-1">
|
||||
<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">
|
||||
<span class="label text-xs">Max level</span>
|
||||
<input
|
||||
@@ -413,13 +396,12 @@
|
||||
|
||||
<fieldset class="fieldset bg-base-200 p-4">
|
||||
<legend class="fieldset-legend text-lg font-semibold"
|
||||
>{activityMetadata.name} Parameters</legend
|
||||
>Parameters</legend
|
||||
>
|
||||
|
||||
<label class="flex flex-col gap-1 mb-3">
|
||||
<span class="label text-xs">Activity</span>
|
||||
<select
|
||||
class="select select-sm w-36"
|
||||
class="select select-md w-36"
|
||||
name="activities"
|
||||
bind:value={activity}
|
||||
>
|
||||
@@ -439,9 +421,9 @@
|
||||
|
||||
<PercentInput
|
||||
label="Difficulty (%)"
|
||||
min={-100}
|
||||
max={100}
|
||||
step={5}
|
||||
min={-200}
|
||||
max={200}
|
||||
step={1}
|
||||
value={activityParams.difficultyModifier}
|
||||
onchange={(v) => (activityParams.difficultyModifier = v)}
|
||||
/>
|
||||
@@ -545,7 +527,6 @@
|
||||
|
||||
{#if activeTab === "standards"}
|
||||
<div class="flex items-center gap-4 text-sm opacity-70 mt-6">
|
||||
<span>Filter:</span>
|
||||
<label class="flex items-center gap-2">
|
||||
<span class="label">Gender</span>
|
||||
<select
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"": {
|
||||
"name": "blade-and-brawn",
|
||||
"dependencies": {
|
||||
"@sinclair/typebox": "^0.34.49",
|
||||
"@sinclair/typebox": "^0.34.50",
|
||||
"pino": "^10.3.1",
|
||||
},
|
||||
"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=="],
|
||||
|
||||
"@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=="],
|
||||
|
||||
|
||||
+1
-1
@@ -17,6 +17,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"pino": "^10.3.1",
|
||||
"@sinclair/typebox": "^0.34.49"
|
||||
"@sinclair/typebox": "^0.34.50"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -537,7 +537,7 @@ export class Standards {
|
||||
}
|
||||
return out;
|
||||
},
|
||||
getOne: function (): Standard | undefined {
|
||||
getOne: function(): Standard | undefined {
|
||||
return execMethods.exact.getAll()[0];
|
||||
},
|
||||
getNearest(
|
||||
|
||||
Reference in New Issue
Block a user