Added URL as an editable scene field. Fixed plain URL permissions on scene page.

This commit is contained in:
2026-07-05 04:56:57 +02:00
parent 8674c1d361
commit 040dca3829
3 changed files with 28 additions and 21 deletions

View File

@@ -253,6 +253,7 @@ import EditMovies from '#/components/edit/movies.vue';
import Checkbox from '#/components/form/checkbox.vue';
import { post } from '#/src/api.js';
import verifyAbility from '#/utils/verify-ability.js';
const pageContext = inject('pageContext');
@@ -273,9 +274,10 @@ const fields = computed(() => [
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) {