feat: add artwork caption
This commit is contained in:
parent
66e763eb1c
commit
77003926da
31
backend/pb_migrations/1704952067_updated_artworks.js
Normal file
31
backend/pb_migrations/1704952067_updated_artworks.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/// <reference path="../pb_data/types.d.ts" />
|
||||||
|
migrate((db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId("eo6iaxf4pkeqynf")
|
||||||
|
|
||||||
|
// add
|
||||||
|
collection.schema.addField(new SchemaField({
|
||||||
|
"system": false,
|
||||||
|
"id": "ovwal2or",
|
||||||
|
"name": "caption",
|
||||||
|
"type": "text",
|
||||||
|
"required": false,
|
||||||
|
"presentable": false,
|
||||||
|
"unique": false,
|
||||||
|
"options": {
|
||||||
|
"min": null,
|
||||||
|
"max": null,
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
}))
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
}, (db) => {
|
||||||
|
const dao = new Dao(db)
|
||||||
|
const collection = dao.findCollectionByNameOrId("eo6iaxf4pkeqynf")
|
||||||
|
|
||||||
|
// remove
|
||||||
|
collection.schema.removeField("ovwal2or")
|
||||||
|
|
||||||
|
return dao.saveCollection(collection)
|
||||||
|
})
|
@ -11,7 +11,6 @@ import PageMetadata from "@/components/containers/PageMetadata";
|
|||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import Button from "@/components/ui/Button";
|
import Button from "@/components/ui/Button";
|
||||||
import { useBottomScrollListener } from "react-bottom-scroll-listener";
|
import { useBottomScrollListener } from "react-bottom-scroll-listener";
|
||||||
import loadingIllust from "@/assets/images/l9fsdoa2j7vb1.gif";
|
|
||||||
import { Skeleton } from "@/components/ui/Skeleton";
|
import { Skeleton } from "@/components/ui/Skeleton";
|
||||||
|
|
||||||
const openingChestSfx = new Howl({
|
const openingChestSfx = new Howl({
|
||||||
|
@ -52,6 +52,14 @@ const ViewSheet = ({ modal }: Props) => {
|
|||||||
<ChevronLeft /> Back
|
<ChevronLeft /> Back
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
{data.caption?.length > 0 ? (
|
||||||
|
<div className="my-4 border-b pb-4">
|
||||||
|
{data.caption.split("\n").map((text: string, idx: number) => (
|
||||||
|
<p key={idx}>{text}</p>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<Badge>Artist Name</Badge>
|
<Badge>Artist Name</Badge>
|
||||||
<p className="mt-1 truncate">{data.artistName}</p>
|
<p className="mt-1 truncate">{data.artistName}</p>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user