Skip to content

Commit

Permalink
chore: use empty instead of self-closing tags
Browse files Browse the repository at this point in the history
will be a warning in Svelte 5
  • Loading branch information
yagebu committed Oct 29, 2024
1 parent 5890487 commit 3a0900c
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions frontend/src/charts/Chart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
active={treemapCurrency}
/>
{/if}
<span class="spacer" />
<span class="spacer"></span>
{#if chart.type === "hierarchy"}
<ModeSwitch store={hierarchyChartMode} />
{:else if chart.type === "linechart"}
<ModeSwitch store={lineChartMode} />
{:else if chart.type === "barchart" && chart.hasStackedData}
<ModeSwitch store={barChartMode} />
{/if}
{:else}<span class="spacer" />{/if}
{:else}<span class="spacer"></span>{/if}
<slot />
<button
type="button"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/charts/ChartLegend.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}}
class:inactive={active ? item !== $active : $toggled?.includes(item)}
>
<i style="background-color: {color ?? '#bbb'}" />
<i style="background-color: {color ?? '#bbb'}"></i>
<span>{item}</span>
</button>
{/each}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/editor/DocumentPreviewEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
</script>

<div use:renderEditor />
<div use:renderEditor></div>

<style>
div {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/editor/SliceEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
</script>

<form on:submit|preventDefault={save}>
<div class="editor" use:renderEditor />
<div class="editor" use:renderEditor></div>
<div class="flex-row">
<span class="spacer" />
<span class="spacer"></span>
<label>
<input type="checkbox" bind:checked={$reloadAfterSavingEntrySlice} />
<span>{_("reload")}</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/entry-forms/Note.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/>
<AddMetadataButton bind:meta={entry.meta} />
</div>
<textarea name="comment" rows={2} bind:value={entry.comment} />
<textarea name="comment" rows={2} bind:value={entry.comment}></textarea>
<EntryMetadata bind:meta={entry.meta} />
</div>

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modals/AddEntry.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</h3>
<Entry bind:entry />
<div class="flex-row">
<span class="spacer" />
<span class="spacer"></span>
<label>
<input type="checkbox" bind:checked={$addEntryContinue} />
<span>{_("continue")}</span>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modals/ModalBase.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

{#if shown}
<div class="overlay">
<div class="background" on:click={closeHandler} aria-hidden="true" />
<div class="background" on:click={closeHandler} aria-hidden="true"></div>
<div class="content" use:handleFocus role="dialog" aria-modal="true">
<slot />
<button type="button" class="muted close" on:click={closeHandler}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/reports/documents/DocumentPreview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
</script>

{#if extension === "pdf"}
<object title={filename} data={url} />
<object title={filename} data={url}></object>
{:else if plainTextExtensions.includes(extension)}
<DocumentPreviewEditor {url} />
{:else if imageExtensions.includes(extension)}
<img src={url} alt={filename} />
{:else if ["html", "htm"].includes(extension)}
<iframe src={url} title={filename} sandbox="" />
<iframe src={url} title={filename} sandbox=""></iframe>
{:else}
Preview for file `{filename}` with file type `{extension}` is not implemented
{/if}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/reports/editor/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<EditorMenu {file_path} {editor}>
<SaveButton {changed} {saving} />
</EditorMenu>
<div use:renderEditor />
<div use:renderEditor></div>
</form>

<style>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/reports/errors/Errors.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<a class="source" href={url} {title}>{source.lineno}</a>
</td>
{:else}
<td />
<td class="num" />
<td></td>
<td class="num"></td>
{/if}
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
<td class="pre">{@html addAccountLinks(message)}</td>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/reports/import/Extract.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
({entries.length - duplicates}
to import):
</h3>
<span class="spacer" />
<span class="spacer"></span>
<label class="button muted">
<input
type="checkbox"
Expand Down Expand Up @@ -79,7 +79,7 @@
{_("Previous")}
</button>
{/if}
<span class="spacer" />
<span class="spacer"></span>
{#if currentIndex < entries.length - 1}
<button type="submit">{_("Next")}</button>
<button
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/reports/query/QueryBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<details bind:open>
<summary class:inactive on:click={inactive ? onselect : null}>
<ReadonlyQueryEditor value={query} error={result?.is_err} />
<span class="spacer" />
<span class="spacer"></span>
{#if result && result.is_ok && result.value.t === "table"}
<QueryLinks {query} />
{/if}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/reports/query/QueryEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</script>

<form on:submit|preventDefault={submit}>
<div use:renderEditor />
<div use:renderEditor></div>
<button type="submit" use:keyboardShortcut={"Control+Enter"}>
{_("Submit")}
</button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/reports/query/ReadonlyQueryEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
const { renderEditor } = initReadonlyQueryEditor(value);
</script>

<pre class:error use:renderEditor />
<pre class:error use:renderEditor></pre>

<style>
.error {
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/sidebar/AccountIndicator.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class="status-indicator status-green"
class:small
title="The last entry is a passing balance check."
/>
></span>
{:else}
<copyable-text
class="status-indicator status-{status}"
Expand All @@ -39,14 +39,14 @@ Click to copy the balance directives to the clipboard:
${balance}`}
data-clipboard-text={balance}
/>
></copyable-text>
{/if}
{#if last_account_activity > $fava_options.uptodate_indicator_grey_lookback_days}
<span
class="status-indicator status-gray"
class:small
title="This account has not been updated in a while. ({last_account_activity} days ago)"
/>
></span>
{/if}
{/if}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/sidebar/FilterForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
on:select={submit}
on:enter={submit}
/>
<button type="submit" />
<button type="submit"></button>
</form>

<style>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/sidebar/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
>
&#8635;
</button>
<span class="spacer" />
<span class="spacer"></span>
<FilterForm />
</header>

Expand Down

0 comments on commit 3a0900c

Please sign in to comment.