gpts: show provider logo on active dropdown item

This commit is contained in:
end-4
2025-04-06 16:50:29 +02:00
parent 17a0679959
commit be8fd15e92
+5 -1
View File
@@ -57,13 +57,17 @@ const ProviderSwitcher = () => {
setup: setupCursorHover, setup: setupCursorHover,
}); });
} }
let indicatorIcon = Icon({
icon: GPTService.providers[userOptions.ai.defaultGPTProvider]['logo_name'],
className: 'txt-large'
});
const indicatorChevron = MaterialIcon('expand_more', 'norm'); const indicatorChevron = MaterialIcon('expand_more', 'norm');
const indicatorButton = Button({ const indicatorButton = Button({
tooltipText: getString('Select ChatGPT-compatible API provider'), tooltipText: getString('Select ChatGPT-compatible API provider'),
child: Box({ child: Box({
className: 'spacing-h-10 txt', className: 'spacing-h-10 txt',
children: [ children: [
MaterialIcon('cloud', 'norm'), indicatorIcon,
Label({ Label({
hexpand: true, hexpand: true,
xalign: 0, xalign: 0,