|
@@ -18,6 +18,8 @@
|
|
let command = '';
|
|
let command = '';
|
|
let content = '';
|
|
let content = '';
|
|
|
|
|
|
|
|
+ let accessControl = null;
|
|
|
|
+
|
|
$: if (!edit) {
|
|
$: if (!edit) {
|
|
command = title !== '' ? `${title.replace(/\s+/g, '-').toLowerCase()}` : '';
|
|
command = title !== '' ? `${title.replace(/\s+/g, '-').toLowerCase()}` : '';
|
|
}
|
|
}
|
|
@@ -29,7 +31,8 @@
|
|
await onSubmit({
|
|
await onSubmit({
|
|
title,
|
|
title,
|
|
command,
|
|
command,
|
|
- content
|
|
|
|
|
|
+ content,
|
|
|
|
+ access_control: accessControl
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
toast.error(
|
|
toast.error(
|
|
@@ -55,6 +58,8 @@
|
|
|
|
|
|
command = prompt.command.at(0) === '/' ? prompt.command.slice(1) : prompt.command;
|
|
command = prompt.command.at(0) === '/' ? prompt.command.slice(1) : prompt.command;
|
|
content = prompt.content;
|
|
content = prompt.content;
|
|
|
|
+
|
|
|
|
+ accessControl = prompt?.access_control ?? null;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
@@ -137,7 +142,9 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="mt-2">
|
|
<div class="mt-2">
|
|
- <AccessControl />
|
|
|
|
|
|
+ <div class="px-3 py-2 bg-gray-50 dark:bg-gray-950 rounded-lg">
|
|
|
|
+ <AccessControl bind:accessControl />
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="my-4 flex justify-end pb-20">
|
|
<div class="my-4 flex justify-end pb-20">
|