Compare commits
No commits in common. "e9cf2bc8498fc02332059880d7a6994348165b76" and "a953349c1478b912e08f88c1fb70c74af0bc9bbb" have entirely different histories.
e9cf2bc849
...
a953349c14
@ -99,18 +99,8 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
{#if editTracks.findIndex((tr) => tr.id === t.id) !== -1}
|
||||
<input
|
||||
class="shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-0.5"
|
||||
type="text"
|
||||
value={t.name}
|
||||
on:input={(e) => {
|
||||
const i = editTracks.findIndex(
|
||||
(tr) => tr.id === t.id
|
||||
);
|
||||
editTracks[i].name = e.target.value;
|
||||
}}
|
||||
/>
|
||||
{#if editTracks.includes(t.id)}
|
||||
<input class="shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-0.5" type="text" value={t.name} />
|
||||
{:else}
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{t.name}
|
||||
@ -122,46 +112,18 @@
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
{#if editTracks.findIndex((tr) => tr.id === t.id) !== -1}
|
||||
<input
|
||||
class="shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-0.5"
|
||||
type="number"
|
||||
value={t.distance}
|
||||
on:input={(e) => {
|
||||
const i = editTracks.findIndex(
|
||||
(tr) => tr.id === t.id
|
||||
);
|
||||
editTracks[i].distance = parseInt(e.target.value);
|
||||
}}
|
||||
/>
|
||||
{:else}
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{t.distance}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap">
|
||||
<div class="flex items-center">
|
||||
<div class="ml-4">
|
||||
{#if editTracks.findIndex((tr) => tr.id === t.id) !== -1}
|
||||
<input
|
||||
class="shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-0.5"
|
||||
type="number"
|
||||
value={t.minimumLapTime}
|
||||
on:input={(e) => {
|
||||
const i = editTracks.findIndex(
|
||||
(tr) => tr.id === t.id
|
||||
);
|
||||
editTracks[i].minimumLapTime = parseInt(e.target.value);
|
||||
}}
|
||||
/>
|
||||
{:else}
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{t.minimumLapTime}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -193,7 +155,7 @@
|
||||
class="ml-4 text-red-600 hover:text-red-900 cursor-pointer"
|
||||
>{$_("confirm-delete")}</button
|
||||
>
|
||||
{:else if editTracks.findIndex((tr) => tr.id === t.id) !== -1}
|
||||
{:else if editTracks.findIndex((tr)=>tr.id === t.id) !== -1}
|
||||
<button
|
||||
tabindex="0"
|
||||
on:click={() => {
|
||||
@ -207,23 +169,7 @@
|
||||
<button
|
||||
tabindex="0"
|
||||
on:click={async () => {
|
||||
toast.loading($_("track-is-being-updated"));
|
||||
const i = editTracks.findIndex(
|
||||
(tr) => tr.id === t.id
|
||||
);
|
||||
const res = await TrackService.trackControllerPut(
|
||||
t.id,
|
||||
editTracks[i]
|
||||
);
|
||||
tracksstore.set(
|
||||
$tracksstore.filter((tr) => tr.id !== t.id)
|
||||
);
|
||||
$tracksstore.push(res)
|
||||
editTracks = editTracks.filter((tr) => {
|
||||
tr.id !== t.id;
|
||||
});
|
||||
toast.dismiss();
|
||||
toast.success($_("track-updated"));
|
||||
console.log("TODO:");
|
||||
}}
|
||||
class="ml-4 text-green-600 hover:text-green-900 cursor-pointer"
|
||||
>{$_("save")}</button
|
||||
|
1014
src/locales/de.json
1014
src/locales/de.json
File diff suppressed because it is too large
Load Diff
1014
src/locales/en.json
1014
src/locales/en.json
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user