UI & windo config adjustments
This commit is contained in:
@@ -22,6 +22,7 @@ pub fn open_app_menu_window() {
|
|||||||
.title("Friendolls")
|
.title("Friendolls")
|
||||||
.inner_size(400.0, 550.0)
|
.inner_size(400.0, 550.0)
|
||||||
.resizable(true)
|
.resizable(true)
|
||||||
|
.maximizable(false)
|
||||||
.decorations(true)
|
.decorations(true)
|
||||||
.transparent(false)
|
.transparent(false)
|
||||||
.shadow(true)
|
.shadow(true)
|
||||||
|
|||||||
@@ -187,8 +187,10 @@ fn open_config_manager_window_inner(
|
|||||||
CLIENT_CONFIG_MANAGER_WINDOW_LABEL,
|
CLIENT_CONFIG_MANAGER_WINDOW_LABEL,
|
||||||
tauri::WebviewUrl::App("/client-config-manager".into()),
|
tauri::WebviewUrl::App("/client-config-manager".into()),
|
||||||
)
|
)
|
||||||
.title("Friendolls Client Config Manager")
|
.title("Advanced Configuration")
|
||||||
.inner_size(600.0, 500.0)
|
.inner_size(300.0, 420.0)
|
||||||
|
.resizable(false)
|
||||||
|
.maximizable(false)
|
||||||
.visible(false)
|
.visible(false)
|
||||||
.build()
|
.build()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
|
|||||||
.title("Doll Editor")
|
.title("Doll Editor")
|
||||||
.inner_size(300.0, 400.0)
|
.inner_size(300.0, 400.0)
|
||||||
.resizable(false)
|
.resizable(false)
|
||||||
|
.maximizable(false)
|
||||||
.decorations(true)
|
.decorations(true)
|
||||||
.transparent(false)
|
.transparent(false)
|
||||||
.shadow(true)
|
.shadow(true)
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ pub fn open_welcome_window() {
|
|||||||
.title("Welcome to Friendolls")
|
.title("Welcome to Friendolls")
|
||||||
.inner_size(420.0, 420.0)
|
.inner_size(420.0, 420.0)
|
||||||
.resizable(false)
|
.resizable(false)
|
||||||
|
.maximizable(false)
|
||||||
.decorations(true)
|
.decorations(true)
|
||||||
.transparent(false)
|
.transparent(false)
|
||||||
.shadow(true)
|
.shadow(true)
|
||||||
|
|||||||
@@ -104,12 +104,16 @@
|
|||||||
<button class="btn btn-sm mt-4" on:click={handleCancel}>Close</button>
|
<button class="btn btn-sm mt-4" on:click={handleCancel}>Close</button>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{: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">
|
<div class="form-control w-full">
|
||||||
<label class="label">
|
<label class="label" for="name-input">
|
||||||
<span class="label-text">Name</span>
|
<span class="label-text">Name</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
id="name-input"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Doll Name"
|
placeholder="Doll Name"
|
||||||
class="input input-bordered w-full"
|
class="input input-bordered w-full"
|
||||||
@@ -117,17 +121,15 @@
|
|||||||
disabled={saving}
|
disabled={saving}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center mt-4">
|
<div class="form-control w-full">
|
||||||
<DollPreview {bodyColor} {outlineColor} />
|
<label class="label" for="body-color-input">
|
||||||
</div>
|
|
||||||
<div class="form-control w-full mt-2">
|
|
||||||
<label class="label">
|
|
||||||
<span class="label-text">Body Color</span>
|
<span class="label-text">Body Color</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<input
|
<input
|
||||||
|
id="body-color-input"
|
||||||
type="color"
|
type="color"
|
||||||
class="input input-bordered w-12 p-1 h-10"
|
class="input input-bordered w-10 p-0"
|
||||||
bind:value={bodyColor}
|
bind:value={bodyColor}
|
||||||
disabled={saving}
|
disabled={saving}
|
||||||
/>
|
/>
|
||||||
@@ -139,14 +141,15 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-control w-full mt-2">
|
<div class="form-control w-full">
|
||||||
<label class="label">
|
<label class="label" for="outline-color-input">
|
||||||
<span class="label-text">Outline Color</span>
|
<span class="label-text">Outline Color</span>
|
||||||
</label>
|
</label>
|
||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<input
|
<input
|
||||||
|
id="outline-color-input"
|
||||||
type="color"
|
type="color"
|
||||||
class="input input-bordered w-12 p-1 h-10"
|
class="input input-bordered w-10 p-0"
|
||||||
bind:value={outlineColor}
|
bind:value={outlineColor}
|
||||||
disabled={saving}
|
disabled={saving}
|
||||||
/>
|
/>
|
||||||
@@ -158,8 +161,10 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-auto pt-4 flex justify-end gap-2">
|
<div class="mt-auto flex justify-end gap-2">
|
||||||
<button class="btn" on:click={handleCancel} disabled={saving}>Cancel</button>
|
<button class="btn" on:click={handleCancel} disabled={saving}
|
||||||
|
>Cancel</button
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
on:click={handleSave}
|
on:click={handleSave}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
const parsed = new URL(
|
const parsed = new URL(
|
||||||
form.api_base_url.trim().startsWith("http")
|
form.api_base_url.trim().startsWith("http")
|
||||||
? form.api_base_url.trim()
|
? form.api_base_url.trim()
|
||||||
: `https://${form.api_base_url.trim()}`
|
: `https://${form.api_base_url.trim()}`,
|
||||||
);
|
);
|
||||||
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
||||||
return "API base URL must start with http or 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) {
|
} catch (err) {
|
||||||
errorMessage = `Failed to save config: ${err}`;
|
errorMessage = `Failed to save config: ${err}`;
|
||||||
} finally {
|
} finally {
|
||||||
@@ -113,7 +113,8 @@
|
|||||||
onMount(loadConfig);
|
onMount(loadConfig);
|
||||||
</script>
|
</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">
|
<div class="flex flex-col gap-1">
|
||||||
<p class="text-xl font-semibold">Client Configuration</p>
|
<p class="text-xl font-semibold">Client Configuration</p>
|
||||||
<p class="opacity-70 text-sm">Set custom API and auth endpoints.</p>
|
<p class="opacity-70 text-sm">Set custom API and auth endpoints.</p>
|
||||||
@@ -147,8 +148,10 @@
|
|||||||
{#if restartError}
|
{#if restartError}
|
||||||
<p class="text-sm text-error">{restartError}</p>
|
<p class="text-sm text-error">{restartError}</p>
|
||||||
{/if}
|
{/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
|
<button
|
||||||
class="btn"
|
class="btn"
|
||||||
class:btn-disabled={saving}
|
class:btn-disabled={saving}
|
||||||
@@ -157,9 +160,5 @@
|
|||||||
>
|
>
|
||||||
{saving ? "Saving..." : "Save"}
|
{saving ? "Saving..." : "Save"}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline" on:click={restart}>
|
|
||||||
Restart app
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -27,11 +27,13 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</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-row gap-2 justify-between size-full p-6">
|
||||||
<div class="flex flex-col justify-between">
|
<div class="flex flex-col justify-between">
|
||||||
<div class="flex flex-col gap-2 h-full pt-4">
|
<div class="flex flex-col gap-2 h-full">
|
||||||
<div class="flex flex-col gap-8 mb-18">
|
<div class="flex flex-col gap-6">
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
<div class="flex flex-row gap-2">
|
<div class="flex flex-row gap-2">
|
||||||
<p class="text-xl font-light">meow? nyaaa!!</p>
|
<p class="text-xl font-light">meow? nyaaa!!</p>
|
||||||
@@ -40,9 +42,9 @@
|
|||||||
a cute passive socialization layer!
|
a cute passive socialization layer!
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-4 *:w-max">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary"
|
class="btn btn-primary btn-xl"
|
||||||
onclick={handleContinue}
|
onclick={handleContinue}
|
||||||
disabled={isContinuing}
|
disabled={isContinuing}
|
||||||
>
|
>
|
||||||
@@ -52,10 +54,13 @@
|
|||||||
<div class="scale-70">
|
<div class="scale-70">
|
||||||
<ExternalLink />
|
<ExternalLink />
|
||||||
</div>
|
</div>
|
||||||
Sign in with browser
|
Sign in
|
||||||
{/if}
|
{/if}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline" onclick={openClientConfigManager}>
|
<button
|
||||||
|
class="btn btn-link p-0 btn-sm text-base-content"
|
||||||
|
onclick={openClientConfigManager}
|
||||||
|
>
|
||||||
Advanced options
|
Advanced options
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,7 +75,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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></div>
|
||||||
<div class="flex flex-col scale-200 origin-bottom-right">
|
<div class="flex flex-col scale-200 origin-bottom-right">
|
||||||
<DollPreview bodyColor="b7f2ff" outlineColor="496065" />
|
<DollPreview bodyColor="b7f2ff" outlineColor="496065" />
|
||||||
|
|||||||
Reference in New Issue
Block a user