Skip to content

Commit 7b9dff1

Browse files
committed
Remove icon-crossfade wrapper from save buttons, fix icon sizing
1 parent d31b513 commit 7b9dff1

1 file changed

Lines changed: 3 additions & 34 deletions

File tree

src/routes/+page.svelte

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
22
import { onMount } from 'svelte';
33
import { base } from '$app/paths';
4-
import { fly, fade, scale } from 'svelte/transition';
4+
import { fly, scale } from 'svelte/transition';
55
import { cubicOut } from 'svelte/easing';
66
import FlowCanvas from '$lib/components/FlowCanvas.svelte';
77
import SimulationPanel from '$lib/components/panels/SimulationPanel.svelte';
@@ -1036,35 +1036,15 @@
10361036
use:tooltip={{ text: $currentFileName ? `Save '${$currentFileName}'` : "Save", shortcut: "Ctrl+S" }}
10371037
aria-label="Save"
10381038
>
1039-
<span class="icon-crossfade">
1040-
{#if saveFlash === 'save'}
1041-
<span class="icon-crossfade-item" in:fade={{ duration: 200 }} out:fade={{ duration: 200 }}>
1042-
<Icon name="check" size={16} />
1043-
</span>
1044-
{:else}
1045-
<span class="icon-crossfade-item" in:fade={{ duration: 200 }} out:fade={{ duration: 200 }}>
1046-
<Icon name="upload" size={16} />
1047-
</span>
1048-
{/if}
1049-
</span>
1039+
<Icon name={saveFlash === 'save' ? 'check' : 'upload'} size={16} />
10501040
</button>
10511041
<button
10521042
class="toolbar-btn"
10531043
onclick={() => handleSaveAs()}
10541044
use:tooltip={{ text: "Save As", shortcut: "Ctrl+Shift+S" }}
10551045
aria-label="Save As"
10561046
>
1057-
<span class="icon-crossfade">
1058-
{#if saveFlash === 'save-as'}
1059-
<span class="icon-crossfade-item" in:fade={{ duration: 200 }} out:fade={{ duration: 200 }}>
1060-
<Icon name="check" size={16} />
1061-
</span>
1062-
{:else}
1063-
<span class="icon-crossfade-item" in:fade={{ duration: 200 }} out:fade={{ duration: 200 }}>
1064-
<Icon name="upload-plus" size={16} />
1065-
</span>
1066-
{/if}
1067-
</span>
1047+
<Icon name={saveFlash === 'save-as' ? 'check' : 'upload-plus'} size={16} />
10681048
</button>
10691049
<button class="toolbar-btn" onclick={() => exportDialogOpen = true} use:tooltip={{ text: "Python Code", shortcut: "Ctrl+E" }} aria-label="View Python Code">
10701050
<Icon name="braces" size={16} />
@@ -1467,17 +1447,6 @@
14671447
pointer-events: none;
14681448
}
14691449
1470-
.icon-crossfade {
1471-
position: relative;
1472-
display: grid;
1473-
place-items: center;
1474-
}
1475-
1476-
.icon-crossfade-item {
1477-
grid-area: 1 / 1;
1478-
display: flex;
1479-
}
1480-
14811450
/* Logo overlay */
14821451
.logo-overlay {
14831452
position: fixed;

0 commit comments

Comments
 (0)