diff --git a/src/app.html b/src/app.html index 3581800e5..9f52797f1 100644 --- a/src/app.html +++ b/src/app.html @@ -7,7 +7,7 @@ %sveltekit.body% diff --git a/src/app.postcss b/src/app.postcss index 89c9b2cb2..4f2231d21 100644 --- a/src/app.postcss +++ b/src/app.postcss @@ -12,10 +12,9 @@ button { } input, -textarea, textarea { outline: none; - @apply rounded border border-zinc-600 bg-zinc-700 p-2 text-zinc-300 dark:bg-zinc-700; + @apply rounded border border-light-500 bg-white p-2 text-light-900 dark:border-dark-400 dark:bg-dark-600 dark:text-dark-100; @apply hover:border-zinc-500/80; @apply focus:ring-2 focus:ring-blue-600; } @@ -239,7 +238,7 @@ button:focus { @apply text-[#5852A0]; } .purple.outlined { - @apply border-[#524C93] no-underline; + @apply border-[#524C93] text-light-900 no-underline dark:text-dark-100; } .purple.outlined:hover { @apply bg-[#524C93]/20; diff --git a/src/lib/assets/logo-310x310.png b/src/lib/assets/logo-310x310.png new file mode 100644 index 000000000..9f3878915 Binary files /dev/null and b/src/lib/assets/logo-310x310.png differ diff --git a/src/lib/components/Login.svelte b/src/lib/components/Login.svelte index 87026758d..3f0ef098f 100644 --- a/src/lib/components/Login.svelte +++ b/src/lib/components/Login.svelte @@ -8,6 +8,8 @@ const cloud = CloudApi(); const user = stores.user; + export let width: 'basic' | 'full-width' = 'basic'; + const pollForUser = async (token: string) => { const apiUser = await cloud.login.user.get(token).catch(() => null); if (apiUser) { @@ -37,20 +39,18 @@ const authUrl = derived(token, ($token) => $token?.url as string); -
- {#if $user} - - {:else if $token !== null} - {#await Promise.all([open($token.url), pollForUser($token.token)])} -
Log in in your system browser
- {/await} -

- - if you are not redirected automatically, you can -

- {:else} - - {/if} -
+{#if $user} + +{:else if $token !== null} + {#await Promise.all([open($token.url), pollForUser($token.token)])} +
Log in in your system browser
+ {/await} +

+ + if you are not redirected automatically, you can +

+{:else} + +{/if} diff --git a/src/lib/theme.ts b/src/lib/theme.ts index f40969af7..298c129f4 100644 --- a/src/lib/theme.ts +++ b/src/lib/theme.ts @@ -1,3 +1,4 @@ +import { building } from '$app/environment'; import { writable, type Writable } from '@square/svelte-store'; import { appWindow, type Theme } from '@tauri-apps/api/window'; @@ -7,6 +8,7 @@ export const theme: Writable = writable('dark'); let systemTheme: string | null; export function initTheme() { + if (building) return; appWindow.theme().then((value: Theme | null) => { systemTheme = value; updateDom(); diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index fcf55e9b8..5fc5554fe 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -74,7 +74,6 @@
-
{#await user.load() then} @@ -91,7 +90,7 @@
-
+
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 9c22b901b..21c4f2a62 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -3,7 +3,6 @@ import { api, log } from '$lib'; import Posthog from '$lib/posthog'; import Sentry from '$lib/sentry'; import { wrapLoadWithSentry } from '@sentry/sveltekit'; -import { initTheme } from '$lib/theme'; export const ssr = false; export const prerender = true; @@ -11,7 +10,6 @@ export const csr = true; export const load: LayoutLoad = wrapLoadWithSentry(({ fetch }) => { log.setup(); - initTheme(); return { projects: api.projects.Projects(), cloud: api.CloudApi({ fetch }), diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index bbc8a0492..cfaf2b6be 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,10 +2,12 @@ import type { LayoutData } from './$types'; import { Button, Tooltip } from '$lib/components'; import { events } from '$lib'; + import { initTheme } from '$lib/theme'; export let data: LayoutData; const { projects } = data; + initTheme();
diff --git a/src/routes/users/+page.svelte b/src/routes/users/+page.svelte index 75c75d2ca..b2fce801c 100644 --- a/src/routes/users/+page.svelte +++ b/src/routes/users/+page.svelte @@ -4,7 +4,8 @@ import { log, stores, toasts } from '$lib'; import { deleteAllData } from '$lib/api'; import { goto } from '$app/navigation'; - import { open } from '@tauri-apps/api/shell'; + import Logo from '$lib/assets/logo-310x310.png'; + import ThemeSelector from '../ThemeSelector.svelte'; export let data: PageData; const { cloud } = data; @@ -85,22 +86,25 @@ .finally(() => (isDeleting = false)); -
- {#if $user} -
-
-
-

GitButler Cloud Account

-
Your online account details on gitbutler.com
-
+{#if $user} +
+
+
+

GitButler Settings

-
+
+
+ +
+

GitButler Cloud

+

Your online account details on gitbutler.com

+
- +
{#if $user.picture} Edit - +
- -
- +
+
+ +
+
+ +
-
+
- -
- -
- +
+ +
+
-
- {:else} -
-
Connect to GitButler Cloud
-
Sign up or log in to GitButler Cloud for more tools and features:
-
    -
  • - - - - Backup everything you do in any of your projects -
  • -
  • - - - - - Sync your data across devices -
  • -
  • - - - - AI commit message automated suggestions -
  • -
-
- +
+
+

Appearance

-
- You will still need to give us permission for each project before we transfer any data to - our servers. You can revoke this permission at any time. +
+
+

Automatically generate AI hunk changes

+

+ GitButler AI will review your hunk changes and write a description of what happened +

+
+
+
+
+
+

Interface theme

+

+ Select or customize your interface theme. +

+
+
+
+ +
+ +
+

Need help?

+
+ + +
+ +
+ +
+ + +

Are you sure you want to delete all local data? This can’t be undone.

+ + + + + +
+
+
+{:else} +
+
+
+ logo +

Login to GitButler

+ +
- {/if} +
+
+

More than just version control

+

+ GitButler is a tool to help you manage all the local work you do on your code projects.

Think of us as a code concierge, a smart assistant for all the coding related + tasks you need to do every day. +

+
+ + + -
- - + + Automatically recording everything you do in any o your butlered projects. + +
+
+ + + + + Simplifying all your Git work, including comitting, branching and pushing, to be easy + and intuitive. + +
+
+ + + + + Helping you not just search for strings or past commits, but find useful context in the + story of your code. + +
+
+
- -
- -
-
- - -

Are you sure you want to delete all local data? This can’t be undone.

- - - - - -
+{/if}