diff --git a/public/index.html b/public/index.html index e74cfd6f2..98fcf829b 100755 --- a/public/index.html +++ b/public/index.html @@ -14,7 +14,7 @@ - + @@ -35,7 +35,7 @@ - + <%= htmlWebpackPlugin.tags.bodyTags %> diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index cfc3257a7..830681199 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -457,7 +457,7 @@ function CoderDepot(props){ } - Web IDE
+ Web IDE
diff --git a/src/forge/Newfile/codeReview/ideLogo.bak.svg b/src/forge/Newfile/codeReview/ideLogo.bak.svg new file mode 100644 index 000000000..8e0a4669e --- /dev/null +++ b/src/forge/Newfile/codeReview/ideLogo.bak.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/forge/Newfile/codeReview/ideLogo.svg b/src/forge/Newfile/codeReview/ideLogo.svg index 8e0a4669e..87d4e3ba7 100644 --- a/src/forge/Newfile/codeReview/ideLogo.svg +++ b/src/forge/Newfile/codeReview/ideLogo.svg @@ -1,20 +1,14 @@ - + - - - + + + - - - - - - - - - - + + + + diff --git a/src/forge/Newfile/index.scss b/src/forge/Newfile/index.scss index a00fd24a3..25d802bf9 100644 --- a/src/forge/Newfile/index.scss +++ b/src/forge/Newfile/index.scss @@ -4,8 +4,13 @@ .alex-root{ position: fixed; + + color: var(--foreground); + background-color: var(--editor-background); + font-size: var(--base-font-size); } .ide-overlay .quick-open-overlay quick-open-container{ top: 0px!important; -} \ No newline at end of file +} + diff --git a/src/forge/Newfile/module/EmptyPage.jsx b/src/forge/Newfile/module/EmptyPage.jsx new file mode 100644 index 000000000..76b992e85 --- /dev/null +++ b/src/forge/Newfile/module/EmptyPage.jsx @@ -0,0 +1,9 @@ +import react from 'react'; + +function EmptyPage(){ + return
+ 11111 +
+} + +export default EmptyPage; \ No newline at end of file diff --git a/src/forge/Newfile/module/Welcome.jsx b/src/forge/Newfile/module/Welcome.jsx new file mode 100644 index 000000000..64af800ff --- /dev/null +++ b/src/forge/Newfile/module/Welcome.jsx @@ -0,0 +1,27 @@ +import React from 'react'; +import './welcome.scss'; +import ideLogo from '../codeReview/ideLogo.svg'; + + +function Welcome() { + return (
+
+ +
+

WebIDE功能特性

+
+

1. 语言服务

+

● 支持近 40 种语言的语法高亮
● 支持 JavaScript/TypeScript、HTML、CSS、JSON、Markdown 的基于 LSP (Language Server Protocol) 语言特性功能,具备智能提示和大纲信息以及单文件内跳转。
● 支持 Java、Go、Python、C++、Php 的基于 Tree Sitter 的在线语言服务能力,提供查看引用、符号搜索等特性

+

2. 分支

支持分支切换:点击左下角分支名即可切换分支。

+

3. 搜索

当前支持 Gitlink 仓库内代码搜索(支持单词匹配和文件过滤)和文件搜索。

+

4. 行高亮

支持单行或多行高亮,点击行号即可高亮行,按住 Shift 可选中连续多行。

+

5. Blame

支持查看单行 blame 信息,hover 后可展示详细信息。

+

6. Graph

支持 graph 视图,可查看分支 commits 历史以及每个 commit 详细文件变更,并支持文件 diff 查看。底部状态栏左下角点击 Git Graph 或在命令面板输入 View Git Graph,即可打开 Git Graph 视图。

+

7. WebSCM

可以在极速版新建分支,修改代码后在 SCM 面板看到变更文件列表,写完 commit message 后提交到 Gitlink 上。如果想快速修改一些文件可以不用在本地修改,直接通过极速版修改代码一次性提

+

8. 代码在线运行

● 集成了基于 skypack 的更加轻量的 CodeSwing 插件,可以在极速版去运行前端代码。
+ ● 集成了基于 PyodideCode-Runner-For-Web 插件,可以将 Python 的运行搬到浏览器上。

+
+
) +} + +export default Welcome; \ No newline at end of file diff --git a/src/forge/Newfile/module/welcome.scss b/src/forge/Newfile/module/welcome.scss new file mode 100644 index 000000000..e91191ad3 --- /dev/null +++ b/src/forge/Newfile/module/welcome.scss @@ -0,0 +1,23 @@ +.kt_editor_background___Hnmig { + overflow-y: scroll; +} + +.welcome { + padding: 3% 4%; + + h1,h2,h3,p{ + color: var(--foreground); + background-color: var(--editor-background); + // font-size: var(--base-font-size); + } + + + .text-center { + text-align: center; + } + + .welcome-logo { + width: 150px; + // margin-bottom: 20px; + } +} \ No newline at end of file diff --git a/src/forge/Newfile/webIDE.jsx b/src/forge/Newfile/webIDE.jsx index a214b6132..f0feddd0b 100644 --- a/src/forge/Newfile/webIDE.jsx +++ b/src/forge/Newfile/webIDE.jsx @@ -29,6 +29,7 @@ import * as AlexApp from './plugins/alex-app.plugin'; // import { StartupModule } from './module/Startup.module' // import { ToobarModule } from './module/ToolBar.module'; +import Welcome from './module/Welcome'; import './index.scss'; @@ -70,27 +71,15 @@ const layoutConfig = { }, }; -// const platformConfig = { -// gitlink: { -// owner: 'Gitlink', -// name: 'forgeplus', -// refPath: '', -// commit: '', -// }, -// }; + const platform = 'gitlink'; -// let pathParts = location.pathname.split('/').filter(Boolean); -// const config = platformConfig[platform]; -// if (pathParts[1]) { -// config.owner = pathParts[1]; -// } -// if (pathParts[2]) { -// config.name = pathParts[2]; -// } -// config.refPath = pathParts.slice(3).join('/'); const WebIDE = ( props) => { const { match: { params: { owner, projectsId, branchName } }, } = props; + let origin=window.location.origin; + if(origin.indexOf('localhost')>-1){ + origin='https://testforgeplus.trustie.net'; + } return ( { // gitlens插件的头像在本地开发会无法展示 // endpoint: '/code-service', // endpoint:'' - origin: 'https://testforgeplus.trustie.net', - endpoint: 'https://testforgeplus.trustie.net' + origin: origin, + endpoint: origin }, }), CodeAPIModule, @@ -152,6 +141,8 @@ const WebIDE = ( props) => { biz: 'alex', // scm文件树 scmFileTree: true, + EditorEmpty: Welcome, + WelcomePage: Welcome }} /> )}; diff --git a/src/forge/Wiki/Index.scss b/src/forge/Wiki/Index.scss index ac17f9cc9..f50ef078f 100644 --- a/src/forge/Wiki/Index.scss +++ b/src/forge/Wiki/Index.scss @@ -349,6 +349,7 @@ body { .copy-desc { width: 6rem; padding-top: 1px; + flex:none } }