mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-10-03 13:04:32 +02:00
add function syntax to sveltestrap onclick events and others
- fixes event_handler_invalid svelte warning and blockage
This commit is contained in:
@@ -114,13 +114,13 @@
|
||||
class="btn btn-primary"
|
||||
type="button"
|
||||
id="add-project-button"
|
||||
on:click|preventDefault={handleAddProject}>Add</button
|
||||
on:click|preventDefault={() => handleAddProject}>Add</button
|
||||
>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
type="button"
|
||||
id="remove-project-button"
|
||||
on:click|preventDefault={handleRemoveProject}>Remove</button
|
||||
on:click|preventDefault={() => handleRemoveProject}>Remove</button
|
||||
>
|
||||
</div>
|
||||
<p>
|
||||
|
@@ -119,13 +119,13 @@
|
||||
class="btn btn-primary"
|
||||
type="button"
|
||||
id="add-role-button"
|
||||
on:click|preventDefault={handleAddRole}>Add</button
|
||||
on:click|preventDefault={() => handleAddRole}>Add</button
|
||||
>
|
||||
<button
|
||||
class="btn btn-danger"
|
||||
type="button"
|
||||
id="remove-role-button"
|
||||
on:click|preventDefault={handleRemoveRole}>Remove</button
|
||||
on:click|preventDefault={() =>handleRemoveRole}>Remove</button
|
||||
>
|
||||
</div>
|
||||
<p>
|
||||
|
@@ -63,7 +63,7 @@
|
||||
class="btn btn-primary"
|
||||
type="button"
|
||||
id="edit-notice-button"
|
||||
on:click|preventDefault={handleEditNotice}>Edit Notice</button
|
||||
on:click|preventDefault={() => handleEditNotice}>Edit Notice</button
|
||||
>
|
||||
</div>
|
||||
<p>
|
||||
|
@@ -33,7 +33,7 @@
|
||||
type="checkbox"
|
||||
id="scramble-names-checkbox"
|
||||
style="margin-right: 1em;"
|
||||
on:click={handleScramble}
|
||||
on:click={() => handleScramble}
|
||||
bind:checked={scrambled}
|
||||
/>
|
||||
Active?
|
||||
|
@@ -53,7 +53,7 @@
|
||||
<Button
|
||||
color="secondary"
|
||||
size="sm"
|
||||
on:click={reloadUserList}
|
||||
on:click={() => reloadUserList}
|
||||
style="float: right;">Reload</Button
|
||||
>
|
||||
</p>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td
|
||||
><button
|
||||
class="btn btn-danger del-user"
|
||||
on:click={deleteUser(user.username)}>Delete</button
|
||||
on:click={() => deleteUser(user.username)}>Delete</button
|
||||
></td
|
||||
>
|
||||
</tr>
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<td><code>{user?.roles ? user.roles.join(", ") : "No Roles"}</code></td>
|
||||
<td>
|
||||
{#if !jwt}
|
||||
<Button color="success" on:click={getUserJwt(user.username)}
|
||||
<Button color="success" on:click={() => getUserJwt(user.username)}
|
||||
>Gen. JWT</Button
|
||||
>
|
||||
{:else}
|
||||
|
@@ -137,7 +137,7 @@
|
||||
<CardBody>
|
||||
<CardTitle>Generate JWT</CardTitle>
|
||||
{#if jwt}
|
||||
<Button color="secondary" on:click={clipJwt()}>
|
||||
<Button color="secondary" on:click={() => clipJwt()}>
|
||||
Copy JWT to Clipboard
|
||||
</Button>
|
||||
<p class="mt-2">
|
||||
@@ -149,7 +149,7 @@
|
||||
</p>
|
||||
{/if}
|
||||
{:else}
|
||||
<Button color="success" on:click={getUserJwt(username)}>
|
||||
<Button color="success" on:click={() => getUserJwt(username)}>
|
||||
Generate JWT for '{username}'
|
||||
</Button>
|
||||
<p class="mt-2">
|
||||
|
Reference in New Issue
Block a user