Merge pull request #1248 from ankitects/revert-on-right

Move deck options revert button to right; hide when inactive
This commit is contained in:
Damien Elmes 2021-06-24 13:01:57 +10:00 committed by GitHub
commit 1c0e0853b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

@ -20,10 +20,10 @@
<Row>
<Col size={7}>
<RevertButton bind:value {defaultValue} />
<TooltipLabel {markdownTooltip}><slot /></TooltipLabel>
</Col>
<Col {breakpoint} size={5}>
<EnumSelector bind:value {choices} />
<RevertButton bind:value {defaultValue} />
</Col>
</Row>

View File

@ -32,7 +32,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
let modified: boolean;
$: modified = !isEqual(value, defaultValue);
$: className = !modified ? "opacity-25" : "";
$: className = !modified ? "opacity-0" : "";
const isTouchDevice = getContext<boolean>(touchDeviceKey);

View File

@ -18,10 +18,10 @@
<Row>
<Col size={7}>
<RevertButton bind:value {defaultValue} />
<TooltipLabel {markdownTooltip}><slot /></TooltipLabel>
</Col>
<Col size={5}>
<SpinBoxFloat bind:value {min} {max} />
<RevertButton bind:value {defaultValue} />
</Col>
</Row>

View File

@ -18,10 +18,10 @@
<Row>
<Col size={7}>
<RevertButton bind:value {defaultValue} />
<TooltipLabel {markdownTooltip}><slot /></TooltipLabel>
</Col>
<Col size={5}>
<SpinBox bind:value {min} {max} />
<RevertButton bind:value {defaultValue} />
</Col>
</Row>

View File

@ -16,10 +16,10 @@
<Row>
<Col size={7}>
<RevertButton bind:value {defaultValue} />
<TooltipLabel {markdownTooltip}><slot /></TooltipLabel>
</Col>
<Col size={5}>
<StepsInput bind:value />
<RevertButton bind:value {defaultValue} />
</Col>
</Row>

View File

@ -19,12 +19,12 @@
<Row>
<Col>
<RevertButton bind:value {defaultValue} />
{#if markdownTooltip}<TooltipLabel for={id} {markdownTooltip}
><slot /></TooltipLabel
>{:else}<Label for={id}><slot /></Label>{/if}
</Col>
<Col grow={false}>
<Switch {id} bind:value />
<RevertButton bind:value {defaultValue} />
</Col>
</Row>