feat: 添加返回启动页面功能,支持用户快速返回
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { afterNavigate, goto } from '$app/navigation';
|
||||
import Close from '$lib/components/icons/Close.svelte';
|
||||
import { openedDatasetDir } from '$lib/stores/dataset';
|
||||
import { currentActivate } from '$lib/stores/navigate';
|
||||
import type { DatasetMeta } from '$lib/types/meta';
|
||||
@@ -15,6 +16,10 @@ afterNavigate(() => {
|
||||
let storePath = $state('');
|
||||
let datasetName = $state('');
|
||||
|
||||
async function backToBoot() {
|
||||
await goto('/boot');
|
||||
}
|
||||
|
||||
async function selectStorePath() {
|
||||
try {
|
||||
const selectResult = await open({
|
||||
@@ -85,6 +90,14 @@ async function createDataset() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<button
|
||||
class="btn btn-circle btn-error btn-sm fixed top-12 right-6 z-10"
|
||||
title="Back to boot"
|
||||
aria-label="Back to boot"
|
||||
onclick={backToBoot}>
|
||||
<Close width="24" />
|
||||
</button>
|
||||
|
||||
<main class="flex flex-col gap-2 p-4 self-center">
|
||||
<h2>Create new dataset</h2>
|
||||
<div class="join">
|
||||
|
||||
Reference in New Issue
Block a user