tangled
alpha
login
or
join now
vt3e.cat
/
www
2
fork
atom
this repo has no descr,ription
vt3e.cat
2
fork
atom
overview
issues
pulls
pipelines
feat: add extra title field to gallery.image
vt3e.cat
4 months ago
32f11603
3b766395
verified
This commit was signed with the committer's
known signature
.
vt3e.cat
SSH Key Fingerprint:
SHA256:bC12nO0d6wKnJ426YBbLO7LVxmZlwJ1l2X0eqOroDV0=
+129
-113
4 changed files
expand all
collapse all
unified
split
pkgs
gallery
lexicons
moe
wlo
gallery
group.json
groupItem.json
image.json
src
main.tsp
+29
-27
pkgs/gallery/lexicons/moe/wlo/gallery/group.json
···
1
1
{
2
2
-
"lexicon": 1,
3
3
-
"id": "moe.wlo.gallery.group",
4
4
-
"defs": {
5
5
-
"main": {
6
6
-
"type": "record",
7
7
-
"key": "tid",
8
8
-
"record": {
9
9
-
"type": "object",
10
10
-
"properties": {
11
11
-
"createdAt": {
12
12
-
"type": "string",
13
13
-
"format": "datetime"
14
14
-
},
15
15
-
"title": {
16
16
-
"type": "string",
17
17
-
"maxLength": 300
18
18
-
},
19
19
-
"description": {
20
20
-
"type": "string",
21
21
-
"maxLength": 1000
22
22
-
}
23
23
-
},
24
24
-
"required": ["createdAt"]
25
25
-
},
26
26
-
"description": "defines a group of images in the gallery"
27
27
-
}
28
28
-
}
2
2
+
"lexicon": 1,
3
3
+
"id": "moe.wlo.gallery.group",
4
4
+
"defs": {
5
5
+
"main": {
6
6
+
"type": "record",
7
7
+
"key": "tid",
8
8
+
"record": {
9
9
+
"type": "object",
10
10
+
"properties": {
11
11
+
"createdAt": {
12
12
+
"type": "string",
13
13
+
"format": "datetime"
14
14
+
},
15
15
+
"title": {
16
16
+
"type": "string",
17
17
+
"maxLength": 300
18
18
+
},
19
19
+
"description": {
20
20
+
"type": "string",
21
21
+
"maxLength": 1000
22
22
+
}
23
23
+
},
24
24
+
"required": [
25
25
+
"createdAt"
26
26
+
]
27
27
+
},
28
28
+
"description": "defines a group of images in the gallery"
29
29
+
}
30
30
+
}
29
31
}
+36
-32
pkgs/gallery/lexicons/moe/wlo/gallery/groupItem.json
···
1
1
{
2
2
-
"lexicon": 1,
3
3
-
"id": "moe.wlo.gallery.groupItem",
4
4
-
"defs": {
5
5
-
"main": {
6
6
-
"type": "record",
7
7
-
"key": "tid",
8
8
-
"record": {
9
9
-
"type": "object",
10
10
-
"properties": {
11
11
-
"group": {
12
12
-
"type": "string",
13
13
-
"format": "at-uri",
14
14
-
"description": "uri of the group that the image belongs to"
15
15
-
},
16
16
-
"image": {
17
17
-
"type": "string",
18
18
-
"format": "at-uri",
19
19
-
"description": "uri of the image that this item represents"
20
20
-
},
21
21
-
"addedAt": {
22
22
-
"type": "string",
23
23
-
"format": "datetime"
24
24
-
},
25
25
-
"note": {
26
26
-
"type": "string"
27
27
-
}
28
28
-
},
29
29
-
"required": ["group", "image", "addedAt"]
30
30
-
},
31
31
-
"description": "defines an item in a gallery group"
32
32
-
}
33
33
-
}
2
2
+
"lexicon": 1,
3
3
+
"id": "moe.wlo.gallery.groupItem",
4
4
+
"defs": {
5
5
+
"main": {
6
6
+
"type": "record",
7
7
+
"key": "tid",
8
8
+
"record": {
9
9
+
"type": "object",
10
10
+
"properties": {
11
11
+
"group": {
12
12
+
"type": "string",
13
13
+
"format": "at-uri",
14
14
+
"description": "uri of the group that the image belongs to"
15
15
+
},
16
16
+
"image": {
17
17
+
"type": "string",
18
18
+
"format": "at-uri",
19
19
+
"description": "uri of the image that this item represents"
20
20
+
},
21
21
+
"addedAt": {
22
22
+
"type": "string",
23
23
+
"format": "datetime"
24
24
+
},
25
25
+
"note": {
26
26
+
"type": "string"
27
27
+
}
28
28
+
},
29
29
+
"required": [
30
30
+
"group",
31
31
+
"image",
32
32
+
"addedAt"
33
33
+
]
34
34
+
},
35
35
+
"description": "defines an item in a gallery group"
36
36
+
}
37
37
+
}
34
38
}
+63
-54
pkgs/gallery/lexicons/moe/wlo/gallery/image.json
···
1
1
{
2
2
-
"lexicon": 1,
3
3
-
"id": "moe.wlo.gallery.image",
4
4
-
"defs": {
5
5
-
"main": {
6
6
-
"type": "record",
7
7
-
"key": "tid",
8
8
-
"record": {
9
9
-
"type": "object",
10
10
-
"properties": {
11
11
-
"image": {
12
12
-
"type": "blob",
13
13
-
"accept": ["image/*"],
14
14
-
"maxSize": 32000000
15
15
-
},
16
16
-
"createdAt": {
17
17
-
"type": "string",
18
18
-
"format": "datetime"
19
19
-
},
20
20
-
"alt": {
21
21
-
"type": "string",
22
22
-
"maxLength": 2000
23
23
-
},
24
24
-
"caption": {
25
25
-
"type": "string",
26
26
-
"maxLength": 2000
27
27
-
},
28
28
-
"width": {
29
29
-
"type": "integer"
30
30
-
},
31
31
-
"height": {
32
32
-
"type": "integer"
33
33
-
},
34
34
-
"aspectRatio": {
35
35
-
"type": "integer"
36
36
-
},
37
37
-
"sizeInBytes": {
38
38
-
"type": "integer"
39
39
-
},
40
40
-
"checksum": {
41
41
-
"type": "string"
42
42
-
},
43
43
-
"dominantColour": {
44
44
-
"type": "string"
45
45
-
},
46
46
-
"blurhash": {
47
47
-
"type": "string",
48
48
-
"description": "provides a blurred preview of the image for use while loading, see github.com/woltapp/blurhash"
49
49
-
}
50
50
-
},
51
51
-
"required": ["image", "createdAt"]
52
52
-
},
53
53
-
"description": "defines an image in the gallery"
54
54
-
}
55
55
-
}
2
2
+
"lexicon": 1,
3
3
+
"id": "moe.wlo.gallery.image",
4
4
+
"defs": {
5
5
+
"main": {
6
6
+
"type": "record",
7
7
+
"key": "tid",
8
8
+
"record": {
9
9
+
"type": "object",
10
10
+
"properties": {
11
11
+
"image": {
12
12
+
"type": "blob",
13
13
+
"accept": [
14
14
+
"image/*"
15
15
+
],
16
16
+
"maxSize": 32000000
17
17
+
},
18
18
+
"createdAt": {
19
19
+
"type": "string",
20
20
+
"format": "datetime"
21
21
+
},
22
22
+
"alt": {
23
23
+
"type": "string",
24
24
+
"maxLength": 2000
25
25
+
},
26
26
+
"title": {
27
27
+
"type": "string",
28
28
+
"maxLength": 512
29
29
+
},
30
30
+
"caption": {
31
31
+
"type": "string",
32
32
+
"maxLength": 2000
33
33
+
},
34
34
+
"width": {
35
35
+
"type": "integer"
36
36
+
},
37
37
+
"height": {
38
38
+
"type": "integer"
39
39
+
},
40
40
+
"aspectRatio": {
41
41
+
"type": "integer"
42
42
+
},
43
43
+
"sizeInBytes": {
44
44
+
"type": "integer"
45
45
+
},
46
46
+
"checksum": {
47
47
+
"type": "string"
48
48
+
},
49
49
+
"dominantColour": {
50
50
+
"type": "string"
51
51
+
},
52
52
+
"blurhash": {
53
53
+
"type": "string",
54
54
+
"description": "provides a blurred preview of the image for use while loading, see github.com/woltapp/blurhash"
55
55
+
}
56
56
+
},
57
57
+
"required": [
58
58
+
"image",
59
59
+
"createdAt"
60
60
+
]
61
61
+
},
62
62
+
"description": "defines an image in the gallery"
63
63
+
}
64
64
+
}
56
65
}
+1
pkgs/gallery/src/main.tsp
···
9
9
@required image: Blob<#["image/*"], 32000000>; // 32mb max
10
10
@required createdAt: datetime;
11
11
@maxLength(2000) alt?: string;
12
12
+
@maxLength(512) title?: string;
12
13
@maxLength(2000) caption?: string;
13
14
width?: numeric;
14
15
height?: numeric;