this repo has no descr,ription vt3e.cat

feat: add extra title field to gallery.image

vt3e.cat 32f11603 3b766395

verified
+129 -113
+29 -27
pkgs/gallery/lexicons/moe/wlo/gallery/group.json
··· 1 1 { 2 - "lexicon": 1, 3 - "id": "moe.wlo.gallery.group", 4 - "defs": { 5 - "main": { 6 - "type": "record", 7 - "key": "tid", 8 - "record": { 9 - "type": "object", 10 - "properties": { 11 - "createdAt": { 12 - "type": "string", 13 - "format": "datetime" 14 - }, 15 - "title": { 16 - "type": "string", 17 - "maxLength": 300 18 - }, 19 - "description": { 20 - "type": "string", 21 - "maxLength": 1000 22 - } 23 - }, 24 - "required": ["createdAt"] 25 - }, 26 - "description": "defines a group of images in the gallery" 27 - } 28 - } 2 + "lexicon": 1, 3 + "id": "moe.wlo.gallery.group", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "properties": { 11 + "createdAt": { 12 + "type": "string", 13 + "format": "datetime" 14 + }, 15 + "title": { 16 + "type": "string", 17 + "maxLength": 300 18 + }, 19 + "description": { 20 + "type": "string", 21 + "maxLength": 1000 22 + } 23 + }, 24 + "required": [ 25 + "createdAt" 26 + ] 27 + }, 28 + "description": "defines a group of images in the gallery" 29 + } 30 + } 29 31 }
+36 -32
pkgs/gallery/lexicons/moe/wlo/gallery/groupItem.json
··· 1 1 { 2 - "lexicon": 1, 3 - "id": "moe.wlo.gallery.groupItem", 4 - "defs": { 5 - "main": { 6 - "type": "record", 7 - "key": "tid", 8 - "record": { 9 - "type": "object", 10 - "properties": { 11 - "group": { 12 - "type": "string", 13 - "format": "at-uri", 14 - "description": "uri of the group that the image belongs to" 15 - }, 16 - "image": { 17 - "type": "string", 18 - "format": "at-uri", 19 - "description": "uri of the image that this item represents" 20 - }, 21 - "addedAt": { 22 - "type": "string", 23 - "format": "datetime" 24 - }, 25 - "note": { 26 - "type": "string" 27 - } 28 - }, 29 - "required": ["group", "image", "addedAt"] 30 - }, 31 - "description": "defines an item in a gallery group" 32 - } 33 - } 2 + "lexicon": 1, 3 + "id": "moe.wlo.gallery.groupItem", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "properties": { 11 + "group": { 12 + "type": "string", 13 + "format": "at-uri", 14 + "description": "uri of the group that the image belongs to" 15 + }, 16 + "image": { 17 + "type": "string", 18 + "format": "at-uri", 19 + "description": "uri of the image that this item represents" 20 + }, 21 + "addedAt": { 22 + "type": "string", 23 + "format": "datetime" 24 + }, 25 + "note": { 26 + "type": "string" 27 + } 28 + }, 29 + "required": [ 30 + "group", 31 + "image", 32 + "addedAt" 33 + ] 34 + }, 35 + "description": "defines an item in a gallery group" 36 + } 37 + } 34 38 }
+63 -54
pkgs/gallery/lexicons/moe/wlo/gallery/image.json
··· 1 1 { 2 - "lexicon": 1, 3 - "id": "moe.wlo.gallery.image", 4 - "defs": { 5 - "main": { 6 - "type": "record", 7 - "key": "tid", 8 - "record": { 9 - "type": "object", 10 - "properties": { 11 - "image": { 12 - "type": "blob", 13 - "accept": ["image/*"], 14 - "maxSize": 32000000 15 - }, 16 - "createdAt": { 17 - "type": "string", 18 - "format": "datetime" 19 - }, 20 - "alt": { 21 - "type": "string", 22 - "maxLength": 2000 23 - }, 24 - "caption": { 25 - "type": "string", 26 - "maxLength": 2000 27 - }, 28 - "width": { 29 - "type": "integer" 30 - }, 31 - "height": { 32 - "type": "integer" 33 - }, 34 - "aspectRatio": { 35 - "type": "integer" 36 - }, 37 - "sizeInBytes": { 38 - "type": "integer" 39 - }, 40 - "checksum": { 41 - "type": "string" 42 - }, 43 - "dominantColour": { 44 - "type": "string" 45 - }, 46 - "blurhash": { 47 - "type": "string", 48 - "description": "provides a blurred preview of the image for use while loading, see github.com/woltapp/blurhash" 49 - } 50 - }, 51 - "required": ["image", "createdAt"] 52 - }, 53 - "description": "defines an image in the gallery" 54 - } 55 - } 2 + "lexicon": 1, 3 + "id": "moe.wlo.gallery.image", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "key": "tid", 8 + "record": { 9 + "type": "object", 10 + "properties": { 11 + "image": { 12 + "type": "blob", 13 + "accept": [ 14 + "image/*" 15 + ], 16 + "maxSize": 32000000 17 + }, 18 + "createdAt": { 19 + "type": "string", 20 + "format": "datetime" 21 + }, 22 + "alt": { 23 + "type": "string", 24 + "maxLength": 2000 25 + }, 26 + "title": { 27 + "type": "string", 28 + "maxLength": 512 29 + }, 30 + "caption": { 31 + "type": "string", 32 + "maxLength": 2000 33 + }, 34 + "width": { 35 + "type": "integer" 36 + }, 37 + "height": { 38 + "type": "integer" 39 + }, 40 + "aspectRatio": { 41 + "type": "integer" 42 + }, 43 + "sizeInBytes": { 44 + "type": "integer" 45 + }, 46 + "checksum": { 47 + "type": "string" 48 + }, 49 + "dominantColour": { 50 + "type": "string" 51 + }, 52 + "blurhash": { 53 + "type": "string", 54 + "description": "provides a blurred preview of the image for use while loading, see github.com/woltapp/blurhash" 55 + } 56 + }, 57 + "required": [ 58 + "image", 59 + "createdAt" 60 + ] 61 + }, 62 + "description": "defines an image in the gallery" 63 + } 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 + @maxLength(512) title?: string; 12 13 @maxLength(2000) caption?: string; 13 14 width?: numeric; 14 15 height?: numeric;