Add replay button to navigation menu

This commit updates the colors for IconRewind to currentColor, allowing them to be more easily styled. Additionally, a new replay button has been added to the navigation menu with corresponding tooltip and click functionality that navigates to the player page.

Changes:
- Update color of IconRewind and IconSearch to currentColor
- Add replay button with IconRewind to navigation menu
- Include tooltip label for replay button
- Implement click functionality to navigate to player page
This commit is contained in:
idonahue 2023-05-23 11:38:43 +02:00
parent 2fb8fe3389
commit 7e93fd6a3b
2 changed files with 13 additions and 4 deletions

View File

@ -15,12 +15,12 @@
fill-rule="evenodd"
clip-rule="evenodd"
d="M4.35744 9.90001L8.9 13.6467L8.9 6.15336L4.35744 9.90001ZM2.93534 9.12855C2.45039 9.52854 2.45039 10.2715 2.93534 10.6715L8.76372 15.4786C9.41596 16.0166 10.4 15.5526 10.4 14.7072L10.4 5.09284C10.4 4.24738 9.41595 3.78343 8.76371 4.32139L2.93534 9.12855Z"
fill="#71717A"
fill="currentColor"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12.1633 9.89999L15.7 13.3032L15.7 6.49683L12.1633 9.89999ZM10.7488 9.17942C10.34 9.57282 10.34 10.2272 10.7488 10.6206L15.5066 15.1987C16.1419 15.8101 17.2 15.3598 17.2 14.4782L17.2 5.32182C17.2 4.44016 16.1419 3.98992 15.5066 4.60124L10.7488 9.17942Z"
fill="#71717A"
fill="currentColor"
/>
</svg>

View File

@ -4,7 +4,7 @@
import { Button, Link, Tooltip } from '$lib/components';
import { page } from '$app/stores';
import { goto } from '$app/navigation';
import { IconEmail, IconSearch, IconSettings, IconTerminal } from '$lib/icons';
import { IconEmail, IconRewind, IconSearch, IconSettings, IconTerminal } from '$lib/icons';
import QuickCommitModal from './QuickCommitModal.svelte';
import { onMount } from 'svelte';
import { unsubscribe } from '$lib/utils';
@ -83,7 +83,16 @@
</div>
</div>
<ul class="flex gap-2">
<ul class="app-page-navigation flex gap-2">
<li>
<Tooltip label="Replay">
<Button
on:click={() => goto(`/projects/${$project.id}/player`)}
kind="plain"
icon={IconRewind}
/>
</Tooltip>
</li>
<li>
<Tooltip label="Terminal">
<Button