tangled
alpha
login
or
join now
yoyle.city
/
skittr
6
fork
atom
this repo has no description
atproto
bluesky
typescript
express
6
fork
atom
overview
issues
3
pulls
pipelines
zed formatting
lime360
3 months ago
e03fc2c1
0b7af938
1/1
test.yml
success
19s
+4
-20
1 changed file
expand all
collapse all
unified
split
src
lib
theme.ts
+4
-20
src/lib/theme.ts
reviewed
···
38
38
}
39
39
}
40
40
41
41
-
export async function getBackgroundBase64(
42
42
-
agent: AtpAgent,
43
43
-
did: string,
44
44
-
cid: string,
45
45
-
) {
41
41
+
export async function getBackgroundBase64(agent: AtpAgent, did: string, cid: string) {
46
42
const blob = await getBackground(agent, did, cid);
47
43
const mimetype = blob.headers["content-type"] ?? "application/octet-stream";
48
44
const base64 = Buffer.from(blob.data).toString("base64");
···
64
60
return { theme, bg };
65
61
}
66
62
67
67
-
export async function putTheme(
68
68
-
agent: AtpAgent,
69
69
-
did: string,
70
70
-
theme: any,
71
71
-
bg?: any,
72
72
-
) {
73
73
-
const {
74
74
-
bg_color,
75
75
-
text_color,
76
76
-
link_color,
77
77
-
side_color,
78
78
-
side_border,
79
79
-
repeat = false,
80
80
-
} = theme;
63
63
+
export async function putTheme(agent: AtpAgent, did: string, theme: any, bg?: any) {
64
64
+
const { bg_color, text_color, link_color, side_color, side_border, repeat = false } = theme;
81
65
const bgBuffer = Buffer.from(bg, "base64");
82
66
let output = {};
83
67
84
68
if (bg) {
85
85
-
const blob = await agent.com.atproto.repo.uploadBlob(bgBuffer);
69
69
+
const blob = await agent.uploadBlob(bgBuffer);
86
70
87
71
output = {
88
72
$type: "lol.skittr.actor.theme",