diff --git a/src/components/ui/checkbox/checkbox.svelte b/src/components/ui/checkbox/checkbox.svelte new file mode 100644 index 00000000..a1c7c639 --- /dev/null +++ b/src/components/ui/checkbox/checkbox.svelte @@ -0,0 +1,35 @@ + + + + + {#if isChecked} + + {:else if isIndeterminate} + + {/if} + + diff --git a/src/components/ui/checkbox/index.ts b/src/components/ui/checkbox/index.ts new file mode 100644 index 00000000..f4a32f2b --- /dev/null +++ b/src/components/ui/checkbox/index.ts @@ -0,0 +1,7 @@ +import Root from './checkbox.svelte' + +export { + Root, + // + Root as Checkbox +} diff --git a/src/components/ui/theme-selector/index.ts b/src/components/ui/theme-selector/index.ts new file mode 100644 index 00000000..489d16ea --- /dev/null +++ b/src/components/ui/theme-selector/index.ts @@ -0,0 +1 @@ +export { default as ThemeSelector } from './theme-selector.svelte' diff --git a/src/components/ui/theme-selector/theme-selector.svelte b/src/components/ui/theme-selector/theme-selector.svelte new file mode 100644 index 00000000..0e79ce85 --- /dev/null +++ b/src/components/ui/theme-selector/theme-selector.svelte @@ -0,0 +1,58 @@ + + + + +
+ + + + + + + + +
+ + diff --git a/src/hooks.server.ts b/src/hooks.server.ts index e62952f2..a4613863 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -4,7 +4,15 @@ import { TOKEN_NAME, parseTokenToJwt } from 'services/auth/token' import type { UserAuthCredentials } from 'services/user/user' import { getUserAuthCredentials } from 'services/user/user-auth-service' -const PUBLIC_ROUTES = ['/', '/login', '/signup'] +const PUBLIC_ROUTES = [ + '/', + '/login', + '/signup', + '/forgot-password', + '/code-of-conduct', + '/privacy-policy', + '/terms-of-service' +] export const handle: Handle = async ({ event, resolve }) => { const { locals, cookies, url } = event diff --git a/src/routes/(auth)/+layout.svelte b/src/routes/(auth)/+layout.svelte new file mode 100644 index 00000000..27927f05 --- /dev/null +++ b/src/routes/(auth)/+layout.svelte @@ -0,0 +1,52 @@ + + +
+
+ +
+
+ ⌘ Tiny-TMS +
+
+ + +
+
+ + + + Efficiently translate your content +
+
+ + + + Open source and self hosting +
+
+ + + + Seamless AI-Autocompletion integrations +
+
+ + +
+
+

A Translation Management System to cover the needs of most people.

+

Not for everyone, but for most.

+
+
+
+ +
+
+ +
+
diff --git a/src/routes/(auth)/forgot-password/+page.svelte b/src/routes/(auth)/forgot-password/+page.svelte new file mode 100644 index 00000000..71950a7a --- /dev/null +++ b/src/routes/(auth)/forgot-password/+page.svelte @@ -0,0 +1 @@ +Forgot Password diff --git a/src/routes/(auth)/login/login-form.svelte b/src/routes/(auth)/login/login-form.svelte index 4292331e..c6ab5caf 100644 --- a/src/routes/(auth)/login/login-form.svelte +++ b/src/routes/(auth)/login/login-form.svelte @@ -1,7 +1,8 @@ -
- - - Log In - Log In to tiny-tms and start doing you translations - - +
+
+
+

Sign in to your account

+

+ Or sign up for a new account +

+
+ - E-Mail - + Email + - This is your e-mail. Password - + - This is your password - - - Log In - - - +
+
+ + +
+ +
+ Log In + +
+ Check out our Code of Conduct + and + Privacy Policy + page. +
+
+
diff --git a/src/routes/(auth)/signup/schema.ts b/src/routes/(auth)/signup/schema.ts index a0c4eadc..a5b18801 100644 --- a/src/routes/(auth)/signup/schema.ts +++ b/src/routes/(auth)/signup/schema.ts @@ -7,9 +7,9 @@ export const signupSchema = z .email({ message: 'Please enter a valid email address' }), password: z .string({ required_error: 'Password is required' }) - .min(8, { message: 'Password must be at least 8 characters' }) - .trim(), - confirmPassword: z.string().trim() + .min(8, { message: 'Password must be at least 8 characters' }), + confirmPassword: z.string(), + termsOfService: z.literal(true, { required_error: 'You must agree to the terms of service' }) }) .refine((data) => data.password === data.confirmPassword, { message: "Passwords don't match", diff --git a/src/routes/(auth)/signup/signup-form.svelte b/src/routes/(auth)/signup/signup-form.svelte index e359a620..3306b079 100644 --- a/src/routes/(auth)/signup/signup-form.svelte +++ b/src/routes/(auth)/signup/signup-form.svelte @@ -1,7 +1,7 @@ -
- - - Sign Up to tiny-tms - Register to tiny-tms and start doing you translations - - +
+
+
+

Register

+

+ Enter you information to create an user account for this Tiny-TMS instance +

+

+ or sign in to an existing account +

+
+ - E-Mail - + Email + - This is your e-mail. Password - + - This is your password Confirm Password - + - This is your password - - - Sign Up - - - + + + +
+
+ + + I agree with the + Terms of Service + + + +
+
+
+
+ + Sign Up + +
+
diff --git a/src/routes/(terms-policy)/code-of-conduct/+page.svelte b/src/routes/(terms-policy)/code-of-conduct/+page.svelte new file mode 100644 index 00000000..9163e902 --- /dev/null +++ b/src/routes/(terms-policy)/code-of-conduct/+page.svelte @@ -0,0 +1 @@ +Code of Conduct diff --git a/src/routes/(terms-policy)/privacy-policy/+page.svelte b/src/routes/(terms-policy)/privacy-policy/+page.svelte new file mode 100644 index 00000000..9e4e7d65 --- /dev/null +++ b/src/routes/(terms-policy)/privacy-policy/+page.svelte @@ -0,0 +1 @@ +Privacy Policy diff --git a/src/routes/(terms-policy)/terms-of-service/+page.svelte b/src/routes/(terms-policy)/terms-of-service/+page.svelte new file mode 100644 index 00000000..4a87d0b0 --- /dev/null +++ b/src/routes/(terms-policy)/terms-of-service/+page.svelte @@ -0,0 +1 @@ +Terms of Service diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 9c841128..443f5841 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,28 +1,10 @@ - - - - - +
+ - + +