Skip to content

Commit 6265fb1

Browse files
authored
Merge pull request #24 from containerish/adhoc-changes
Adhoc changes
2 parents 87e938d + e903e12 commit 6265fb1

File tree

8 files changed

+22
-57
lines changed

8 files changed

+22
-57
lines changed

src/components/high-level-architecture.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
Arweave and Storj
3636
</p>
3737
<div class="flex justify-center pt-2 cursor-pointer">
38-
<a class="text-brown-900 text-xl mt-1" href="https://blog.openregistry.dev/overview" target="_blank">More</a>
38+
<a class="text-brown-900 text-xl mt-1" href="https://blog.openregistry.dev/posts/overview" target="_blank">More</a>
3939
<button
4040
class="transition duration-500 ease-in-out
4141
bg-transparent hover: transform

src/components/overview.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
target="_blank">More</a
5050
>
5151
<button
52-
class="transition duration-500 ease-in-out bg-transparent hover: transform hover:translate-x-2
52+
class="transition duration-500 ease-in-out bg-transparent hover: transform hover:translate-x-2
5353
hover:scale-110 pb-3 border border-none"
5454
>
5555
<Arrow />
@@ -71,8 +71,8 @@
7171
<p class="font-lato text-[17.5px] text-center font-normal leading-6 tracking-wide">
7272
Want to Collaborate? It's super easy with OpenRegistry. Our code is OpenSource and free to
7373
use. We are open to collaborations with projects that share similar vision and can be
74-
integrated together to serve larger audience. You can also, simply contribute to
75-
OpenRegistry by helping with on of the
74+
integrated together to serve larger audience. Simply contribute to
75+
OpenRegistry by helping with one of the
7676
<a
7777
class="font-semibold text-lg capitalize"
7878
href="https://github.com/containerish/OpenRegistry/issues"
@@ -83,7 +83,7 @@
8383
class="font-semibold capitalize text-lg"
8484
href="https://github.com/containerish/OpenRegistry/discussions/47"
8585
target="_blank">github discussions</a
86-
>
86+
>. We would love to hear from you.
8787
</p>
8888
<div class="flex justify-center pt-2 cursor-pointer">
8989
<a

src/components/signin.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
};
7070
7171
const onClickSignIn = async (e: any) => {
72+
e.preventDefault();
7273
isLoading = true;
7374
const email = e.target.email.value;
7475
const password = e.target.password.value;
@@ -124,7 +125,7 @@
124125
<span class="w-1/5 border-b lg:w-1/4" />
125126
</div>
126127
{#if !showForgotPasswordForm}
127-
<form on:submit|preventDefault={(e) => onClickSignIn(e)}>
128+
<form on:submit={(e) => onClickSignIn(e)}>
128129
<div class="mt-4">
129130
<Textfield
130131
error={emailErr}
@@ -155,7 +156,6 @@
155156
<div class="flex mt-4 w-full">
156157
<Button
157158
disabled={!!emailErr || !!passwordErr}
158-
onClick={onClickSignIn}
159159
{isLoading}
160160
styles="text-gray-50 w-full mr-2 disabled:cursor-not-allowed disabled:bg-opacity-20"
161161
label="Sign In"

src/hooks.ts

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/lib/button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
export let label = '';
3-
export let onClick: Function;
3+
export let onClick: Function = () => {};
44
export let styles = '';
55
export let isLoading = false;
66
export let type = '';

src/routes/__layout.svelte

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<script context="module" lang="ts">
22
export const load = async ({ url }) => {
3-
const pathname = url.pathname === '/search' ? url.pathname : undefined;
4-
3+
const signinPath = url.pathname === '/search' ? url.pathname : undefined;
54
const u = new URLSearchParams(url.search);
65
const signin = u.get('signin');
76
87
return {
98
props: {
10-
pathname: pathname,
9+
signinPath: signinPath,
10+
pathname: url.pathname,
1111
openSignInModal: signin
1212
}
1313
};
@@ -22,11 +22,12 @@
2222
import Navbar from '$lib/navbar.svelte';
2323
import { Auth } from '../apis/auth';
2424
export let pathname: string;
25+
export let signinPath: string;
2526
export let openSignInModal: boolean;
2627
2728
const auth = new Auth();
2829
onMount(async () => {
29-
if (pathname === '/' || pathname === '/about' || pathname === '/faq') {
30+
if (!pathname || pathname === '/' || pathname === '/about' || pathname === '/faq') {
3031
return;
3132
}
3233
@@ -45,7 +46,7 @@
4546
class="prose lg:w-screen uw:min-w-[55vw] uw:max-w-[50vw] flex justify-center flex-col selection:bg-brown-800
4647
selection:text-cream-50"
4748
>
48-
<Navbar {pathname} {openSignInModal} />
49+
<Navbar pathname={signinPath} {openSignInModal} />
4950
<slot />
5051
<Footer />
5152
</main>

src/routes/auth/[slug].svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
return {
77
props: {
88
slug: slug,
9-
token: u.get('token')
9+
token: u.get('token'),
10+
unhandledErr: u.get('error')
1011
}
1112
};
1213
}
@@ -20,6 +21,7 @@
2021
import Button from '$lib/button.svelte';
2122
import Pulse from '../../components/pulse.svelte';
2223
import CrossIcon from '$lib/icons/crossIcon.svelte';
24+
export let unhandledErr: string;
2325
let showModal = false;
2426
let password = '';
2527
let confirmPassword = '';
@@ -66,6 +68,7 @@
6668
6769
const verifyEmail = 'verify';
6870
const forgotPassword = 'forgot-password';
71+
const unhandled = 'unhandled';
6972
7073
let showErrorModal = false;
7174
const handleCallback = async () => {
@@ -86,6 +89,9 @@
8689
case forgotPassword:
8790
showModal = true;
8891
break;
92+
case unhandled:
93+
showErrorModal = true;
94+
formErr = unhandledErr;
8995
}
9096
};
9197

src/routes/repositories/index.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import { RegistryBackend } from '../../apis/registry';
1212
import type { Catalog } from '../../apis/registry';
1313
import type { User } from '../../apis/auth';
14+
import { session } from '$app/stores';
1415
export let u: User;
1516
const backend = new RegistryBackend();
1617
const pageSize = 10;
@@ -24,7 +25,6 @@
2425
modifiers: [{ name: 'offset', options: { offset: [0, 8] } }]
2526
};
2627
27-
import { session } from '$app/stores';
2828
import { goto } from '$app/navigation';
2929
import Pulse from '../../components/pulse.svelte';
3030
// @ts-ignore

0 commit comments

Comments
 (0)