bindable restart input
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
const { config, id }: { config: AssistRules; id: string } = $props();
|
const { config, id }: { config: AssistRules; id: string } = $props();
|
||||||
const editedConfig = $state({ ...config });
|
const editedConfig = $state({ ...config });
|
||||||
let formLoading = $state(false);
|
let formLoading = $state(false);
|
||||||
|
let restart = $state(true);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form
|
<form
|
||||||
@@ -193,7 +194,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="restart"
|
id="restart"
|
||||||
name="restart"
|
name="restart"
|
||||||
checked
|
bind:checked={restart}
|
||||||
/></label
|
/></label
|
||||||
>
|
>
|
||||||
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
const { config, id }: { config: Configuration; id: string } = $props();
|
const { config, id }: { config: Configuration; id: string } = $props();
|
||||||
const editedConfig = $state({ ...config });
|
const editedConfig = $state({ ...config });
|
||||||
let formLoading = $state(false);
|
let formLoading = $state(false);
|
||||||
|
let restart = $state(true);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form
|
<form
|
||||||
@@ -113,7 +114,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="restart"
|
id="restart"
|
||||||
name="restart"
|
name="restart"
|
||||||
checked
|
bind:checked={restart}
|
||||||
/></label
|
/></label
|
||||||
>
|
>
|
||||||
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
const editedConfig = $state({ ...config });
|
const editedConfig = $state({ ...config });
|
||||||
if (!editedConfig.sessions) editedConfig.sessions = [];
|
if (!editedConfig.sessions) editedConfig.sessions = [];
|
||||||
let formLoading = $state(false);
|
let formLoading = $state(false);
|
||||||
|
let restart = $state(true);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form
|
<form
|
||||||
@@ -339,7 +340,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="restart"
|
id="restart"
|
||||||
name="restart"
|
name="restart"
|
||||||
checked
|
bind:checked={restart}
|
||||||
/></label
|
/></label
|
||||||
>
|
>
|
||||||
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
const { config, id }: { config: EventRules; id: string } = $props();
|
const { config, id }: { config: EventRules; id: string } = $props();
|
||||||
const editedConfig = $state({ ...config });
|
const editedConfig = $state({ ...config });
|
||||||
let formLoading = $state(false);
|
let formLoading = $state(false);
|
||||||
|
let restart = $state(true);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<form
|
<form
|
||||||
@@ -229,7 +230,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="restart"
|
id="restart"
|
||||||
name="restart"
|
name="restart"
|
||||||
checked
|
bind:checked={restart}
|
||||||
/></label
|
/></label
|
||||||
>
|
>
|
||||||
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
const { config, id }: { config: ServerSettings; id: string } = $props();
|
const { config, id }: { config: ServerSettings; id: string } = $props();
|
||||||
const editedConfig = $state({ ...config });
|
const editedConfig = $state({ ...config });
|
||||||
let formLoading = $state(false);
|
let formLoading = $state(false);
|
||||||
|
let restart = $state(true);
|
||||||
const carGroups = ['FreeForAll', 'GT3', 'GT4', 'GT2', 'GTC', 'TCX'];
|
const carGroups = ['FreeForAll', 'GT3', 'GT4', 'GT2', 'GTC', 'TCX'];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -342,7 +343,7 @@
|
|||||||
type="checkbox"
|
type="checkbox"
|
||||||
id="restart"
|
id="restart"
|
||||||
name="restart"
|
name="restart"
|
||||||
checked
|
bind:checked={restart}
|
||||||
/></label
|
/></label
|
||||||
>
|
>
|
||||||
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
<button disabled={formLoading} type="submit" class="btn btn-blue">Save</button>
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ async function destructureFormData(
|
|||||||
const formData = await event.request.formData();
|
const formData = await event.request.formData();
|
||||||
const id = formData.get('id') as string;
|
const id = formData.get('id') as string;
|
||||||
const restart = formData.get('restart') as string;
|
const restart = formData.get('restart') as string;
|
||||||
|
console.log(restart);
|
||||||
const file = formData.get('file') as configFile;
|
const file = formData.get('file') as configFile;
|
||||||
const object: any = {};
|
const object: any = {};
|
||||||
formData.forEach((value, key) => {
|
formData.forEach((value, key) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user