mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: tags (#11980)
* feat: tags * fix: folder tree icons * navigate to tag from detail panel * delete tag * Tag position and add tag button * Tag asset in detail panel * refactor form * feat: navigate to tag page from clicking on a tag * feat: delete tags from the tag page * refactor: moving tag section in detail panel and add + tag button * feat: tag asset action in detail panel * refactor add tag form * fdisable add tag button when there is no selection * feat: tag bulk endpoint * feat: tag colors * chore: clean up * chore: unit tests * feat: write tags to sidecar * Remove tag and auto focus on tag creation form opened * chore: regenerate migration * chore: linting * add color picker to tag edit form * fix: force render tags timeline on navigating back from asset viewer * feat: read tags from keywords * chore: clean up --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
682adaa334
commit
d08a20bd57
68 changed files with 3032 additions and 814 deletions
|
|
@ -259,6 +259,17 @@ WHERE
|
|||
AND ("StackEntity"."ownerId" = $2)
|
||||
)
|
||||
|
||||
-- AccessRepository.tag.checkOwnerAccess
|
||||
SELECT
|
||||
"TagEntity"."id" AS "TagEntity_id"
|
||||
FROM
|
||||
"tags" "TagEntity"
|
||||
WHERE
|
||||
(
|
||||
("TagEntity"."id" IN ($1))
|
||||
AND ("TagEntity"."userId" = $2)
|
||||
)
|
||||
|
||||
-- AccessRepository.timeline.checkPartnerAccess
|
||||
SELECT
|
||||
"partner"."sharedById" AS "partner_sharedById",
|
||||
|
|
|
|||
|
|
@ -184,10 +184,12 @@ SELECT
|
|||
"AssetEntity__AssetEntity_smartInfo"."tags" AS "AssetEntity__AssetEntity_smartInfo_tags",
|
||||
"AssetEntity__AssetEntity_smartInfo"."objects" AS "AssetEntity__AssetEntity_smartInfo_objects",
|
||||
"AssetEntity__AssetEntity_tags"."id" AS "AssetEntity__AssetEntity_tags_id",
|
||||
"AssetEntity__AssetEntity_tags"."type" AS "AssetEntity__AssetEntity_tags_type",
|
||||
"AssetEntity__AssetEntity_tags"."name" AS "AssetEntity__AssetEntity_tags_name",
|
||||
"AssetEntity__AssetEntity_tags"."value" AS "AssetEntity__AssetEntity_tags_value",
|
||||
"AssetEntity__AssetEntity_tags"."createdAt" AS "AssetEntity__AssetEntity_tags_createdAt",
|
||||
"AssetEntity__AssetEntity_tags"."updatedAt" AS "AssetEntity__AssetEntity_tags_updatedAt",
|
||||
"AssetEntity__AssetEntity_tags"."color" AS "AssetEntity__AssetEntity_tags_color",
|
||||
"AssetEntity__AssetEntity_tags"."userId" AS "AssetEntity__AssetEntity_tags_userId",
|
||||
"AssetEntity__AssetEntity_tags"."renameTagId" AS "AssetEntity__AssetEntity_tags_renameTagId",
|
||||
"AssetEntity__AssetEntity_tags"."parentId" AS "AssetEntity__AssetEntity_tags_parentId",
|
||||
"AssetEntity__AssetEntity_faces"."id" AS "AssetEntity__AssetEntity_faces_id",
|
||||
"AssetEntity__AssetEntity_faces"."assetId" AS "AssetEntity__AssetEntity_faces_assetId",
|
||||
"AssetEntity__AssetEntity_faces"."personId" AS "AssetEntity__AssetEntity_faces_personId",
|
||||
|
|
|
|||
30
server/src/queries/tag.repository.sql
Normal file
30
server/src/queries/tag.repository.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
-- NOTE: This file is auto generated by ./sql-generator
|
||||
|
||||
-- TagRepository.getAssetIds
|
||||
SELECT
|
||||
"tag_asset"."assetsId" AS "assetId"
|
||||
FROM
|
||||
"tag_asset" "tag_asset"
|
||||
WHERE
|
||||
"tag_asset"."tagsId" = $1
|
||||
AND "tag_asset"."assetsId" IN ($2)
|
||||
|
||||
-- TagRepository.addAssetIds
|
||||
INSERT INTO
|
||||
"tag_asset" ("assetsId", "tagsId")
|
||||
VALUES
|
||||
($1, $2)
|
||||
|
||||
-- TagRepository.removeAssetIds
|
||||
DELETE FROM "tag_asset"
|
||||
WHERE
|
||||
(
|
||||
"tagsId" = $1
|
||||
AND "assetsId" IN ($2)
|
||||
)
|
||||
|
||||
-- TagRepository.upsertAssetIds
|
||||
INSERT INTO
|
||||
"tag_asset" ("assetsId", "tagsId")
|
||||
VALUES
|
||||
($1, $2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue