Timothy Jaeryang Baek 5 月之前
父节点
当前提交
931e03bd9e

+ 3 - 8
src/lib/components/workspace/Models/ModelEditor.svelte

@@ -353,13 +353,13 @@
 								<img
 									src={info.meta.profile_image_url}
 									alt="model profile"
-									class="rounded-lg size-72 md:size-64 object-cover shrink-0"
+									class="rounded-lg size-72 md:size-60 object-cover shrink-0"
 								/>
 							{:else}
 								<img
 									src="/static/favicon.png"
 									alt="model profile"
-									class=" rounded-lg size-72 md:size-64 object-cover shrink-0"
+									class=" rounded-lg size-72 md:size-60 object-cover shrink-0"
 								/>
 							{/if}
 
@@ -498,12 +498,7 @@
 
 					<div class="my-2">
 						<div class="px-3 py-2 bg-gray-50 dark:bg-gray-950 rounded-lg">
-							<AccessControl
-								{accessControl}
-								onChange={(_accessControl) => {
-									accessControl = _accessControl;
-								}}
-							/>
+							<AccessControl bind:accessControl />
 						</div>
 					</div>
 

+ 9 - 2
src/lib/components/workspace/Prompts/PromptEditor.svelte

@@ -18,6 +18,8 @@
 	let command = '';
 	let content = '';
 
+	let accessControl = null;
+
 	$: if (!edit) {
 		command = title !== '' ? `${title.replace(/\s+/g, '-').toLowerCase()}` : '';
 	}
@@ -29,7 +31,8 @@
 			await onSubmit({
 				title,
 				command,
-				content
+				content,
+				access_control: accessControl
 			});
 		} else {
 			toast.error(
@@ -55,6 +58,8 @@
 
 			command = prompt.command.at(0) === '/' ? prompt.command.slice(1) : prompt.command;
 			content = prompt.content;
+
+			accessControl = prompt?.access_control ?? null;
 		}
 	});
 </script>
@@ -137,7 +142,9 @@
 		</div>
 
 		<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 class="my-4 flex justify-end pb-20">