Skip to content

Commit 7c30212

Browse files
committed
增加插件商店
1 parent 95c1aba commit 7c30212

File tree

2 files changed

+438
-29
lines changed

2 files changed

+438
-29
lines changed

iframe/main/index.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<li><button id="delete-btn">删除</button></li>
1717
<li><button id="setting-btn">切换主题</button></li>
1818
<li><button id="SaveinLeft-btn">保存到列表</button></li>
19+
<li><button id="Ext-btn">插件管理</button></li>
1920
<li><button id="ai-btn">AI辅助</button></li>
2021
<li><button id="example-btn">案例</button></li>
2122
<li><button id="about-btn">关于</button></li>
@@ -44,7 +45,7 @@
4445
//初始化Ace 编辑器
4546
const editor = ace.edit('editor');
4647
ACE_Init(editor);
47-
48+
4849
// 注册放大缩小代码支持
4950
let currentFontSize = 14;
5051
ACE_ChangeCodeSize(editor, currentFontSize, showToast);
@@ -56,6 +57,9 @@
5657
const light_theme = document.getElementById('theme-light');
5758
const dark_theme = document.getElementById('theme-dark');
5859
GetTheme(editor, light_theme, dark_theme);
60+
61+
//扫描插件并执行
62+
ExtStore_LoadAndRunAllPlugins();
5963

6064
//加载按钮到左侧
6165
Code_LoadBtnListFromDB(editor);
@@ -97,6 +101,10 @@
97101
eda.sys_Message.showToastMessage('注意,这玩意不会问你是否删除,点一下立马删,三思而后行', 'warn', 3);
98102
Code_OpenDeleteWindow(editor);
99103
});
104+
//保存到插件
105+
document.getElementById('Ext-btn').addEventListener('click', async () => {
106+
showPluginManagerModal(editor,dark_theme);
107+
})
100108
//关于编辑器 - 暂时先跳转GitHub 上架后修改跳转EDA扩展广场
101109
document.getElementById('about-btn').addEventListener('click', async () => {
102110
// await eda.sys_Message.showToastMessage('这个还没写', 'info', 1);

0 commit comments

Comments
 (0)