From 040dca3829c817218b4681314d7089cdb2a88d0f Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 5 Jul 2026 04:56:57 +0200 Subject: [PATCH] Added URL as an editable scene field. Fixed plain URL permissions on scene page. --- pages/scene/+Page.vue | 3 ++- pages/scene/edit/+Page.vue | 45 +++++++++++++++++++++----------------- src/scenes.js | 1 + 3 files changed, 28 insertions(+), 21 deletions(-) diff --git a/pages/scene/+Page.vue b/pages/scene/+Page.vue index b5553a7..7fe081d 100644 --- a/pages/scene/+Page.vue +++ b/pages/scene/+Page.vue @@ -52,7 +52,7 @@ [ note: 'Actor-specific tags should only be used where confusion is reasonable, such as group scenes in which some perform anal, and some don\'t.', }, { - key: 'movies', - type: 'movies', - value: scene.value.movies, + key: 'url', + type: 'string', + value: scene.value.url, + enabled: verifyAbility(user, 'scene', 'update'), }, { key: 'title', @@ -316,23 +318,26 @@ const fields = computed(() => [ precision: scene.value.productionDatePrecision, // not currently implemented }, }, - ...(user.role === 'user' - ? [] - : [ - { - key: 'comment', - type: 'text', - placeholder: 'Do NOT use this field to summarize and clarify your revision. This field is for permanent notes and comments regarding the scene or database entry itself.', - value: scene.value.comment, - }, - { - key: 'delete', - type: 'checkbox', - checkboxLabel: 'Remove this scene from the database', - value: false, - }, - ]), -]); + { + key: 'movies', + type: 'movies', + value: scene.value.movies, + }, + { + key: 'comment', + type: 'text', + placeholder: 'Do NOT use this field to summarize and clarify your revision. This field is for permanent notes and comments regarding the scene or database entry itself.', + value: scene.value.comment, + enabled: verifyAbility(user, 'scene', 'update'), + }, + { + key: 'delete', + type: 'checkbox', + checkboxLabel: 'Remove this scene from the database', + value: false, + enabled: verifyAbility(user, 'scene', 'delete'), + }, +].filter((field) => field.enabled !== false)); function simplifyArray(field) { if (Array.isArray(field.value) && field.simplify !== false) { diff --git a/src/scenes.js b/src/scenes.js index d3cf26d..0eae6fb 100644 --- a/src/scenes.js +++ b/src/scenes.js @@ -882,6 +882,7 @@ async function applySceneRevision(revisionIds, reqUser) { 'title', 'description', 'date', + 'url', 'datePrecision', 'duration', 'productionDate',