tangled
alpha
login
or
join now
isuggest.selfce.st
/
strand
3
fork
atom
alternative tangled frontend (extremely wip)
3
fork
atom
overview
issues
pulls
pipelines
feat: redo colours
serenity
2 weeks ago
52d724d9
b2fdfb52
+34
-18
6 changed files
expand all
collapse all
unified
split
src
components
Nav
NavBarAuthed.tsx
NavBarUnauthed.tsx
routes
_layout
$identifier
index.tsx
index.tsx
login.tsx
oauth
callback.tsx
+2
-2
src/components/Nav/NavBarAuthed.tsx
···
26
const avatarUri = avatarQueryData === "#" ? undefined : avatarQueryData;
27
28
return (
29
-
<div className="bg-surface0 flex w-full items-center justify-between p-3">
30
<div className="flex max-h-12 items-center gap-1">
31
<UnderlineIconRouterLink
32
to="/"
33
label="Strand"
34
-
icon={StrandIcon()}
35
iconClassName="text-text"
36
labelClassName="text-text"
37
underlineClassName="bg-text"
···
26
const avatarUri = avatarQueryData === "#" ? undefined : avatarQueryData;
27
28
return (
29
+
<div className="bg-base flex w-full items-center justify-between p-3">
30
<div className="flex max-h-12 items-center gap-1">
31
<UnderlineIconRouterLink
32
to="/"
33
label="Strand"
34
+
icon={<StrandIcon />}
35
iconClassName="text-text"
36
labelClassName="text-text"
37
underlineClassName="bg-text"
+1
-1
src/components/Nav/NavBarUnauthed.tsx
···
4
5
export const NavBarUnauthed = () => {
6
return (
7
-
<div className="bg-surface0 flex w-full items-center justify-between p-3">
8
<div className="flex items-center gap-1">
9
<UnderlineIconRouterLink
10
to="/"
···
4
5
export const NavBarUnauthed = () => {
6
return (
7
+
<div className="bg-base flex w-full items-center justify-between p-3">
8
<div className="flex items-center gap-1">
9
<UnderlineIconRouterLink
10
to="/"
+22
-8
src/routes/_layout/$identifier/index.tsx
···
5
import { useProfileQuery } from "@/lib/queries/get-profile";
6
import { useMiniDoc } from "@/lib/queries/resolve-minidoc";
7
import { createFileRoute } from "@tanstack/react-router";
8
-
import { LucideAlignCenter, LucideHeart } from "lucide-react";
0
9
10
export const Route = createFileRoute("/_layout/$identifier/")({
11
component: RouteComponent,
···
49
50
const avatarUri = avatarQueryData;
51
52
-
const tempIcon = <LucideHeart/>
0
0
0
0
0
0
53
54
return (
55
<div className="flex flex-col items-center">
56
-
<div className="bg-surface0 w-screen">
57
-
<UnderlineIconRouterLink
58
-
to={`/${identifier}`}
59
-
icon={tempIcon}
60
-
label="Temporary"
61
-
/>
0
0
0
0
0
0
0
62
</div>
63
<div className="bg-surface0 w-fit">
64
<p>{JSON.stringify(miniDocQueryData)}</p>
···
5
import { useProfileQuery } from "@/lib/queries/get-profile";
6
import { useMiniDoc } from "@/lib/queries/resolve-minidoc";
7
import { createFileRoute } from "@tanstack/react-router";
8
+
import { LucideBookOpen } from "lucide-react";
9
+
import { ReactNode } from "react";
10
11
export const Route = createFileRoute("/_layout/$identifier/")({
12
component: RouteComponent,
···
50
51
const avatarUri = avatarQueryData;
52
53
+
const tabs: { to: string; icon: ReactNode; label: string }[] = [
54
+
{
55
+
to: `/${identifier}`,
56
+
icon: <LucideBookOpen height={18} width={18} />,
57
+
label: "Overview",
58
+
},
59
+
];
60
61
return (
62
<div className="flex flex-col items-center">
63
+
<div className="bg-base w-screen flex pl-4 pb-1">
64
+
{tabs.map(({ to, icon, label }) => (
65
+
<UnderlineIconRouterLink
66
+
to={to}
67
+
icon={icon}
68
+
label={label}
69
+
underlineClassName="bg-text"
70
+
labelClassName="text-text"
71
+
iconClassName="text-text"
72
+
iconVariants={{}}
73
+
className="hover:bg-surface1 p-2 transition-all"
74
+
/>
75
+
))}
76
</div>
77
<div className="bg-surface0 w-fit">
78
<p>{JSON.stringify(miniDocQueryData)}</p>
+5
-5
src/routes/_layout/index.tsx
···
4
import { useOAuth } from "@/lib/oauth";
5
import { useAvatarQuery } from "@/lib/queries/get-avatar";
6
import { createFileRoute } from "@tanstack/react-router";
7
-
import { LucideLogIn } from "lucide-react";
8
9
export const Route = createFileRoute("/_layout/")({ component: App });
10
11
function App() {
12
return (
13
-
<div className="flex min-w-screen flex-col items-center justify-center gap-4">
14
<IndexInner />
15
</div>
16
);
···
31
32
if (client && session) {
33
return (
34
-
<div className="flex flex-col items-start gap-4 pt-8">
35
<div className="flex items-center gap-4 pl-2">
36
<img src={avatarSrc} className="h-20 w-20 rounded-full" />
37
<div>
···
47
}
48
49
return (
50
-
<div className="flex flex-col items-center justify-center gap-4 pt-8">
51
<h1 className="text-xl font-bold">
52
The better frontend for the better forge.
53
</h1>
···
68
},
69
}}
70
/>
71
-
<div className="border-surface1 mt-6 h-0.5 w-full border-b-1" />
72
<TrendingFeed />
73
</div>
74
);
···
4
import { useOAuth } from "@/lib/oauth";
5
import { useAvatarQuery } from "@/lib/queries/get-avatar";
6
import { createFileRoute } from "@tanstack/react-router";
7
+
import { LucideDot, LucideLogIn } from "lucide-react";
8
9
export const Route = createFileRoute("/_layout/")({ component: App });
10
11
function App() {
12
return (
13
+
<div className="border-overlay0 flex min-w-screen flex-col items-center justify-center gap-4 border-t pt-8">
14
<IndexInner />
15
</div>
16
);
···
31
32
if (client && session) {
33
return (
34
+
<div className="border-overlay0 flex flex-col items-start gap-4">
35
<div className="flex items-center gap-4 pl-2">
36
<img src={avatarSrc} className="h-20 w-20 rounded-full" />
37
<div>
···
47
}
48
49
return (
50
+
<div className="border-overlay0 flex flex-col items-center justify-center gap-4">
51
<h1 className="text-xl font-bold">
52
The better frontend for the better forge.
53
</h1>
···
68
},
69
}}
70
/>
71
+
<LucideDot height={20} width={20} className="text-overlay0 mt-2" />
72
<TrendingFeed />
73
</div>
74
);
+1
-1
src/routes/_layout/login.tsx
···
16
17
return (
18
<>
19
-
<div className="flex w-screen justify-center pt-8">
20
<SignIn />
21
</div>
22
</>
···
16
17
return (
18
<>
19
+
<div className="border-overlay0 flex w-screen justify-center border-t pt-8">
20
<SignIn />
21
</div>
22
</>
+3
-1
src/routes/_layout/oauth/callback.tsx
···
1
import { Loading } from "@/components/Icons/Loading";
2
import { useOAuthSession } from "@/lib/oauth";
3
-
import { createFileRoute, redirect, useNavigate } from "@tanstack/react-router";
4
import { useEffect } from "react";
5
6
export const Route = createFileRoute("/_layout/oauth/callback")({
···
23
return (
24
<div>
25
<p>Signed in as {session.did}</p>
0
0
26
</div>
27
);
28
}
···
1
import { Loading } from "@/components/Icons/Loading";
2
import { useOAuthSession } from "@/lib/oauth";
3
+
import { createFileRoute, useNavigate } from "@tanstack/react-router";
4
import { useEffect } from "react";
5
6
export const Route = createFileRoute("/_layout/oauth/callback")({
···
23
return (
24
<div>
25
<p>Signed in as {session.did}</p>
26
+
<p>Wow your oauth callback is taking a while isn't it?</p>
27
+
<p>omg easter egg??</p>
28
</div>
29
);
30
}