diff --git a/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java b/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java new file mode 100644 index 000000000..dbb2d69c4 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java @@ -0,0 +1,120 @@ +package com.fr.design.login.message; + +import com.fr.concurrent.NamedThreadFactory; +import com.fr.design.DesignerEnvManager; +import com.fr.design.dialog.NotificationDialog; +import com.fr.design.dialog.NotificationDialogAction; +import com.fr.design.event.DesignerOpenedListener; +import com.fr.design.login.utils.DesignerLoginUtils; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.utils.BrowseUtils; +import com.fr.general.CloudCenter; +import com.fr.general.http.HttpToolbox; +import com.fr.json.JSON; +import com.fr.json.JSONFactory; +import com.fr.json.JSONObject; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.StringUtils; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +/** + * @author Lanlan + * @version 10.0 + * Created by Lanlan on 2021/6/11 + */ +public class DesignerMessageHelper { + + private static final long DELAY = 7L; + private static final String STATUS = "status"; + private static final String DATA = "data"; + private static final String SUCCESS = "success"; + private static final String MESSAGE_ID = "messageId"; + private static final String TITLE = "title"; + private static final String BODY = "body"; + private static final String JUMP_TYPE = "jumpType"; + private static final String JUMP_TO = "jumpTo"; + + private static DesignerMessageHelper instance; + + private DesignerMessageHelper() { + } + + public static DesignerMessageHelper getInstance() { + if (instance == null) { + instance = new DesignerMessageHelper(); + } + return instance; + } + + public void prepareShowMessage() { + DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { + @Override + public void designerOpened() { + ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("DesignerMessageHelper")); + service.schedule(new Runnable() { + @Override + public void run() { + try { + pullLatestMessageAndShow(); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + }, DELAY, TimeUnit.MINUTES); + service.shutdown(); + } + }); + } + + private void pullLatestMessageAndShow() throws Exception { + String url = CloudCenter.getInstance().acquireUrlByKind("designer.message.push", "https://market.fanruan.com/api/v1/message/designer"); + Map params = new HashMap<>(); + params.put("designerId", DesignerEnvManager.getEnvManager().getUUID()); + String result = HttpToolbox.post(url, params); + JSONObject response = JSONFactory.createJSON(JSON.OBJECT, result); + String status = response.optString(STATUS); + if (SUCCESS.equals(status)) { + JSONObject data = response.optJSONObject(DATA); + String messageId = data.optString(MESSAGE_ID); + String title = data.optString(TITLE); + String body = data.optString(BODY); + int jumpType = data.optInt(JUMP_TYPE); + String jumpTo = data.optString(JUMP_TO); + if (StringUtils.isNotEmpty(messageId) && StringUtils.isNotEmpty(title) && StringUtils.isNotEmpty(body) && jumpType > 0 && StringUtils.isNotEmpty(jumpTo)) { + NotificationJumpType notificationJumpType = NotificationJumpType.valueOf(jumpType); + if (notificationJumpType == NotificationJumpType.WEB_URL) { + NotificationDialog.Builder() + .owner(DesignerContext.getDesignerFrame()) + .title(title) + .modal(true) + .messageType(NotificationDialog.NEW_MESSAGE) + .message(body) + .notificationDialogAction(new NotificationDialogAction() { + @Override + public void doClick() { + String ssoUrl = DesignerLoginUtils.generateDesignerSSOUrl(jumpTo); + BrowseUtils.browser(ssoUrl); + } + }) + .build() + .setVisible(true); + } else if (notificationJumpType == NotificationJumpType.DESIGNER_MODULE) { + DesignerModuleClickType designerModuleClickType = DesignerModuleClickType.valueOf(jumpTo); + NotificationDialog.Builder() + .owner(DesignerContext.getDesignerFrame()) + .title(title) + .modal(true) + .messageType(NotificationDialog.NEW_MESSAGE) + .message(body) + .notificationDialogAction(designerModuleClickType.getAction()) + .build() + .setVisible(true); + } + } + } + } +} diff --git a/designer-base/src/main/java/com/fr/design/login/message/DesignerModuleClickType.java b/designer-base/src/main/java/com/fr/design/login/message/DesignerModuleClickType.java new file mode 100644 index 000000000..85b8983f1 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/login/message/DesignerModuleClickType.java @@ -0,0 +1,69 @@ +package com.fr.design.login.message; + +import com.fr.config.ServerPreferenceConfig; +import com.fr.design.dialog.NotificationDialogAction; +import com.fr.design.extra.WebViewDlgHelper; +import com.fr.design.os.impl.SupportOSImpl; +import com.fr.design.upm.UpmFinder; +import com.fr.design.utils.DesignUtils; +import com.fr.log.FineLoggerFactory; +import com.fr.stable.StringUtils; +import com.fr.stable.os.Arch; +import com.fr.stable.os.OperatingSystem; + +/** + * @author Lanlan + * @version 10.0 + * Created by Lanlan on 2021/6/11 + */ +public enum DesignerModuleClickType { + PLUGIN("PLUGIN", new NotificationDialogAction() { + @Override + public void doClick() { + try { + if (Arch.getArch() == Arch.ARM || OperatingSystem.isLinux() || SupportOSImpl.MACOS_WEB_PLUGIN_MANAGEMENT.support()) { + DesignUtils.visitEnvServerByParameters("#management/plugin", null, null); + return; + } + if (ServerPreferenceConfig.getInstance().isUseOptimizedUPM() || SupportOSImpl.MACOS_NEW_PLUGIN_MANAGEMENT.support()) { + UpmFinder.showUPMDialog(); + } else { + WebViewDlgHelper.createPluginDialog(); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + }), + REUSE("REUSE", new NotificationDialogAction() { + @Override + public void doClick() { + try { + // TODO + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + }), + UNKNOWN(StringUtils.EMPTY, new NotificationDialogAction() { + @Override + public void doClick() { + } + }); + + private String jumpTo; + private NotificationDialogAction action; + + DesignerModuleClickType(String jumpTo, NotificationDialogAction action) { + this.jumpTo = jumpTo; + this.action = action; + } + + public String getJumpTo() { + return jumpTo; + } + + public NotificationDialogAction getAction() { + return action; + } +} diff --git a/designer-base/src/main/java/com/fr/design/login/message/NotificationJumpType.java b/designer-base/src/main/java/com/fr/design/login/message/NotificationJumpType.java new file mode 100644 index 000000000..e1b8f04ac --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/login/message/NotificationJumpType.java @@ -0,0 +1,31 @@ +package com.fr.design.login.message; + +/** + * @author Lanlan + * @version 10.0 + * Created by Lanlan on 2021/6/11 + */ +public enum NotificationJumpType { + WEB_URL(1), + DESIGNER_MODULE(2), + UNKNOWN(-1); + + private int jumpType; + + NotificationJumpType(int jumpType) { + this.jumpType = jumpType; + } + + public int getJumpType() { + return jumpType; + } + + public static NotificationJumpType valueOf(int jumpType) { + for(NotificationJumpType value : NotificationJumpType.values()) { + if(value.getJumpType() == jumpType) { + return value; + } + } + return UNKNOWN; + } +} diff --git a/designer-base/src/main/resources/com/fr/design/login/guide.css b/designer-base/src/main/resources/com/fr/design/login/guide.css index 194296aa0..12af5f6c3 100644 --- a/designer-base/src/main/resources/com/fr/design/login/guide.css +++ b/designer-base/src/main/resources/com/fr/design/login/guide.css @@ -4,9 +4,14 @@ font-size: 14px; } .background-guide-close { - color: black !important; - font-weight: bold; - font-size: 16px; + background: url(./img/icon_install_normal.png) no-repeat center center; + background-size: cover; + width: 20px; + height: 20px; + cursor: pointer; +} +.background-guide-close:hover { + background-color: #E8E8E9; } .background-login-loading { background: url(./img/login_loading.gif) no-repeat center center; diff --git a/designer-base/src/main/resources/com/fr/design/login/guide.js b/designer-base/src/main/resources/com/fr/design/login/guide.js index 2dc054d2d..355fb5e5b 100644 --- a/designer-base/src/main/resources/com/fr/design/login/guide.js +++ b/designer-base/src/main/resources/com/fr/design/login/guide.js @@ -1 +1 @@ -!function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t,i){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,i,o){o===undefined&&(o=i),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,o){o===undefined&&(o=i),e[o]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||o(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(2),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),n=i(3);BI.addI18n(Store.i18n),BI.createWidget({type:o.Vertical,element:"body",items:[{type:n["default"]}]})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListView=t.VirtualGroup=t.LeftRightVerticalAdapt=t.Left=t.Horizontal=t.Vertical=t.Absolute=t.Layout=t.Htape=t.CenterAdapt=t.Vtape=t.HorizontalAdapt=t.VerticalAdapt=t.BubbleCombo=t.Img=t.Tab=t.SingleSelectInsertCombo=t.SingleSelectRadioItem=t.MultiTreePopupView=t.Editor=t.NicEditor=t.RichEditor=t.MultiTreeCombo=t.DynamicDateTimeCombo=t.DynamicDateCombo=t.BarPopOver=t.MultiSelectItem=t.TextAreaEditor=t.AllValueChooserCombo=t.ButtonGroup=t.MultiSelectInsertCombo=t.TextEditor=t.Button=t.SignEditor=t.MultiFileEditor=t.SmallTextEditor=t.HtmlLabel=t.Label=t.DownListCombo=t.TextButton=t.IconChangeButton=t.IconButton=t.IconTextIconItem=t.IconTextItem=void 0,t.IconTextItem="bi.icon_text_item",t.IconTextIconItem="bi.icon_text_icon_item",t.IconButton="bi.icon_button",t.IconChangeButton="bi.icon_change_button",t.TextButton="bi.text_button",t.DownListCombo="bi.down_list_combo",t.Label="bi.label",t.HtmlLabel="bi.html_label",t.SmallTextEditor="bi.small_text_editor",t.MultiFileEditor="bi.multifile_editor",t.SignEditor="bi.sign_editor",t.Button="bi.button",t.TextEditor="bi.text_editor",t.MultiSelectInsertCombo="bi.multi_select_insert_combo",t.ButtonGroup="bi.button_group",t.AllValueChooserCombo="bi.all_value_chooser_combo",t.TextAreaEditor="bi.textarea_editor",t.MultiSelectItem="bi.multi_select_item",t.BarPopOver="bi.bar_popover",t.DynamicDateCombo="bi.dynamic_date_combo",t.DynamicDateTimeCombo="bi.dynamic_date_time_combo",t.MultiTreeCombo="bi.multi_tree_combo",t.RichEditor="bi.rich_editor",t.NicEditor="bi.nic_editor",t.Editor="bi.editor",t.MultiTreePopupView="bi.multi_tree_popup_view",t.SingleSelectRadioItem="bi.single_select_radio_item",t.SingleSelectInsertCombo="bi.single_select_insert_combo",t.Tab="bi.tab",t.Img="bi.img",t.BubbleCombo="bi.bubble_combo",t.VerticalAdapt="bi.vertical_adapt",t.HorizontalAdapt="bi.horizontal_adapt",t.Vtape="bi.vtape",t.CenterAdapt="bi.center_adapt",t.Htape="bi.htape",t.Layout="bi.layout",t.Absolute="bi.absolute",t.Vertical="bi.vertical",t.Horizontal="bi.horizontal",t.Left="bi.left",t.LeftRightVerticalAdapt="bi.left_right_vertical_adapt",t.VirtualGroup="bi.virtual_group",t.ListView="bi.list_view"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0);i(4);var n=i(5),r=i(6);t.className="designer.login.guide",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-guide",width:700,height:557},_store:function(){return BI.Models.getModel(r["default"])},render:function(){var e=this;return{type:o.Vertical,items:[{el:{type:o.HorizontalAdapt,items:[{type:o.TextButton,text:String.fromCharCode(10005),cls:"background-guide-close",width:16,height:16,rgap:18,tgap:18,handler:function(){n["default"].closeWindow(e.model.doNotRemind,!1)}}]}},{el:{type:o.Vertical,items:[{type:o.Horizontal,items:[{type:o.MultiSelectItem,lgap:33,width:240,text:BI.i18nText("Designer-Guide_Do_Not_Remind"),handler:function(){e.store.setDoNotRemind(this.isSelected())}},{type:o.TextButton,width:122,height:38,cls:"designer-guide-login-button",text:BI.i18nText("Designer-Guide_Login"),handler:function(){n["default"].closeWindow(e.model.doNotRemind,!0)}}]}]},tgap:460}]}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=window.DesignerGuideHelper,n=function(){function e(){}return e.prototype.closeWindow=function(e,t){o&&o.closeWindow(e,t)},e}();t["default"]=new n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});BI.model("designer.login.guide.model",BI.inherit(Fix.Model,{state:function(){return{doNotRemind:!1}},setDoNotRemind:function(e){this.model.doNotRemind=e}})),t["default"]="designer.login.guide.model"}]); \ No newline at end of file +!function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t,i){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,i,o){o===undefined&&(o=i),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[i]}})}:function(e,t,i,o){o===undefined&&(o=i),e[o]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||t.hasOwnProperty(i)||o(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(2),t)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=i(0),n=i(3);BI.addI18n(Store.i18n),BI.createWidget({type:o.Vertical,element:"body",items:[{type:n["default"]}]})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListView=t.VirtualGroup=t.LeftRightVerticalAdapt=t.Left=t.Horizontal=t.Vertical=t.Absolute=t.Layout=t.Htape=t.CenterAdapt=t.Vtape=t.HorizontalAdapt=t.VerticalAdapt=t.BubbleCombo=t.Img=t.Tab=t.SingleSelectInsertCombo=t.SingleSelectRadioItem=t.MultiTreePopupView=t.Editor=t.NicEditor=t.RichEditor=t.MultiTreeCombo=t.DynamicDateTimeCombo=t.DynamicDateCombo=t.BarPopOver=t.MultiSelectItem=t.TextAreaEditor=t.AllValueChooserCombo=t.ButtonGroup=t.MultiSelectInsertCombo=t.TextEditor=t.Button=t.SignEditor=t.MultiFileEditor=t.SmallTextEditor=t.HtmlLabel=t.Label=t.DownListCombo=t.TextButton=t.IconChangeButton=t.IconButton=t.IconTextIconItem=t.IconTextItem=void 0,t.IconTextItem="bi.icon_text_item",t.IconTextIconItem="bi.icon_text_icon_item",t.IconButton="bi.icon_button",t.IconChangeButton="bi.icon_change_button",t.TextButton="bi.text_button",t.DownListCombo="bi.down_list_combo",t.Label="bi.label",t.HtmlLabel="bi.html_label",t.SmallTextEditor="bi.small_text_editor",t.MultiFileEditor="bi.multifile_editor",t.SignEditor="bi.sign_editor",t.Button="bi.button",t.TextEditor="bi.text_editor",t.MultiSelectInsertCombo="bi.multi_select_insert_combo",t.ButtonGroup="bi.button_group",t.AllValueChooserCombo="bi.all_value_chooser_combo",t.TextAreaEditor="bi.textarea_editor",t.MultiSelectItem="bi.multi_select_item",t.BarPopOver="bi.bar_popover",t.DynamicDateCombo="bi.dynamic_date_combo",t.DynamicDateTimeCombo="bi.dynamic_date_time_combo",t.MultiTreeCombo="bi.multi_tree_combo",t.RichEditor="bi.rich_editor",t.NicEditor="bi.nic_editor",t.Editor="bi.editor",t.MultiTreePopupView="bi.multi_tree_popup_view",t.SingleSelectRadioItem="bi.single_select_radio_item",t.SingleSelectInsertCombo="bi.single_select_insert_combo",t.Tab="bi.tab",t.Img="bi.img",t.BubbleCombo="bi.bubble_combo",t.VerticalAdapt="bi.vertical_adapt",t.HorizontalAdapt="bi.horizontal_adapt",t.Vtape="bi.vtape",t.CenterAdapt="bi.center_adapt",t.Htape="bi.htape",t.Layout="bi.layout",t.Absolute="bi.absolute",t.Vertical="bi.vertical",t.Horizontal="bi.horizontal",t.Left="bi.left",t.LeftRightVerticalAdapt="bi.left_right_vertical_adapt",t.VirtualGroup="bi.virtual_group",t.ListView="bi.list_view"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Widget=t.className=void 0;var o=i(0);i(4);var n=i(5),r=i(6);t.className="designer.login.guide",t.Widget=BI.inherit(BI.Widget,{props:{baseCls:"designer-login-guide",width:700,height:557},_store:function(){return BI.Models.getModel(r["default"])},render:function(){var e=this;return{type:o.Vertical,items:[{el:{type:o.HorizontalAdapt,items:[{type:o.Layout,cls:"background-guide-close",rgap:19,tgap:17,handler:function(){n["default"].closeWindow(e.model.doNotRemind,!1)}}]}},{el:{type:o.Vertical,items:[{type:o.Horizontal,items:[{type:o.MultiSelectItem,lgap:33,width:240,text:BI.i18nText("Designer-Guide_Do_Not_Remind"),handler:function(){e.store.setDoNotRemind(this.isSelected())}},{type:o.TextButton,width:122,height:38,cls:"designer-guide-login-button",text:BI.i18nText("Designer-Guide_Login"),handler:function(){n["default"].closeWindow(e.model.doNotRemind,!0)}}]}]},tgap:460}]}}}),BI.shortcut(t.className,t.Widget),t["default"]=t.className},function(e,t,i){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=window.DesignerGuideHelper,n=function(){function e(){}return e.prototype.closeWindow=function(e,t){o&&o.closeWindow(e,t)},e}();t["default"]=new n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});BI.model("designer.login.guide.model",BI.inherit(Fix.Model,{state:function(){return{doNotRemind:!1}},setDoNotRemind:function(e){this.model.doNotRemind=e}})),t["default"]="designer.login.guide.model"}]); \ No newline at end of file diff --git a/designer-base/src/main/resources/com/fr/design/login/img/icon_install_normal.png b/designer-base/src/main/resources/com/fr/design/login/img/icon_install_normal.png new file mode 100644 index 000000000..a729d7173 Binary files /dev/null and b/designer-base/src/main/resources/com/fr/design/login/img/icon_install_normal.png differ diff --git a/designer-base/src/main/resources/com/fr/design/login/login.css b/designer-base/src/main/resources/com/fr/design/login/login.css index 10dd394f0..30b341c09 100644 --- a/designer-base/src/main/resources/com/fr/design/login/login.css +++ b/designer-base/src/main/resources/com/fr/design/login/login.css @@ -4,9 +4,14 @@ font-size: 14px; } .background-guide-close { - color: black !important; - font-weight: bold; - font-size: 16px; + background: url(./img/icon_install_normal.png) no-repeat center center; + background-size: cover; + width: 20px; + height: 20px; + cursor: pointer; +} +.background-guide-close:hover { + background-color: #E8E8E9; } .background-login-loading { background: url(./img/login_loading.gif) no-repeat center center; @@ -50,9 +55,14 @@ font-size: 14px; } .background-guide-close { - color: black !important; - font-weight: bold; - font-size: 16px; + background: url(./img/icon_install_normal.png) no-repeat center center; + background-size: cover; + width: 20px; + height: 20px; + cursor: pointer; +} +.background-guide-close:hover { + background-color: #E8E8E9; } .background-login-loading { background: url(./img/login_loading.gif) no-repeat center center; @@ -136,9 +146,14 @@ font-size: 14px; } .background-guide-close { - color: black !important; - font-weight: bold; - font-size: 16px; + background: url(./img/icon_install_normal.png) no-repeat center center; + background-size: cover; + width: 20px; + height: 20px; + cursor: pointer; +} +.background-guide-close:hover { + background-color: #E8E8E9; } .background-login-loading { background: url(./img/login_loading.gif) no-repeat center center; @@ -186,9 +201,14 @@ font-size: 14px; } .background-guide-close { - color: black !important; - font-weight: bold; - font-size: 16px; + background: url(./img/icon_install_normal.png) no-repeat center center; + background-size: cover; + width: 20px; + height: 20px; + cursor: pointer; +} +.background-guide-close:hover { + background-color: #E8E8E9; } .background-login-loading { background: url(./img/login_loading.gif) no-repeat center center; diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java index 509055842..29598fa29 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/richText/VanChartRichTextDialog.java @@ -18,7 +18,7 @@ public class VanChartRichTextDialog extends BasicDialog { this.setTitle(Toolkit.i18nText("Fine-Design_Report_RichTextEditor")); this.setBasicDialogSize(DEFAULT); GUICoreUtils.centerWindow(this); - this.setResizable(false); + this.setResizable(true); this.setModal(true); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java b/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java index f93e28426..62570e513 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java @@ -1,5 +1,6 @@ package com.fr.design.mainframe.share.generate.task; +import com.fr.base.TableData; import com.fr.base.iofile.attr.ExtendSharableAttrMark; import com.fr.base.iofile.attr.SharableAttrMark; import com.fr.design.i18n.Toolkit; @@ -21,6 +22,7 @@ import com.fr.workspace.WorkContext; import org.jetbrains.annotations.NotNull; import java.util.HashMap; +import java.util.Iterator; import java.util.Map; /** @@ -91,10 +93,16 @@ public class ComponentCreator extends AbstractComponentCreatorProcessor { FineLoggerFactory.getLogger().error(e.getMessage(), e); } -// //内置数据集 - ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class); - embeddedConverter.convertToEmbeddedTableData(tpl, paraMap); - + //内置数据集 + if (tpl != null) { + ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class); + Map map = embeddedConverter.convertToEmbeddedTableData(tpl, paraMap); + Iterator> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + tpl.putTableData(entry.getKey(), entry.getValue()); + } + } return tpl; } diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index fee4ddaa9..3c9b4dc9d 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -41,6 +41,7 @@ import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.javascript.ProcessTransitionAdapter; import com.fr.design.login.DesignerLoginType; import com.fr.design.login.guide.DesignerGuideHelper; +import com.fr.design.login.message.DesignerMessageHelper; import com.fr.design.login.socketio.LoginAuthServer; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.FormHierarchyTreePane; @@ -141,6 +142,7 @@ public class DesignerActivator extends Activator implements Prepare { public void run() { DesignerPushUpdateManager.getInstance().preparePushUpdate(); DesignerGuideHelper.prepareShowGuideDialog(); + DesignerMessageHelper.getInstance().prepareShowMessage(); } });