commit 62897a0a91822fbe47bc2d1c649e7ae729a37d15
parent 0fc8fe45b02017de9c3e0a9ebd4f6f0dbf425f58
Author: triesap <137732411+triesap@users.noreply.github.com>
Date: Thu, 24 Oct 2024 22:22:21 +0000
Edit `/cfg/init` add confirm dialog to skip profile selection.
Diffstat:
5 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/crates/tauri/src/lib.rs b/crates/tauri/src/lib.rs
@@ -46,6 +46,7 @@ pub fn run() {
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_geolocation::init())
.plugin(tauri_plugin_http::init())
+ .plugin(tauri_plugin_map_display::init())
.plugin(tauri_plugin_notification::init())
.plugin(tauri_plugin_os::init())
.plugin(tauri_plugin_shell::init())
diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte
@@ -1,6 +1,6 @@
<script lang="ts">
import { geoc } from "$lib/client";
- import { app_geoc, app_splash } from "@radroots/svelte-lib";
+ import { app_cfg_type, app_geoc, app_splash } from "@radroots/svelte-lib";
import { onMount } from "svelte";
onMount(async () => {
@@ -18,6 +18,10 @@
app_splash.set(false);
}
});
+
+ app_cfg_type.subscribe(async (_app_cfg_type) => {
+ console.log(`_app_cfg_type `, _app_cfg_type);
+ });
</script>
<slot />
diff --git a/src/routes/(app)/+page.svelte b/src/routes/(app)/+page.svelte
@@ -218,9 +218,7 @@
{
icon: `cardholder`,
label: `Wallet`,
- callback: async () => {
- await route(`/models/nostr-profile`);
- },
+ callback: async () => {},
},
{
icon: `squares-four`,
diff --git a/src/routes/(cfg)/cfg/init/+page.svelte b/src/routes/(cfg)/cfg/init/+page.svelte
@@ -17,6 +17,7 @@
carousel_next,
carousel_prev,
DisplayLine,
+ el_id,
EntryLine,
fmt_id,
Glyph,
@@ -1011,9 +1012,17 @@
: `${$t(`common.back`)}`,
callback: async () => {
if ($carousel_index === 0) {
- await dialog.alert(
- `${$t(`app.page.cfg.init.notification.no_profile_name`)}`,
- );
+ const confirm = await dialog.confirm({
+ message: `${$t(`app.page.cfg.init.notification.no_profile_name`)}`,
+ cancel_label: `${$t(`icu.add_*`, { value: `${$t(`common.profile`)}` })}`,
+ ok_label: `${$t(`common.continue`)}`,
+ });
+ if (confirm === false) {
+ el_id(
+ fmt_id(page_param.kv.nostr_profilename),
+ )?.focus();
+ return;
+ }
carousel_next(view);
return;
}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
@@ -3,7 +3,6 @@
import { cfg } from "$lib/conf";
import type { IClientDeviceMetadata } from "@radroots/client";
import {
- app_cfg_type,
app_db,
app_geoc,
app_loading,
@@ -76,10 +75,6 @@
console.log(`(app_geoc) success`);
});
- app_cfg_type.subscribe(async (_app_cfg_type) => {
- console.log(`_app_cfg_type `, _app_cfg_type);
- });
-
app_notify.subscribe(async (_app_notify) => {
if (!_app_notify) {
return;