Skip to content

Commit cc897be

Browse files
author
guqiankun.gqk
committed
chore: 移除终端相关菜单首选项
1 parent da55509 commit cc897be

4 files changed

Lines changed: 109 additions & 0 deletions

File tree

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// @opensumi/ide-core-browser/lib/style/normilize.less
2+
html,
3+
body {
4+
margin: 0;
5+
padding: 0;
6+
// 使用该字体获取与vscode一致的图标表现
7+
// 仅mac下可用,windows待区分
8+
// https://stackoverflow.com/questions/32660748/how-to-use-apples-new-san-francisco-font-on-a-webpage
9+
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
10+
// 全局默认字体颜色
11+
color: var(--foreground);
12+
background-color: var(--editor-background);
13+
font-size: var(--base-font-size);
14+
// 设置 antialiased 会导致整体清晰度降低
15+
// -webkit-font-smoothing: antialiased;
16+
}
17+
18+
:root {
19+
--base-font-size: 13px;
20+
--tabBar-height: 35px;
21+
}
22+
23+
html {
24+
// /* 防止 overlay/modal 撑开页面元素 */
25+
// overflow: hidden;
26+
// /* 防止mac上的回退手势 */
27+
// overscroll-behavior-x: none;
28+
29+
input::placeholder,
30+
textarea::placeholder {
31+
color: var(--input-placeholder-foreground);
32+
}
33+
34+
// 全局设置滚动条样式
35+
// ::-webkit-scrollbar {
36+
// background: transparent;
37+
// width: 10px;
38+
// height: 10px;
39+
// }
40+
41+
// ::-webkit-scrollbar:hover {
42+
// background: transparent;
43+
// }
44+
45+
// ::-webkit-scrollbar-thumb {
46+
// background: var(--scrollbarSlider-background);
47+
// }
48+
49+
// ::-webkit-scrollbar-thumb:hover {
50+
// background: var(--scrollbarSlider-hoverBackground);
51+
// }
52+
53+
// ::-webkit-scrollbar-thumb:active {
54+
// background: var(--scrollbarSlider-activeBackground);
55+
// }
56+
57+
// ::-webkit-scrollbar-corner {
58+
// background: transparent;
59+
// }
60+
61+
a {
62+
color: var(--textLink-foreground);
63+
64+
&:hover,
65+
&:active,
66+
&:focus {
67+
color: var(--textLink-activeForeground);
68+
}
69+
}
70+
71+
blockquote {
72+
background-color: var(--textBlockQuote-background);
73+
border-color: var(--textBlockQuote-border);
74+
}
75+
76+
// code {
77+
// background-color: var(--textCodeBlock-background);
78+
// }
79+
80+
li {
81+
list-style: none;
82+
}
83+
}
84+
85+
/* ---- 该样式主要用于让带 tabindex='-1' 的元素焦点态时拥有高亮边框,以便于实现如Tree,List组件焦点态时的自动高亮边框效果 ---- */
86+
[tabindex='-1'] {
87+
&:focus {
88+
outline-width: 1px;
89+
outline-style: solid;
90+
outline-offset: -1px;
91+
}
92+
}
93+
/* -------- */

packages/core/src/client/custom/menu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ import { MenuContribution, IMenuRegistry, MenuId } from '@opensumi/ide-core-brow
66
export class MenuConfigContribution implements MenuContribution {
77
registerMenus(menuRegistry: IMenuRegistry) {
88
menuRegistry.removeMenubarItem(MenuId.MenubarHelpMenu);
9+
menuRegistry.removeMenubarItem(MenuId.MenubarTerminalMenu);
910
}
1011
}

packages/core/src/client/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import {
2929
import { EditorEmptyContribution } from './editor-empty/editor-empty.contribution';
3030
import { WelcomeContribution } from './welcome/welcome.contributon';
3131
import { FileSchemeContribution } from './file-scheme/index.contribution';
32+
import { PreferenceSettingContribution } from './preference/preference.setting.contribution';
33+
3234
import {
3335
MonacoCodeService,
3436
IMonacoCodeService,
@@ -68,6 +70,7 @@ export class ClientModule extends BrowserModule {
6870
MenuConfigContribution,
6971
FileSchemeContribution,
7072
SearchContribution,
73+
PreferenceSettingContribution,
7174
{
7275
token: MonacoCodeService,
7376
useValue: codeServiceEditor,
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { SettingContribution, PreferenceSettingId } from '@opensumi/ide-preferences';
2+
import { Domain, ISettingGroup } from '@opensumi/ide-core-browser';
3+
4+
@Domain(SettingContribution)
5+
export class PreferenceSettingContribution implements SettingContribution {
6+
// 移除默认终端首选项
7+
handleSettingGroup(settingGroup: ISettingGroup[]) {
8+
return settingGroup.filter((group) => {
9+
return group.id !== PreferenceSettingId.Terminal;
10+
});
11+
}
12+
}

0 commit comments

Comments
 (0)