tangled
alpha
login
or
join now
bas.sh
/
pdsls
forked from
pds.ls/pdsls
0
fork
atom
atmosphere explorer
0
fork
atom
overview
issues
pulls
pipelines
add search links for blento and popfeed
handle.invalid
1 month ago
1180024a
b795c7a6
verified
This commit was signed with the committer's
known signature
.
handle.invalid
SSH Key Fingerprint:
SHA256:mBrT4x0JdzLpbVR95g1hjI1aaErfC02kmLRkPXwsYCk=
+25
-14
2 changed files
expand all
collapse all
unified
split
src
components
search.tsx
utils
app-urls.ts
+1
-1
src/components/search.tsx
reviewed
···
465
465
<span class="text-neutral-400 dark:text-neutral-500">tngl.sh</span>
466
466
</div>
467
467
</div>
468
468
-
<span>Bluesky, Tangled, Pinksea, or Frontpage links</span>
468
468
+
<span>Bluesky, Tangled, Pinksea, Popfeed, or Blento links</span>
469
469
</div>
470
470
</Show>
471
471
</form>
+24
-13
src/utils/app-urls.ts
reviewed
···
4
4
Bluesky,
5
5
Tangled,
6
6
Pinksea,
7
7
-
Frontpage,
7
7
+
Blento,
8
8
+
Popfeed,
8
9
}
9
10
10
11
export const appName = {
11
12
[App.Bluesky]: "Bluesky",
12
13
[App.Tangled]: "Tangled",
13
14
[App.Pinksea]: "Pinksea",
14
14
-
[App.Frontpage]: "Frontpage",
15
15
+
[App.Blento]: "Blento",
16
16
+
[App.Popfeed]: "Popfeed",
15
17
};
16
18
17
19
export const appList: Record<AppUrl, App> = {
···
19
21
"blacksky.community": App.Bluesky,
20
22
"bsky.app": App.Bluesky,
21
23
"catsky.social": App.Bluesky,
22
22
-
"deer.aylac.top": App.Bluesky,
23
24
"deer.social": App.Bluesky,
24
25
"main.bsky.dev": App.Bluesky,
25
26
"witchsky.app": App.Bluesky,
26
27
"tangled.org": App.Tangled,
27
27
-
"frontpage.fyi": App.Frontpage,
28
28
"pinksea.art": App.Pinksea,
29
29
+
"blento.app": App.Blento,
30
30
+
"popfeed.social": App.Popfeed,
29
31
};
30
32
31
33
export const appHandleLink: Record<App, (url: string[]) => string> = {
···
85
87
86
88
return `at://${user}`;
87
89
},
88
88
-
[App.Frontpage]: (path) => {
90
90
+
[App.Pinksea]: (path) => {
89
91
if (path.length === 3) {
90
90
-
return `at://${path[1]}/fyi.unravel.frontpage.post/${path[2]}`;
91
91
-
} else if (path.length === 5) {
92
92
-
return `at://${path[3]}/fyi.unravel.frontpage.comment/${path[4]}`;
92
92
+
return `at://${path[0]}/com.shinolabs.pinksea.oekaki/${path[2]}`;
93
93
}
94
94
95
95
return `at://${path[0]}`;
96
96
},
97
97
-
[App.Pinksea]: (path) => {
98
98
-
if (path.length === 3) {
99
99
-
return `at://${path[0]}/com.shinolabs.pinksea.oekaki/${path[2]}`;
97
97
+
[App.Blento]: (path) => {
98
98
+
return `at://${path[0]}/app.blento.card`;
99
99
+
},
100
100
+
[App.Popfeed]: (path) => {
101
101
+
if (path[0] === "profile" && path[1]) {
102
102
+
return `at://${path[1]}/social.popfeed.actor.profile/self`;
103
103
+
}
104
104
+
if (
105
105
+
(path[0] === "review" || path[0] === "list") &&
106
106
+
path[1] === "at:" &&
107
107
+
path[2] &&
108
108
+
path[3] &&
109
109
+
path[4]
110
110
+
) {
111
111
+
return `at://${path[2]}/${path[3]}/${path[4]}`;
100
112
}
101
101
-
102
102
-
return `at://${path[0]}`;
113
113
+
return `at://${path[1]}`;
103
114
},
104
115
};