Skip to content

Commit

Permalink
chore(web): fix function list display count, disable LSP by default
Browse files Browse the repository at this point in the history
  • Loading branch information
HUAHUAI23 committed Jun 27, 2024
1 parent bbf3eb1 commit 4af8c90
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"FuncListDisplay": "Function List Display",
"ListDisplay": "List Display",
"EditorLanguageServer": "Editor Language Server",
"isOpenLanguageServer": "Enable typescript language server (only effective when the spec of the app is above 0.5C 1G)",
"isOpenLanguageServer": "Enable typescript language server (only effective when the spec of the app is above 1C 2G)",
"Editor": "Editor",
"FuncList": "Function List",
"EditorMode": "Editor Mode",
Expand Down
2 changes: 1 addition & 1 deletion web/public/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"FuncListDisplay": "函数列表显示",
"ListDisplay": "列表显示",
"EditorLanguageServer": "编辑器语言服务",
"isOpenLanguageServer": "是否开启 TypeScript 语言服务(体验更好的类型提示,仅在应用配置高于 0.5C 1G 时生效)",
"isOpenLanguageServer": "是否开启 TypeScript 语言服务(体验更好的类型提示,仅在应用配置高于 1C 2G 时生效)",
"Editor": "编辑器",
"FuncList": "函数列表",
"EditorMode": "使用编辑器模式",
Expand Down
2 changes: 1 addition & 1 deletion web/public/locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
"FuncListDisplay": "函数列表显示",
"ListDisplay": "列表显示",
"EditorLanguageServer": "编辑器语言服务",
"isOpenLanguageServer": "是否开启 TypeScript 语言服务(体验更好的类型提示,仅在应用配置高于 0.5C 1G 时生效)",
"isOpenLanguageServer": "是否开启 TypeScript 语言服务(体验更好的类型提示,仅在应用配置高于 1C 2G 时生效)",
"Editor": "编辑器",
"FuncList": "函数列表",
"EditorMode": "使用编辑器模式",
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/app/functions/mods/FunctionPanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ export default function FunctionList() {
title={
<div className="flex">
{t`FunctionPanel.FunctionList`}
{filterFunctions.length ? (
{allFunctionList.length ? (
<Badge rounded={"full"} ml="1">
{filterFunctions.length}
{allFunctionList.length}
</Badge>
) : null}
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/customSetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ const useCustomSettingStore = create<State>()(
commonSettings: {
fontSize: 14,
funcListDisplay: "name",
useLSP: true,
useCopilot: true,
useLSP: false,
useCopilot: false,
},

setCommonSettings: (settings) => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/globalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ const useGlobalStore = create<State>()(
set((state) => {
state.currentApp = app;
state.isLSPEffective =
app?.bundle?.resource?.limitCPU! / 1000 >= 0.5 &&
app?.bundle?.resource.limitMemory / 1024 >= 1;
app?.bundle?.resource?.limitCPU! / 1000 >= 1 &&
app?.bundle?.resource.limitMemory / 1024 >= 2;

if (typeof state.currentApp === "object") {
const host = `${
Expand Down

0 comments on commit 4af8c90

Please sign in to comment.