Kaynağa Gözat

Merge pull request #14772 from silentoplayz/fix-save-for-LDAP

Fix: Ensure Consistent LDAP Settings Save
Tim Jaeryang Baek 4 ay önce
ebeveyn
işleme
ffe7bdd213

+ 2 - 6
src/lib/components/admin/Settings/General.svelte

@@ -79,6 +79,7 @@
 	const updateHandler = async () => {
 		webhookUrl = await updateWebhookUrl(localStorage.token, webhookUrl);
 		const res = await updateAdminConfig(localStorage.token, adminConfig);
+		await updateLdapConfig(localStorage.token, ENABLE_LDAP);
 		await updateLdapServerHandler();
 
 		if (res) {
@@ -401,12 +402,7 @@
 								<div class="  font-medium">{$i18n.t('LDAP')}</div>
 
 								<div class="mt-1">
-									<Switch
-										bind:state={ENABLE_LDAP}
-										on:change={async () => {
-											updateLdapConfig(localStorage.token, ENABLE_LDAP);
-										}}
-									/>
+									<Switch bind:state={ENABLE_LDAP} />
 								</div>
 							</div>
 

+ 1 - 1
src/lib/components/playground/Chat/Message.svelte

@@ -52,7 +52,7 @@
 
 	<div class=" pt-1">
 		<button
-			class=" group-hover:text-gray-500 dark:text-gray-900 dark:hover:text-gray-300 transition"
+			class=" group-hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-300 transition"
 			on:click={() => {
 				onDelete();
 			}}