Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions frontend/css/grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
opacity: 0;
}

/* Do not rely on mouse-over for touchscreens and small screens */
@media (hover: none) or (width <= 767px) {
.remove-row {
opacity: 1;
}
}

.flex-row:hover .remove-row {
opacity: 1;
}
2 changes: 1 addition & 1 deletion frontend/src/entry-forms/EntryMetadata.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
input.value {
flex-grow: 1;
max-width: 15em;
max-width: 458px;
}
@media (width <= 767px) {
Expand Down
83 changes: 44 additions & 39 deletions frontend/src/entry-forms/Posting.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</script>

<div
class="flex-row"
class="indent"
class:drag
{draggable}
onmousemove={mousemove}
Expand All @@ -77,44 +77,46 @@
ondrop={drop}
role="group"
>
<button
type="button"
class="muted round remove-row"
onclick={remove}
tabindex={-1}
>
×
</button>
<AccountInput
className="grow"
bind:value={
() => posting.account,
(account: string) => {
posting = posting.set("account", account);
<div class="flex-row">
<button
type="button"
class="muted round remove-row"
onclick={remove}
tabindex={-1}
>
×
</button>
<AccountInput
className="grow"
bind:value={
() => posting.account,
(account: string) => {
posting = posting.set("account", account);
}
}
}
{suggestions}
{date}
/>
<AutocompleteInput
className="amount"
placeholder={_("Amount")}
suggestions={amountSuggestions}
bind:value={
() => posting.amount,
(amount: string) => {
posting = posting.set("amount", amount);
{suggestions}
{date}
/>
<AutocompleteInput
className="amount"
placeholder={_("Amount")}
suggestions={amountSuggestions}
bind:value={
() => posting.amount,
(amount: string) => {
posting = posting.set("amount", amount);
}
}
}
/>
<AddMetadataButton
bind:meta={
() => posting.meta,
(meta: EntryMetadata) => {
posting = posting.set("meta", meta);
/>
<AddMetadataButton
bind:meta={
() => posting.meta,
(meta: EntryMetadata) => {
posting = posting.set("meta", meta);
}
}
}
/>
/>
</div>
<EntryMetadataSvelte
bind:meta={
() => posting.meta,
Expand All @@ -130,16 +132,19 @@
box-shadow: var(--box-shadow-button);
}

div {
.indent {
padding-left: 50px;
}

[draggable="true"] {
cursor: grab;
}

div > * {
cursor: initial;
}

div:last-child .remove-row {
div:last-child div .remove-row {
visibility: hidden;
}

Expand All @@ -148,7 +153,7 @@
}

@media (width <= 767px) {
div {
.indent {
padding-left: 0;
}
}
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/entry-forms/Transaction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,11 @@

div :global(.payee) {
flex-grow: 1;
flex-basis: 100px;
flex-basis: 10%;
}

div :global(.narration) {
flex-grow: 2;
}

label > span:first-child,
Expand Down
Loading