Browse Source

Pull request #7931: REPORT-66465 【组件商城风格优化】设计器商城,概率打开空白

Merge in DESIGN/design from ~STARRYI/design:release/11.0 to release/11.0

* commit '50754f75d2611da9e5265d3eaa819b3b073083ae':
  REPORT-66807 Mini商城窗口启动来源埋点
  REPORT-66465 【组件商城风格优化】设计器商城,概率打开空白
bugfix/11.0
starryi 3 years ago
parent
commit
3b805789bd
  1. 14
      designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java
  3. 4
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java

14
designer-base/src/main/java/com/fr/design/ui/compatible/NewModernUIPane.java

@ -17,8 +17,11 @@ import com.teamdev.jxbrowser.engine.EngineOptions;
import com.teamdev.jxbrowser.engine.RenderingMode;
import com.teamdev.jxbrowser.event.Observer;
import com.teamdev.jxbrowser.js.JsObject;
import com.teamdev.jxbrowser.net.Network;
import com.teamdev.jxbrowser.net.Scheme;
import com.teamdev.jxbrowser.net.callback.VerifyCertificateCallback;
import com.teamdev.jxbrowser.view.swing.BrowserView;
import org.jetbrains.annotations.Nullable;
import java.awt.BorderLayout;
@ -108,6 +111,17 @@ public class NewModernUIPane<T> extends ModernUIPane<T> {
}
Engine engine = Engine.newInstance(builder.build());
if (DesignerEnvManager.getEnvManager().isOpenDebug()) {
// 调试模式下,禁止HTTPS证书验证,使得可以正常访问商城测试服务器等
Network network = engine.network();
network.set(VerifyCertificateCallback.class, new VerifyCertificateCallback() {
@Nullable
@Override
public Response on(Params params) {
return VerifyCertificateCallback.Response.valid();
}
});
}
browser = engine.newBrowser();
// 初始化的时候,就把命名空间对象初始化好,确保window.a.b.c("a.b.c"为命名空间)对象都是初始化过的

2
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java

@ -104,7 +104,7 @@ public class OnlineWidgetTabPane extends JPanel {
@Override
public void actionPerformed(ActionEvent e) {
if (OnlineShopUtils.testConnection() && ComponentShareUtil.isShowMiniShopWindow()) {
MiniComponentShopDialog.getInstance().show();
MiniComponentShopDialog.getInstance().showFromOnlineRepoPane();
FormWidgetDetailPane.getInstance().switch2Local();
FormWidgetDetailPane.getInstance().enterWidgetLib();
} else {

4
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/mini/MiniComponentShopDialog.java

@ -110,6 +110,10 @@ public class MiniComponentShopDialog {
frame.setVisible(true);
}
public void showFromOnlineRepoPane() {
show();
}
public Container getContentPane() {
if (frame != null) {
return frame.getContentPane();

Loading…
Cancel
Save