|
@@ -51,6 +51,18 @@
|
|
: 'general';
|
|
: 'general';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ $: if (selectedTab) {
|
|
|
|
+ // scroll to selectedTab
|
|
|
|
+ scrollToTab(selectedTab);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ const scrollToTab = (tabId) => {
|
|
|
|
+ const tabElement = document.getElementById(tabId);
|
|
|
|
+ if (tabElement) {
|
|
|
|
+ tabElement.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+
|
|
onMount(() => {
|
|
onMount(() => {
|
|
const containerElement = document.getElementById('admin-settings-tabs-container');
|
|
const containerElement = document.getElementById('admin-settings-tabs-container');
|
|
|
|
|
|
@@ -62,6 +74,9 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ // Scroll to the selected tab on mount
|
|
|
|
+ scrollToTab(selectedTab);
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -71,6 +86,7 @@
|
|
class="tabs flex flex-row overflow-x-auto gap-2.5 max-w-full lg:gap-1 lg:flex-col lg:flex-none lg:w-40 dark:text-gray-200 text-sm font-medium text-left scrollbar-none"
|
|
class="tabs flex flex-row overflow-x-auto gap-2.5 max-w-full lg:gap-1 lg:flex-col lg:flex-none lg:w-40 dark:text-gray-200 text-sm font-medium text-left scrollbar-none"
|
|
>
|
|
>
|
|
<button
|
|
<button
|
|
|
|
+ id="general"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 lg:flex-none flex text-right transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 lg:flex-none flex text-right transition {selectedTab ===
|
|
'general'
|
|
'general'
|
|
? ''
|
|
? ''
|
|
@@ -97,6 +113,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="connections"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'connections'
|
|
'connections'
|
|
? ''
|
|
? ''
|
|
@@ -121,6 +138,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="models"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'models'
|
|
'models'
|
|
? ''
|
|
? ''
|
|
@@ -147,6 +165,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="evaluations"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'evaluations'
|
|
'evaluations'
|
|
? ''
|
|
? ''
|
|
@@ -162,6 +181,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="tools"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'tools'
|
|
'tools'
|
|
? ''
|
|
? ''
|
|
@@ -188,6 +208,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="documents"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'documents'
|
|
'documents'
|
|
? ''
|
|
? ''
|
|
@@ -218,6 +239,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="web"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'web'
|
|
'web'
|
|
? ''
|
|
? ''
|
|
@@ -242,6 +264,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="code-execution"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'code-execution'
|
|
'code-execution'
|
|
? ''
|
|
? ''
|
|
@@ -268,6 +291,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="interface"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'interface'
|
|
'interface'
|
|
? ''
|
|
? ''
|
|
@@ -294,6 +318,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="audio"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'audio'
|
|
'audio'
|
|
? ''
|
|
? ''
|
|
@@ -321,6 +346,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="images"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'images'
|
|
'images'
|
|
? ''
|
|
? ''
|
|
@@ -347,6 +373,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="pipelines"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'pipelines'
|
|
'pipelines'
|
|
? ''
|
|
? ''
|
|
@@ -377,6 +404,7 @@
|
|
</button>
|
|
</button>
|
|
|
|
|
|
<button
|
|
<button
|
|
|
|
+ id="db"
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
class="px-0.5 py-1 min-w-fit rounded-lg flex-1 md:flex-none flex text-left transition {selectedTab ===
|
|
'db'
|
|
'db'
|
|
? ''
|
|
? ''
|