mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
icon is incredibly annoying
This commit is contained in:
parent
78a48bae13
commit
420fb1a186
4 changed files with 31 additions and 34 deletions
|
|
@ -161,22 +161,3 @@ registerAction2(class extends Action2 {
|
|||
}
|
||||
})
|
||||
|
||||
// registerAction2(class extends Action2 {
|
||||
// constructor() {
|
||||
// super({
|
||||
// id: 'void.viewSettings',
|
||||
// title: 'Void Settings',
|
||||
// icon: { id: 'settings-gear' },
|
||||
// menu: [{ id: MenuId.ViewTitle, group: 'navigation', when: ContextKeyExpr.equals('view', VOID_VIEW_ID), }]
|
||||
// });
|
||||
// }
|
||||
// async run(accessor: ServicesAccessor): Promise<void> {
|
||||
// const stateService = accessor.get(IVoidSidebarStateService)
|
||||
// const metricsService = accessor.get(IMetricsService)
|
||||
|
||||
// metricsService.capture('Chat Navigation', { type: 'Settings' })
|
||||
|
||||
// stateService.setState({ isHistoryOpen: false, currentTab: stateService.state.currentTab === 'settings' ? 'chat' : 'settings' })
|
||||
// stateService.fireBlurChat()
|
||||
// }
|
||||
// })
|
||||
|
|
|
|||
|
|
@ -37,6 +37,10 @@ import { IHoverService } from '../../../../platform/hover/browser/hover.js';
|
|||
import { mountSidebar } from './react/out/sidebar-tsx/index.js';
|
||||
|
||||
import { getReactServices } from './helpers/reactServicesHelper.js';
|
||||
import { Codicon } from '../../../../base/common/codicons.js';
|
||||
// import { Orientation } from '../../../../base/browser/ui/sash/sash.js';
|
||||
// import { Codicon } from '../../../../base/common/codicons.js';
|
||||
// import { Codicon } from '../../../../base/common/codicons.js';
|
||||
|
||||
|
||||
// compare against search.contribution.ts and debug.contribution.ts, scm.contribution.ts (source control)
|
||||
|
|
@ -90,17 +94,22 @@ class VoidSidebarViewPane extends ViewPane {
|
|||
|
||||
// called VIEWLET_ID in other places for some reason
|
||||
export const VOID_VIEW_CONTAINER_ID = 'workbench.view.void'
|
||||
export const VOID_VIEW_ID = VOID_VIEW_CONTAINER_ID // simplicity
|
||||
export const VOID_VIEW_ID = VOID_VIEW_CONTAINER_ID
|
||||
|
||||
// Register view container
|
||||
const viewContainerRegistry = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry);
|
||||
const viewContainer = viewContainerRegistry.registerViewContainer({
|
||||
const container = viewContainerRegistry.registerViewContainer({
|
||||
id: VOID_VIEW_CONTAINER_ID,
|
||||
title: nls.localize2('void chat', 'Void Chat'), // this is used to say "Void" (Ctrl + L)
|
||||
title: nls.localize2('voidContainer', 'Void'), // this is used to say "Void" (Ctrl + L)
|
||||
ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [VOID_VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]),
|
||||
hideIfEmpty: false,
|
||||
// icon: voidViewIcon,
|
||||
order: 1,
|
||||
|
||||
icon: Codicon.symbolMethod,
|
||||
alwaysUseContainerInfo: true,
|
||||
// alwaysUseContainerInfo: true,
|
||||
// icon: ,
|
||||
|
||||
}, ViewContainerLocation.AuxiliaryBar, { doNotRegisterOpenCommand: true, isDefault: true });
|
||||
|
||||
|
||||
|
|
@ -111,16 +120,19 @@ viewsRegistry.registerViews([{
|
|||
id: VOID_VIEW_ID,
|
||||
hideByDefault: false, // start open
|
||||
// containerIcon: voidViewIcon,
|
||||
name: nls.localize2('chat', 'Chat'), // this says ... : CHAT
|
||||
name: nls.localize2('voidChat', 'Chat'), // this says ... : CHAT
|
||||
ctorDescriptor: new SyncDescriptor(VoidSidebarViewPane),
|
||||
canToggleVisibility: false,
|
||||
canMoveView: true,
|
||||
canMoveView: false, // can't move this out of its container
|
||||
|
||||
// singleViewPaneContainerTitle: 'hi',
|
||||
|
||||
// openCommandActionDescriptor: {
|
||||
// id: viewContainer.id,
|
||||
// id: VOID_VIEW_CONTAINER_ID,
|
||||
// keybindings: {
|
||||
// primary: KeyMod.CtrlCmd | KeyCode.KeyL,
|
||||
// },
|
||||
// order: 1
|
||||
// },
|
||||
}], viewContainer);
|
||||
}], container);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ import './threadHistoryService.js'
|
|||
// register Autocomplete
|
||||
import './autocompleteService.js'
|
||||
|
||||
// register css
|
||||
import './media/void.css'
|
||||
|
||||
// settings pane
|
||||
import './voidSettingsPane.js'
|
||||
|
||||
// register css
|
||||
import './media/void.css'
|
||||
|
|
|
|||
|
|
@ -49,7 +49,11 @@ class VoidSettingsInput extends EditorInput {
|
|||
}
|
||||
|
||||
override getName(): string {
|
||||
return nls.localize('voidSettingsInputsName', "Void Settings");
|
||||
return nls.localize('voidSettingsInputsName', 'Void Settings');
|
||||
}
|
||||
|
||||
override getIcon() {
|
||||
return Codicon.checklist // symbol for the actual editor pane
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -90,7 +94,7 @@ class VoidSettingsPane extends EditorPane {
|
|||
}
|
||||
|
||||
|
||||
|
||||
// register Settings pane
|
||||
Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane).registerEditorPane(
|
||||
EditorPaneDescriptor.create(VoidSettingsPane, VoidSettingsPane.ID, nls.localize('VoidSettingsPane', "Void Settings Pane")),
|
||||
[new SyncDescriptor(VoidSettingsInput)]
|
||||
|
|
@ -98,14 +102,14 @@ Registry.as<IEditorPaneRegistry>(EditorExtensions.EditorPane).registerEditorPane
|
|||
|
||||
|
||||
const OPEN_VOID_SETTINGS_ID = 'workbench.action.openVoidSettings'
|
||||
// Register the gear
|
||||
// register the gear on the top right
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: OPEN_VOID_SETTINGS_ID,
|
||||
title: nls.localize2('voidSettings', "Void: Settings"),
|
||||
f1: true,
|
||||
icon: Codicon.gear,
|
||||
icon: Codicon.settingsGear,
|
||||
menu: [
|
||||
{
|
||||
id: MenuId.LayoutControlMenuSubmenu,
|
||||
|
|
|
|||
Loading…
Reference in a new issue