mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac: styling
This commit is contained in:
parent
9a55547827
commit
384a53b339
6 changed files with 18 additions and 33 deletions
|
|
@ -233,14 +233,4 @@
|
|||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="flex justify-end pt-3 text-sm font-medium">
|
||||
<button
|
||||
class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg"
|
||||
type="submit"
|
||||
>
|
||||
{$i18n.t('Save')}
|
||||
</button>
|
||||
|
||||
</div> -->
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -260,39 +260,34 @@
|
|||
|
||||
const model = atSelectedModel ?? $models.find((m) => m.id === selectedModels[0]);
|
||||
if (model) {
|
||||
// Set Default Tools
|
||||
if (model?.info?.meta?.toolIds) {
|
||||
selectedToolIds = [
|
||||
...new Set(
|
||||
[...(model?.info?.meta?.toolIds ?? [])].filter((id) => $tools.find((t) => t.id === id))
|
||||
)
|
||||
];
|
||||
} else {
|
||||
selectedToolIds = [];
|
||||
}
|
||||
|
||||
// Set Default Filters
|
||||
if (model?.info?.meta?.defaultFilterIds) {
|
||||
console.log('model.info.meta.defaultFilterIds', model.info.meta.defaultFilterIds);
|
||||
console.log(model);
|
||||
selectedFilterIds = model.info.meta.defaultFilterIds;
|
||||
console.log('selectedFilterIds', selectedFilterIds);
|
||||
} else {
|
||||
selectedFilterIds = [];
|
||||
}
|
||||
|
||||
// Set Default Features
|
||||
if (model?.info?.meta?.defaultFeatureIds) {
|
||||
console.log('model.info.meta.defaultFeatureIds', model.info.meta.defaultFeatureIds);
|
||||
imageGenerationEnabled = model.info.meta.defaultFeatureIds.includes('image_generation');
|
||||
webSearchEnabled = model.info.meta.defaultFeatureIds.includes('web_search');
|
||||
codeInterpreterEnabled = model.info.meta.defaultFeatureIds.includes('code_interpreter');
|
||||
if (model.info?.meta?.capabilities?.['image_generation']) {
|
||||
imageGenerationEnabled = model.info.meta.defaultFeatureIds.includes('image_generation');
|
||||
}
|
||||
|
||||
console.log({
|
||||
imageGenerationEnabled,
|
||||
webSearchEnabled,
|
||||
codeInterpreterEnabled
|
||||
});
|
||||
} else {
|
||||
imageGenerationEnabled = false;
|
||||
webSearchEnabled = false;
|
||||
codeInterpreterEnabled = false;
|
||||
if (model.info?.meta?.capabilities?.['web_search']) {
|
||||
webSearchEnabled = model.info.meta.defaultFeatureIds.includes('web_search');
|
||||
}
|
||||
|
||||
if (model.info?.meta?.capabilities?.['code_interpreter']) {
|
||||
codeInterpreterEnabled = model.info.meta.defaultFeatureIds.includes('code_interpreter');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
<div class="flex justify-end pt-1 text-sm font-medium">
|
||||
<button
|
||||
class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-3xl flex flex-row space-x-1 items-center {loading
|
||||
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full {loading
|
||||
? ' cursor-not-allowed'
|
||||
: ''}"
|
||||
type="submit"
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
<div class="flex justify-end pt-1 text-sm font-medium">
|
||||
<button
|
||||
class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-3xl flex flex-row space-x-1 items-center {loading
|
||||
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full {loading
|
||||
? ' cursor-not-allowed'
|
||||
: ''}"
|
||||
type="submit"
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
false)
|
||||
? 'focus:outline focus:outline-2 focus:outline-gray-800 focus:dark:outline-gray-200'
|
||||
: 'outline outline-1 outline-gray-100 dark:outline-gray-800'} {state
|
||||
? ' bg-emerald-600'
|
||||
? ' bg-emerald-500 dark:bg-emerald-700'
|
||||
: 'bg-gray-200 dark:bg-transparent'}"
|
||||
>
|
||||
<Switch.Thumb
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
<div class="flex justify-end pt-3 text-sm font-medium">
|
||||
<button
|
||||
class=" px-4 py-2 bg-emerald-700 hover:bg-emerald-800 text-gray-100 transition rounded-lg flex flex-row space-x-1 items-center"
|
||||
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full"
|
||||
type="submit"
|
||||
>
|
||||
{$i18n.t('Done')}
|
||||
|
|
|
|||
Loading…
Reference in a new issue