Skip to content

Commit

Permalink
Add note to uploader and ACL editor when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
owi92 committed Dec 16, 2024
1 parent f8d633f commit 3d53a9f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/i18n/locales/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ user:
manage-content: Verwalten

login-page:
heading: Anmeldung
heading: Anmeldung
user-id: Nutzerkennung
password: Passwort
bad-credentials: 'Anmeldung fehlgeschlagen: Falsche Anmeldedaten.'
Expand Down Expand Up @@ -341,6 +341,8 @@ manage:
Änderung der Berechtigungen ist zurzeit nicht möglich, da das Video im Hintergrund verarbeitet wird.
<br />
Bitte versuchen Sie es später nochmal.
locked-to-series: >
Die Berechtigungen dieses Videos werden durch seine Serie bestimmt und können daher nicht bearbeitet werden.
users-no-options:
initial-searchable: Nach Name suchen oder exakten Nutzernamen/exakte E-Mail angeben
none-found-searchable: Keine Personen gefunden
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/locales/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ manage:
Changing the access policy is not possible at this time, since the video is being processed in the background.
<br />
Please try again later.
locked-to-series: >
The access policy of this video is determined by its series and can't be edited.
users-no-options:
initial-searchable: Type to search for users by name (or enter exact email/username)
none-found-searchable: No user found
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/routes/Upload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,15 @@ const MetaDataEdit: React.FC<MetaDataEditProps> = ({ onSave, disabled, knownRole
marginBottom: 12,
fontSize: 22,
}}>{t("manage.my-videos.acl.title")}</h2>
{lockedAcl.size > 0 && (
<Card kind="info" iconPos="left" css={{
maxWidth: 700,
fontSize: 14,
marginBottom: 10,
}}>
{t("manage.access.locked-to-series")}
</Card>
)}
<div {...lockedAcl.size > 0 && { inert: "true" }} css={{
...lockedAcl.size > 0 && { opacity: .7 },
}}>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/routes/manage/Video/Access.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ type AccessUIProps = {
}

const AccessUI: React.FC<AccessUIProps> = ({ event, knownRoles }) => {
const { t } = useTranslation();
const saveModalRef = useRef<ConfirmationModalHandle>(null);
const [commitError, setCommitError] = useState<JSX.Element | null>(null);
const [commit, inFlight] = useMutation<AccessUpdateAclMutation>(updateVideoAcl);
Expand Down Expand Up @@ -144,6 +145,11 @@ const AccessUI: React.FC<AccessUIProps> = ({ event, knownRoles }) => {
{event.hasActiveWorkflows && <Card kind="info" css={{ marginBottom: 20 }}>
<Trans i18nKey="manage.access.workflow-active" />
</Card>}
{aclLockedToSeries && (
<Card kind="info" iconPos="left" css={{ fontSize: 14, marginBottom: 10 }}>
{t("manage.access.locked-to-series")}
</Card>
)}
<div css={{ maxWidth: 1040 }}>
<div css={{
display: "flex",
Expand Down

0 comments on commit 3d53a9f

Please sign in to comment.