fix restart checkbox not triggering
This commit is contained in:
@@ -18,14 +18,14 @@
|
|||||||
formLoading = false;
|
formLoading = false;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
class="space-y-6 max-w-3xl"
|
class="max-w-3xl space-y-6"
|
||||||
>
|
>
|
||||||
<input type="hidden" name="id" value={id} />
|
<input type="hidden" name="id" value={id} />
|
||||||
<input type="hidden" name="file" value={configFile.assistRules} />
|
<input type="hidden" name="file" value={configFile.assistRules} />
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||||
<!-- Stability Control Level Max -->
|
<!-- Stability Control Level Max -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Stability Control Level Max:
|
Stability Control Level Max:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.stabilityControlLevelMax}
|
bind:value={editedConfig.stabilityControlLevelMax}
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<!-- Disable Autosteer -->
|
<!-- Disable Autosteer -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Autosteer:
|
Disable Autosteer:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutosteer}
|
bind:value={editedConfig.disableAutosteer}
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
<!-- Disable Auto Lights -->
|
<!-- Disable Auto Lights -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Auto Lights:
|
Disable Auto Lights:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutoLights}
|
bind:value={editedConfig.disableAutoLights}
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
<!-- Disable Auto Wiper -->
|
<!-- Disable Auto Wiper -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Auto Wiper:
|
Disable Auto Wiper:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutoWiper}
|
bind:value={editedConfig.disableAutoWiper}
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
|
|
||||||
<!-- Disable Auto Engine Start -->
|
<!-- Disable Auto Engine Start -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Auto Engine Start:
|
Disable Auto Engine Start:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutoEngineStart}
|
bind:value={editedConfig.disableAutoEngineStart}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
<!-- Disable Auto Pit Limiter -->
|
<!-- Disable Auto Pit Limiter -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Auto Pit Limiter:
|
Disable Auto Pit Limiter:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutoPitLimiter}
|
bind:value={editedConfig.disableAutoPitLimiter}
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
|
|
||||||
<!-- Disable Auto Gear -->
|
<!-- Disable Auto Gear -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Auto Gear:
|
Disable Auto Gear:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutoGear}
|
bind:value={editedConfig.disableAutoGear}
|
||||||
@@ -135,7 +135,7 @@
|
|||||||
|
|
||||||
<!-- Disable Auto Clutch -->
|
<!-- Disable Auto Clutch -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Auto Clutch:
|
Disable Auto Clutch:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableAutoClutch}
|
bind:value={editedConfig.disableAutoClutch}
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
|
|
||||||
<!-- Disable Ideal Line -->
|
<!-- Disable Ideal Line -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Disable Ideal Line:
|
Disable Ideal Line:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.disableIdealLine}
|
bind:value={editedConfig.disableIdealLine}
|
||||||
@@ -165,22 +165,23 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4 border-t border-gray-700">
|
<div class="border-t border-gray-700 pt-4">
|
||||||
<label class="flex items-center">
|
<label class="flex items-center">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={restart}
|
bind:checked={restart}
|
||||||
class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-600 rounded bg-gray-700"
|
name="restart"
|
||||||
|
class="h-4 w-4 rounded border-gray-600 bg-gray-700 text-green-600 focus:ring-green-500"
|
||||||
/>
|
/>
|
||||||
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md text-sm font-medium"
|
class="rounded-md bg-green-600 px-4 py-2 text-sm font-medium hover:bg-green-700"
|
||||||
>
|
>
|
||||||
Save Changes
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
formLoading = false;
|
formLoading = false;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
class="space-y-6 max-w-3xl"
|
class="max-w-3xl space-y-6"
|
||||||
>
|
>
|
||||||
<input type="hidden" name="id" value={id} />
|
<input type="hidden" name="id" value={id} />
|
||||||
<input type="hidden" name="file" value={configFile.configuration} />
|
<input type="hidden" name="file" value={configFile.configuration} />
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
UDP Port:
|
UDP Port:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
TCP Port:
|
TCP Port:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Max Connections:
|
Max Connections:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Lan Discovery:
|
Lan Discovery:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.lanDiscovery}
|
bind:value={editedConfig.lanDiscovery}
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Register To Lobby:
|
Register To Lobby:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.registerToLobby}
|
bind:value={editedConfig.registerToLobby}
|
||||||
@@ -89,22 +89,23 @@
|
|||||||
</div>
|
</div>
|
||||||
<input type="hidden" name="configVersion" value={1} />
|
<input type="hidden" name="configVersion" value={1} />
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4 border-t border-gray-700">
|
<div class="border-t border-gray-700 pt-4">
|
||||||
<label class="flex items-center">
|
<label class="flex items-center">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={restart}
|
name="restart"
|
||||||
class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-600 rounded bg-gray-700"
|
bind:checked={restart}
|
||||||
|
class="h-4 w-4 rounded border-gray-600 bg-gray-700 text-green-600 focus:ring-green-500"
|
||||||
/>
|
/>
|
||||||
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md text-sm font-medium"
|
class="rounded-md bg-green-600 px-4 py-2 text-sm font-medium hover:bg-green-700"
|
||||||
>
|
>
|
||||||
Save Changes
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
formLoading = false;
|
formLoading = false;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
class="space-y-6 max-w-3xl"
|
class="max-w-3xl space-y-6"
|
||||||
>
|
>
|
||||||
<input type="hidden" name="id" value={id} />
|
<input type="hidden" name="id" value={id} />
|
||||||
<input type="hidden" name="file" value={configFile.event} />
|
<input type="hidden" name="file" value={configFile.event} />
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Track:
|
Track:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.track}
|
bind:value={editedConfig.track}
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Pre-Race waiting time seconds:
|
Pre-Race waiting time seconds:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Session over time seconds:
|
Session over time seconds:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Ambient temp:
|
Ambient temp:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Cloud level:
|
Cloud level:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Rain:
|
Rain:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Weather randomness:
|
Weather randomness:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Post-Qualy seconds:
|
Post-Qualy seconds:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Post-Race seconds:
|
Post-Race seconds:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -139,7 +139,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Simracer weather conditions:
|
Simracer weather conditions:
|
||||||
<input
|
<input
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is fixed condition qualification:
|
Is fixed condition qualification:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isFixedConditionQualification}
|
bind:value={editedConfig.isFixedConditionQualification}
|
||||||
@@ -166,15 +166,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div />
|
<div />
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Sessions:
|
Sessions:
|
||||||
<div class="mt-2 space-y-4">
|
<div class="mt-2 space-y-4">
|
||||||
{#each editedConfig.sessions as session, index}
|
{#each editedConfig.sessions as session, index}
|
||||||
<div class="mb-4 rounded-lg border border-gray-700 bg-gray-800 p-4">
|
<div class="mb-4 rounded-lg border border-gray-700 bg-gray-800 p-4">
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
|
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||||
<!-- Hour of Day -->
|
<!-- Hour of Day -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1"
|
<label class="mb-1 block text-sm font-medium text-gray-300"
|
||||||
>Hour of Day:
|
>Hour of Day:
|
||||||
<input
|
<input
|
||||||
bind:value={session.hourOfDay}
|
bind:value={session.hourOfDay}
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Day of Weekend -->
|
<!-- Day of Weekend -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Day of Weekend:
|
Day of Weekend:
|
||||||
<input
|
<input
|
||||||
bind:value={session.dayOfWeekend}
|
bind:value={session.dayOfWeekend}
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Time Multiplier -->
|
<!-- Time Multiplier -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Time Multiplier:
|
Time Multiplier:
|
||||||
<input
|
<input
|
||||||
bind:value={session.timeMultiplier}
|
bind:value={session.timeMultiplier}
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Session Type -->
|
<!-- Session Type -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Session Type:
|
Session Type:
|
||||||
<select
|
<select
|
||||||
bind:value={session.sessionType}
|
bind:value={session.sessionType}
|
||||||
@@ -229,7 +229,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Session Duration Minutes -->
|
<!-- Session Duration Minutes -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Session Duration (Minutes):
|
Session Duration (Minutes):
|
||||||
<input
|
<input
|
||||||
bind:value={session.sessionDurationMinutes}
|
bind:value={session.sessionDurationMinutes}
|
||||||
@@ -246,10 +246,21 @@
|
|||||||
onclick={() => {
|
onclick={() => {
|
||||||
editedConfig.sessions = editedConfig.sessions.filter((_, i) => i !== index);
|
editedConfig.sessions = editedConfig.sessions.filter((_, i) => i !== index);
|
||||||
}}
|
}}
|
||||||
class="mt-4 px-3 py-1 bg-red-600 hover:bg-red-700 rounded-md text-xs font-medium text-white flex items-center"
|
class="mt-4 flex items-center rounded-md bg-red-600 px-3 py-1 text-xs font-medium text-white hover:bg-red-700"
|
||||||
>
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="mr-1 h-4 w-4"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke="currentColor"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
Remove Session
|
Remove Session
|
||||||
</button>
|
</button>
|
||||||
@@ -269,10 +280,21 @@
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
}}
|
}}
|
||||||
class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md text-sm font-medium text-white flex items-center"
|
class="flex items-center rounded-md bg-green-600 px-4 py-2 text-sm font-medium text-white hover:bg-green-700"
|
||||||
>
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
<svg
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
class="mr-1 h-4 w-4"
|
||||||
|
fill="none"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
stroke="currentColor"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
stroke-width="2"
|
||||||
|
d="M12 4v16m8-8H4"
|
||||||
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
Add Session
|
Add Session
|
||||||
</button>
|
</button>
|
||||||
@@ -280,22 +302,23 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4 border-t border-gray-700">
|
<div class="border-t border-gray-700 pt-4">
|
||||||
<label class="flex items-center">
|
<label class="flex items-center">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={restart}
|
name="restart"
|
||||||
class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-600 rounded bg-gray-700"
|
bind:checked={restart}
|
||||||
|
class="h-4 w-4 rounded border-gray-600 bg-gray-700 text-green-600 focus:ring-green-500"
|
||||||
/>
|
/>
|
||||||
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md text-sm font-medium"
|
class="rounded-md bg-green-600 px-4 py-2 text-sm font-medium hover:bg-green-700"
|
||||||
>
|
>
|
||||||
Save Changes
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
formLoading = false;
|
formLoading = false;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
class="space-y-6 max-w-3xl"
|
class="max-w-3xl space-y-6"
|
||||||
>
|
>
|
||||||
<input type="hidden" name="id" value={id} />
|
<input type="hidden" name="id" value={id} />
|
||||||
<input type="hidden" name="file" value={configFile.eventRules} />
|
<input type="hidden" name="file" value={configFile.eventRules} />
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||||
<!-- Qualify Standing Type -->
|
<!-- Qualify Standing Type -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Qualify Standing Type:
|
Qualify Standing Type:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.qualifyStandingType}
|
bind:value={editedConfig.qualifyStandingType}
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
<!-- Pit Window Length Sec -->
|
<!-- Pit Window Length Sec -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Pit Window Length (Sec):
|
Pit Window Length (Sec):
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.pitWindowLengthSec}
|
bind:value={editedConfig.pitWindowLengthSec}
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
<!-- Driver Stint Time Sec -->
|
<!-- Driver Stint Time Sec -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Driver Stint Time (Sec):
|
Driver Stint Time (Sec):
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.driverStintTimeSec}
|
bind:value={editedConfig.driverStintTimeSec}
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
<!-- Mandatory Pitstop Count -->
|
<!-- Mandatory Pitstop Count -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Mandatory Pitstop Count:
|
Mandatory Pitstop Count:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.mandatoryPitstopCount}
|
bind:value={editedConfig.mandatoryPitstopCount}
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<!-- Max Total Driving Time -->
|
<!-- Max Total Driving Time -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Max Total Driving Time:
|
Max Total Driving Time:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.maxTotalDrivingTime}
|
bind:value={editedConfig.maxTotalDrivingTime}
|
||||||
@@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
<!-- Is Refuelling Allowed In Race -->
|
<!-- Is Refuelling Allowed In Race -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is Refuelling Allowed In Race:
|
Is Refuelling Allowed In Race:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isRefuellingAllowedInRace}
|
bind:value={editedConfig.isRefuellingAllowedInRace}
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
|
|
||||||
<!-- Is Refuelling Time Fixed -->
|
<!-- Is Refuelling Time Fixed -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is Refuelling Time Fixed:
|
Is Refuelling Time Fixed:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isRefuellingTimeFixed}
|
bind:value={editedConfig.isRefuellingTimeFixed}
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
|
|
||||||
<!-- Is Mandatory Pitstop Refuelling Required -->
|
<!-- Is Mandatory Pitstop Refuelling Required -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is Mandatory Pitstop Refuelling Required:
|
Is Mandatory Pitstop Refuelling Required:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isMandatoryPitstopRefuellingRequired}
|
bind:value={editedConfig.isMandatoryPitstopRefuellingRequired}
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
|
|
||||||
<!-- Is Mandatory Pitstop Tyre Change Required -->
|
<!-- Is Mandatory Pitstop Tyre Change Required -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is Mandatory Pitstop Tyre Change Required:
|
Is Mandatory Pitstop Tyre Change Required:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isMandatoryPitstopTyreChangeRequired}
|
bind:value={editedConfig.isMandatoryPitstopTyreChangeRequired}
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
|
|
||||||
<!-- Is Mandatory Pitstop Swap Driver Required -->
|
<!-- Is Mandatory Pitstop Swap Driver Required -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is Mandatory Pitstop Swap Driver Required:
|
Is Mandatory Pitstop Swap Driver Required:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isMandatoryPitstopSwapDriverRequired}
|
bind:value={editedConfig.isMandatoryPitstopSwapDriverRequired}
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
|
|
||||||
<!-- Tyre Set Count -->
|
<!-- Tyre Set Count -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Tyre Set Count:
|
Tyre Set Count:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.tyreSetCount}
|
bind:value={editedConfig.tyreSetCount}
|
||||||
@@ -187,22 +187,23 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4 border-t border-gray-700">
|
<div class="border-t border-gray-700 pt-4">
|
||||||
<label class="flex items-center">
|
<label class="flex items-center">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={restart}
|
name="restart"
|
||||||
class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-600 rounded bg-gray-700"
|
bind:checked={restart}
|
||||||
|
class="h-4 w-4 rounded border-gray-600 bg-gray-700 text-green-600 focus:ring-green-500"
|
||||||
/>
|
/>
|
||||||
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md text-sm font-medium"
|
class="rounded-md bg-green-600 px-4 py-2 text-sm font-medium hover:bg-green-700"
|
||||||
>
|
>
|
||||||
Save Changes
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -19,14 +19,14 @@
|
|||||||
formLoading = false;
|
formLoading = false;
|
||||||
};
|
};
|
||||||
}}
|
}}
|
||||||
class="space-y-6 max-w-3xl"
|
class="max-w-3xl space-y-6"
|
||||||
>
|
>
|
||||||
<input type="hidden" name="id" value={id} />
|
<input type="hidden" name="id" value={id} />
|
||||||
<input type="hidden" name="file" value={configFile.settings} />
|
<input type="hidden" name="file" value={configFile.settings} />
|
||||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
<div class="grid grid-cols-1 gap-6 md:grid-cols-2">
|
||||||
<!-- Server Name -->
|
<!-- Server Name -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Server Name:
|
Server Name:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.serverName}
|
bind:value={editedConfig.serverName}
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<!-- Admin Password -->
|
<!-- Admin Password -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Admin Password:
|
Admin Password:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.adminPassword}
|
bind:value={editedConfig.adminPassword}
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<!-- Car Group -->
|
<!-- Car Group -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Car Group:
|
Car Group:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.carGroup}
|
bind:value={editedConfig.carGroup}
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
<!-- Track Medals Requirement -->
|
<!-- Track Medals Requirement -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Track Medals Requirement:
|
Track Medals Requirement:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.trackMedalsRequirement}
|
bind:value={editedConfig.trackMedalsRequirement}
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
<!-- Safety Rating Requirement -->
|
<!-- Safety Rating Requirement -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Safety Rating Requirement:
|
Safety Rating Requirement:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.safetyRatingRequirement}
|
bind:value={editedConfig.safetyRatingRequirement}
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
|
|
||||||
<!-- Racecraft Rating Requirement -->
|
<!-- Racecraft Rating Requirement -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Racecraft Rating Requirement:
|
Racecraft Rating Requirement:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.racecraftRatingRequirement}
|
bind:value={editedConfig.racecraftRatingRequirement}
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
|
|
||||||
<!-- Password -->
|
<!-- Password -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Password:
|
Password:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.password}
|
bind:value={editedConfig.password}
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
|
|
||||||
<!-- Spectator Password -->
|
<!-- Spectator Password -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Spectator Password:
|
Spectator Password:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.spectatorPassword}
|
bind:value={editedConfig.spectatorPassword}
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
|
|
||||||
<!-- Max Car Slots -->
|
<!-- Max Car Slots -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Max Car Slots:
|
Max Car Slots:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.maxCarSlots}
|
bind:value={editedConfig.maxCarSlots}
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
|
|
||||||
<!-- Dump Leaderboards -->
|
<!-- Dump Leaderboards -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Dump Leaderboards:
|
Dump Leaderboards:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.dumpLeaderboards}
|
bind:value={editedConfig.dumpLeaderboards}
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
|
|
||||||
<!-- Is Race Locked -->
|
<!-- Is Race Locked -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Is Race Locked:
|
Is Race Locked:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.isRaceLocked}
|
bind:value={editedConfig.isRaceLocked}
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
|
|
||||||
<!-- Randomize Track When Empty -->
|
<!-- Randomize Track When Empty -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Randomize Track When Empty:
|
Randomize Track When Empty:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.randomizeTrackWhenEmpty}
|
bind:value={editedConfig.randomizeTrackWhenEmpty}
|
||||||
@@ -203,7 +203,7 @@
|
|||||||
|
|
||||||
<!-- Central Entry List Path -->
|
<!-- Central Entry List Path -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Central Entry List Path:
|
Central Entry List Path:
|
||||||
<input
|
<input
|
||||||
bind:value={editedConfig.centralEntryListPath}
|
bind:value={editedConfig.centralEntryListPath}
|
||||||
@@ -217,7 +217,7 @@
|
|||||||
|
|
||||||
<!-- Allow Auto DQ -->
|
<!-- Allow Auto DQ -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Allow Auto DQ:
|
Allow Auto DQ:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.allowAutoDQ}
|
bind:value={editedConfig.allowAutoDQ}
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
|
|
||||||
<!-- Short Formation Lap -->
|
<!-- Short Formation Lap -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Short Formation Lap:
|
Short Formation Lap:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.shortFormationLap}
|
bind:value={editedConfig.shortFormationLap}
|
||||||
@@ -249,7 +249,7 @@
|
|||||||
|
|
||||||
<!-- Formation Lap Type -->
|
<!-- Formation Lap Type -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Formation Lap Type:
|
Formation Lap Type:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.formationLapType}
|
bind:value={editedConfig.formationLapType}
|
||||||
@@ -258,9 +258,7 @@
|
|||||||
class="form form-select"
|
class="form form-select"
|
||||||
>
|
>
|
||||||
<option value={0}>Old Limiter Lap</option>
|
<option value={0}>Old Limiter Lap</option>
|
||||||
<option value={1}
|
<option value={1}>Free (replaces /manual start), only usable for private servers</option>
|
||||||
>Free (replaces /manual start), only usable for private servers</option
|
|
||||||
>
|
|
||||||
<option value={3}>Default formation lap with position control and UI</option>
|
<option value={3}>Default formation lap with position control and UI</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
@@ -268,7 +266,7 @@
|
|||||||
|
|
||||||
<!-- Ignore Premature Disconnects -->
|
<!-- Ignore Premature Disconnects -->
|
||||||
<div>
|
<div>
|
||||||
<label class="block text-sm font-medium text-gray-300 mb-1">
|
<label class="mb-1 block text-sm font-medium text-gray-300">
|
||||||
Ignore Premature Disconnects:
|
Ignore Premature Disconnects:
|
||||||
<select
|
<select
|
||||||
bind:value={editedConfig.ignorePrematureDisconnects}
|
bind:value={editedConfig.ignorePrematureDisconnects}
|
||||||
@@ -282,22 +280,23 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4 border-t border-gray-700">
|
<div class="border-t border-gray-700 pt-4">
|
||||||
<label class="flex items-center">
|
<label class="flex items-center">
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
bind:checked={restart}
|
bind:checked={restart}
|
||||||
class="h-4 w-4 text-green-600 focus:ring-green-500 border-gray-600 rounded bg-gray-700"
|
name="restart"
|
||||||
|
class="h-4 w-4 rounded border-gray-600 bg-gray-700 text-green-600 focus:ring-green-500"
|
||||||
/>
|
/>
|
||||||
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
<span class="ml-2 text-sm text-gray-300">Restart server after saving</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={formLoading}
|
disabled={formLoading}
|
||||||
class="px-4 py-2 bg-green-600 hover:bg-green-700 rounded-md text-sm font-medium"
|
class="rounded-md bg-green-600 px-4 py-2 text-sm font-medium hover:bg-green-700"
|
||||||
>
|
>
|
||||||
Save Changes
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user