{t('editor.views.empty')}
@@ -53,6 +80,15 @@ export default function ViewsSection({
onToggleCrop={() =>
setCropOpen(cropOpen === view.id ? null : view.id)
}
+ missingAccess={doc !== null && !hasAccess(doc, view)}
+ onAddAccess={() =>
+ hand({
+ kind: 'access',
+ parentId: view.parent_view_id,
+ viewId: view.id,
+ })
+ }
+ onRecrop={onRecrop}
onDelete={() =>
setDeleting({
key: { kind: 'view', id: view.id },
@@ -62,11 +98,6 @@ export default function ViewsSection({
/>
))}
- {doc && (
-
{t('editor.views.crop.title')}
+ {missingAccess && ( ++ {t('editor.views.no_access').replace( + '{name}', + () => + parents.find((p) => p.value === view.parent_view_id)?.label ?? + '', + )} +