UI & windo config adjustments

This commit is contained in:
2026-01-13 15:58:52 +08:00
parent 354e362ac3
commit 08b4bc4ca3
7 changed files with 94 additions and 78 deletions

View File

@@ -22,6 +22,7 @@ pub fn open_app_menu_window() {
.title("Friendolls")
.inner_size(400.0, 550.0)
.resizable(true)
.maximizable(false)
.decorations(true)
.transparent(false)
.shadow(true)

View File

@@ -187,8 +187,10 @@ fn open_config_manager_window_inner(
CLIENT_CONFIG_MANAGER_WINDOW_LABEL,
tauri::WebviewUrl::App("/client-config-manager".into()),
)
.title("Friendolls Client Config Manager")
.inner_size(600.0, 500.0)
.title("Advanced Configuration")
.inner_size(300.0, 420.0)
.resizable(false)
.maximizable(false)
.visible(false)
.build()
{

View File

@@ -109,6 +109,7 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
.title("Doll Editor")
.inner_size(300.0, 400.0)
.resizable(false)
.maximizable(false)
.decorations(true)
.transparent(false)
.shadow(true)

View File

@@ -32,6 +32,7 @@ pub fn open_welcome_window() {
.title("Welcome to Friendolls")
.inner_size(420.0, 420.0)
.resizable(false)
.maximizable(false)
.decorations(true)
.transparent(false)
.shadow(true)

View File

@@ -104,12 +104,16 @@
<button class="btn btn-sm mt-4" on:click={handleCancel}>Close</button>
</div>
{:else}
<div class="h-full w-full p-4 flex flex-col">
<div class="h-full w-full p-4 gap-4 flex flex-col">
<div class="flex justify-center mt-4">
<DollPreview {bodyColor} {outlineColor} />
</div>
<div class="form-control w-full">
<label class="label">
<label class="label" for="name-input">
<span class="label-text">Name</span>
</label>
<input
id="name-input"
type="text"
placeholder="Doll Name"
class="input input-bordered w-full"
@@ -117,17 +121,15 @@
disabled={saving}
/>
</div>
<div class="flex justify-center mt-4">
<DollPreview {bodyColor} {outlineColor} />
</div>
<div class="form-control w-full mt-2">
<label class="label">
<div class="form-control w-full">
<label class="label" for="body-color-input">
<span class="label-text">Body Color</span>
</label>
<div class="flex gap-2">
<input
id="body-color-input"
type="color"
class="input input-bordered w-12 p-1 h-10"
class="input input-bordered w-10 p-0"
bind:value={bodyColor}
disabled={saving}
/>
@@ -139,14 +141,15 @@
/>
</div>
</div>
<div class="form-control w-full mt-2">
<label class="label">
<div class="form-control w-full">
<label class="label" for="outline-color-input">
<span class="label-text">Outline Color</span>
</label>
<div class="flex gap-2">
<input
id="outline-color-input"
type="color"
class="input input-bordered w-12 p-1 h-10"
class="input input-bordered w-10 p-0"
bind:value={outlineColor}
disabled={saving}
/>
@@ -158,8 +161,10 @@
/>
</div>
</div>
<div class="mt-auto pt-4 flex justify-end gap-2">
<button class="btn" on:click={handleCancel} disabled={saving}>Cancel</button>
<div class="mt-auto flex justify-end gap-2">
<button class="btn" on:click={handleCancel} disabled={saving}
>Cancel</button
>
<button
class="btn btn-primary"
on:click={handleSave}

View File

@@ -60,7 +60,7 @@
const parsed = new URL(
form.api_base_url.trim().startsWith("http")
? form.api_base_url.trim()
: `https://${form.api_base_url.trim()}`
: `https://${form.api_base_url.trim()}`,
);
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
return "API base URL must start with http or https";
@@ -93,7 +93,7 @@
},
});
successMessage = "Configuration saved. Restart to apply changes.";
successMessage = "Success. Restart to apply changes.";
} catch (err) {
errorMessage = `Failed to save config: ${err}`;
} finally {
@@ -113,7 +113,8 @@
onMount(loadConfig);
</script>
<div class="p-6 flex flex-col gap-4">
<div class="p-6 flex flex-col gap-4 w-full h-full justify-between">
<div class="flex flex-col gap-4 w-full">
<div class="flex flex-col gap-1">
<p class="text-xl font-semibold">Client Configuration</p>
<p class="opacity-70 text-sm">Set custom API and auth endpoints.</p>
@@ -147,8 +148,10 @@
{#if restartError}
<p class="text-sm text-error">{restartError}</p>
{/if}
</div>
<div class="flex flex-row gap-2">
<div class="flex flex-row gap-2 w-full justify-end">
<button class="btn btn-outline" on:click={restart}> Restart app </button>
<button
class="btn"
class:btn-disabled={saving}
@@ -157,9 +160,5 @@
>
{saving ? "Saving..." : "Save"}
</button>
<button class="btn btn-outline" on:click={restart}>
Restart app
</button>
</div>
</div>

View File

@@ -27,11 +27,13 @@
};
</script>
<div class="size-full relative bg-linear-to-br from-base-100 to-[#b7f2ff77]">
<div
class="size-full max-w-full max-h-full overflow-hidden relative bg-linear-to-br from-base-100 to-[#b7f2ff77]"
>
<div class="flex flex-row gap-2 justify-between size-full p-6">
<div class="flex flex-col justify-between">
<div class="flex flex-col gap-2 h-full pt-4">
<div class="flex flex-col gap-8 mb-18">
<div class="flex flex-col gap-2 h-full">
<div class="flex flex-col gap-6">
<div class="flex flex-col gap-2">
<div class="flex flex-row gap-2">
<p class="text-xl font-light">meow? nyaaa!!</p>
@@ -40,9 +42,9 @@
a cute passive socialization layer!
</p>
</div>
<div class="flex flex-col gap-2">
<div class="flex flex-col gap-4 *:w-max">
<button
class="btn btn-primary"
class="btn btn-primary btn-xl"
onclick={handleContinue}
disabled={isContinuing}
>
@@ -52,10 +54,13 @@
<div class="scale-70">
<ExternalLink />
</div>
Sign in with browser
Sign in
{/if}
</button>
<button class="btn btn-outline" onclick={openClientConfigManager}>
<button
class="btn btn-link p-0 btn-sm text-base-content"
onclick={openClientConfigManager}
>
Advanced options
</button>
</div>
@@ -70,7 +75,9 @@
</div>
</div>
</div>
<div class="absolute bottom-6 right-6 flex flex-col gap-1 justify-between">
<div
class="absolute pointer-events-none bottom-6 right-6 flex flex-col gap-1 justify-between"
>
<div></div>
<div class="flex flex-col scale-200 origin-bottom-right">
<DollPreview bodyColor="b7f2ff" outlineColor="496065" />