From 09f268e4b58cc36a5530c125492ccdf9fa2f0c8c Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 11 Jun 2021 14:40:22 +0800 Subject: [PATCH 01/11] =?UTF-8?q?REPORT-52871=20=E8=81=9A=E5=90=88?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E9=83=A8=E5=88=86=E5=86=85=E5=AE=B9=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=EF=BC=8C=E7=82=B9=E5=87=BB=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E6=89=8D=E5=8F=AF=E6=98=BE=E7=A4=BA=E5=AE=8C=E5=85=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/poly/creator/PolyElementCasePane.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java b/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java index af6918de2e..cf93aa74aa 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/PolyElementCasePane.java @@ -13,12 +13,18 @@ import com.fr.report.poly.PolyECBlock; */ public abstract class PolyElementCasePane extends ElementCasePane { + /** + * 水平方向在一个屏幕内可见的可扩展的列数 + */ + private static final int HORIZONTAL_EXTENT_VALUE = 200; + public PolyElementCasePane(PolyECBlock block) { super(block); setSelection(new CellSelection(0, 0, 1, 1)); // 都不加这两个组件,当然他们也就没可见性了 setHorizontalScrollBarVisible(false); setVerticalScrollBarVisible(false); + this.getGrid().setHorizontalExtent(HORIZONTAL_EXTENT_VALUE); } @Override From fd16e0c71fd27a2c916bec7edfe85c919ffd3d5b Mon Sep 17 00:00:00 2001 From: xiqiu Date: Fri, 11 Jun 2021 16:16:53 +0800 Subject: [PATCH 02/11] =?UTF-8?q?REPORT-53821=20=20driver=E5=8A=A0?= =?UTF-8?q?=E4=B8=8Atrim=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/JDBCDefPane.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java index 4331828238..c1afbe137f 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java @@ -5,10 +5,10 @@ import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.design.border.UITitledBorder; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.icombobox.UIComboBox; +import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength; import com.fr.design.gui.itextfield.UITextField; -import com.fr.design.gui.ilable.ActionLabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; @@ -21,17 +21,13 @@ import com.fr.general.ComparatorUtils; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StringUtils; -import java.awt.event.InputMethodEvent; -import java.awt.event.InputMethodListener; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.util.regex.Matcher; -import java.util.regex.Pattern; + import javax.swing.BorderFactory; import javax.swing.JFileChooser; import javax.swing.JPanel; import javax.swing.JPasswordField; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; @@ -39,13 +35,18 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.awt.event.InputMethodEvent; +import java.awt.event.InputMethodListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; import java.io.File; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; -import javax.swing.event.DocumentEvent; -import javax.swing.event.DocumentListener; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class JDBCDefPane extends JPanel { public static final String DRIVER_TYPE = "driver_type"; @@ -291,7 +292,7 @@ public class JDBCDefPane extends JPanel { jdbcDatabase = new JDBCDatabaseConnection(); } Object driveItem = this.driverComboBox.getSelectedItem(); - jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString()); + jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString().trim()); jdbcDatabase.setURL(this.urlTextField.getText().trim()); jdbcDatabase.setUser(this.userNameTextField.getText().trim()); jdbcDatabase.setPassword(new String(this.passwordTextField.getPassword()).trim()); From aa59c0a9bc6883c8b48b858dad55f211eaa982a1 Mon Sep 17 00:00:00 2001 From: kerry Date: Fri, 11 Jun 2021 16:33:55 +0800 Subject: [PATCH 03/11] =?UTF-8?q?REPORT-53806=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8=E3=80=91=E7=BB=84=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E6=95=B0=E6=8D=AE=E9=9B=86=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=98=E6=88=90=E4=BA=86?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E6=95=B0=E6=8D=AE=E9=9B=86=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E4=B8=8D=E6=98=AF=E4=BF=9D=E7=95=99=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../share/generate/task/ComponentCreator.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 f93e28426b..62570e5132 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; } From 7d5d567597bcaf9d8bad9fa794ebd5f9d5aa7b98 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 11 Jun 2021 16:50:04 +0800 Subject: [PATCH 04/11] =?UTF-8?q?REPORT-51958=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=A3=80=E6=B5=8B=E5=8F=8A=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/dialog/NotificationDialog.java | 5 +- .../java/com/fr/design/gui/UILookAndFeel.java | 1 + .../fr/design/mainframe/DesignerFrame.java | 2 + .../mainframe/toolbar/ToolBarMenuDock.java | 4 + .../fr/design/notification/Notification.java | 40 ++++ .../notification/NotificationCenter.java | 33 +++ .../ui/NotificationCenterDialog.java | 222 ++++++++++++++++++ .../ui/NotificationCenterPane.java | 54 +++++ .../versioncheck/VersionCheckUtils.java | 14 +- .../main/java/com/fr/start/MainDesigner.java | 5 + 10 files changed, 377 insertions(+), 3 deletions(-) create mode 100644 designer-base/src/main/java/com/fr/design/notification/Notification.java create mode 100644 designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java create mode 100644 designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java create mode 100644 designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java diff --git a/designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java b/designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java index db3be1387e..4b18ab3e04 100644 --- a/designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java +++ b/designer-base/src/main/java/com/fr/design/dialog/NotificationDialog.java @@ -4,6 +4,8 @@ package com.fr.design.dialog; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.notification.Notification; +import com.fr.design.notification.NotificationCenter; import com.fr.design.utils.gui.GUICoreUtils; import java.awt.BorderLayout; import java.awt.Color; @@ -46,6 +48,7 @@ public class NotificationDialog extends JDialog { } public void initComponents(int messageType, String message, boolean isModal,NotificationDialogAction action) { + NotificationCenter.getInstance().addNotification(new Notification(messageType,message,action)); notificationDialogAction = action; setModal(isModal); setResizable(false); @@ -116,7 +119,7 @@ public class NotificationDialog extends JDialog { propertyName = "OptionPane.newMessageIcon"; break; case 2: - propertyName = "OptionPane.warningIcon"; + propertyName = "OptionPane.circularWarningIcon"; break; default: return null; diff --git a/designer-base/src/main/java/com/fr/design/gui/UILookAndFeel.java b/designer-base/src/main/java/com/fr/design/gui/UILookAndFeel.java index abb9d613dd..488cbad37e 100644 --- a/designer-base/src/main/java/com/fr/design/gui/UILookAndFeel.java +++ b/designer-base/src/main/java/com/fr/design/gui/UILookAndFeel.java @@ -179,6 +179,7 @@ public class UILookAndFeel extends MetalLookAndFeel { table.put("OptionPane.circularWarningIcon", loadIcon("circularWarningIcon.png", this)); table.put("OptionPane.newMessageIcon", loadIcon("newMessageIcon.png", this)); table.put("OptionPane.circularErrorIcon", loadIcon("circularErrorIcon.png", this)); + table.put("OptionPane.deleteIcon", loadIcon("deleteIcon.png", this)); table.put("OptionPane.questionIcon", loadIcon("QuestionIcon.png", this)); table.put("OptionPane.tipIcon", loadIcon("TipIcon.png", this)); table.put("ScrollPane.border", new UIScrollPaneBorder()); diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 331438565e..25948b62cf 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -486,6 +486,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (!DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { ad.createAlphaFinePane().setVisible(false); } + northEastPane.add(ad.createNotificationCenterPane()); + OSSupportCenter.buildAction(new OSBasedAction() { @Override public void execute(Object... objects) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index d6cdbd8e3f..a2d0ec83fa 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -465,6 +465,10 @@ public abstract class ToolBarMenuDock { return new UILabel(); } + public Component createNotificationCenterPane(){ + return new UILabel(); + } + protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) { MenuDef menuDef = new MenuDef(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic__M_Server"), 'S'); diff --git a/designer-base/src/main/java/com/fr/design/notification/Notification.java b/designer-base/src/main/java/com/fr/design/notification/Notification.java new file mode 100644 index 0000000000..bc0fcf670f --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/notification/Notification.java @@ -0,0 +1,40 @@ +package com.fr.design.notification; + +import com.fr.design.dialog.NotificationDialogAction; + +public class Notification { + private int type; + private String message; + private NotificationDialogAction notificationDialogAction; + public static final int ERROR_MESSAGE = 0; + public static final int NEW_MESSAGE = 1; + public static final int WARNING_MESSAGE = 2; + public Notification(int type,String message,NotificationDialogAction notificationDialogAction){ + this.type = type; + this.message = message; + this.notificationDialogAction = notificationDialogAction; + } + + public Notification(String message){ + this.type = WARNING_MESSAGE; + this.message = message; + this.notificationDialogAction = new NotificationDialogAction() { + @Override + public void doClick() { + //do nothing + } + }; + } + + public NotificationDialogAction getNotificationDialogAction() { + return notificationDialogAction; + } + + public int getType(){ + return type; + } + + public String getMessage(){ + return message; + } +} diff --git a/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java b/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java new file mode 100644 index 0000000000..65f28966ea --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java @@ -0,0 +1,33 @@ +package com.fr.design.notification; + + +import com.fr.design.notification.ui.NotificationCenterPane; +import java.util.ArrayList; +import java.util.List; + +public class NotificationCenter { + private static NotificationCenter notificationCenter = new NotificationCenter(); + private List notifications; + private NotificationCenter(){ + notifications = new ArrayList<>(); + } + + public static NotificationCenter getInstance(){ + return notificationCenter; + } + + public void addNotification(Notification message){ + notifications.add(message); + NotificationCenterPane.getNotificationCenterPane().refreshButton(); + } + + public List getNotifications(){ + return notifications; + } + + public void clearAllNotifications(){ + notifications.clear(); + NotificationCenterPane.getNotificationCenterPane().refreshButton(); + } + +} diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java new file mode 100644 index 0000000000..162286a9d5 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java @@ -0,0 +1,222 @@ +package com.fr.design.notification.ui; + +import com.fr.design.dialog.NotificationDialogAction; +import com.fr.design.gui.ilable.UILabel; +import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.notification.Notification; +import com.fr.design.notification.NotificationCenter; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Frame; +import java.awt.Toolkit; +import java.awt.Window; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.util.ArrayList; +import java.util.List; +import javax.swing.BorderFactory; +import javax.swing.Icon; +import javax.swing.JDialog; +import javax.swing.JPanel; + +import javax.swing.UIManager; + +public class NotificationCenterDialog extends JDialog { + + private ArrayList notificationNeedShow; + private JPanel centerPanel; + private UILabel deleteLabel; + private static final int NOTIFICATIONCOUNT = 5; + + public NotificationCenterDialog(Frame parent) { + super(parent, true); + setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Notification")); + setResizable(false); + notificationNeedShow = new ArrayList<>(); + initComponents(); + } + + public void initComponents() { + centerPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); + addNotification(); + deleteLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotifications().size() + ")"); + deleteLabel.setForeground(Color.BLUE); + + deleteLabel.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + NotificationCenter.getInstance().clearAllNotifications(); + centerPanel.removeAll(); + addNotification(); + pack(); + deleteLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotifications().size() + ")"); + if (notificationNeedShow.size() == 0) { + hideDialog(); + } + } + }); + JPanel deletePane = new JPanel(FRGUIPaneFactory.createCenterFlowLayout()); + deletePane.add(deleteLabel); + deletePane.setPreferredSize(new Dimension(240, 30)); + add(centerPanel, BorderLayout.CENTER); + add(deletePane, BorderLayout.SOUTH); + pack(); + centerWindow(); + } + + private void hideDialog() { + this.dispose(); + } + + private void addNotification() { + notificationNeedShow.clear(); + List notifications = NotificationCenter.getInstance().getNotifications(); + int size = notifications.size(); + for (int i = NOTIFICATIONCOUNT; i > 0; i--) { + int j = size - i; + if (j >= 0) { + Notification notification = notifications.get(j); + NotificationPane notificationPane = new NotificationPane(notification.getType(), notification.getMessage(), i, notification.getNotificationDialogAction()); + notificationNeedShow.add(notificationPane); + } + } + size = notificationNeedShow.size(); + for (int i = size - 1; i >= 0; i--) { + centerPanel.add(notificationNeedShow.get(i)); + } + } + + private void centerWindow() { + Window win = this; + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + + Dimension winSize = win.getSize(); + + if (winSize.height > screenSize.height) { + winSize.height = screenSize.height; + } + if (winSize.width > screenSize.width) { + winSize.width = screenSize.width; + } + //这里设置位置:水平居中,竖直偏上 + win.setLocation(screenSize.width - winSize.width - 90, 50); + } + + /** + * 一条消息面板 + */ + + class NotificationPane extends JPanel { + private int index; + private UILabel messageLabel; + private UILabel messageIcon; + private NotificationDialogAction notificationDialogAction; + + public NotificationPane(int type, String message, int index, NotificationDialogAction notificationDialogAction) { + this.index = index; + this.notificationDialogAction = notificationDialogAction; + this.setLayout(FRGUIPaneFactory.createBorderLayout()); + setTypeIcon(getIconForType(type)); + setNotification(message); + setDeleteIcon(); + } + + public void setTypeIcon(Icon icon) { + messageIcon = new UILabel(icon); + messageIcon.addMouseListener(messageAndIconListener); + JPanel messageIconPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + messageIconPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); + messageIconPanel.add(messageIcon); + add(messageIconPanel, BorderLayout.WEST); + } + + public void setDeleteIcon() { + UILabel deleteIcon = new UILabel(UIManager.getIcon("OptionPane.deleteIcon")); + JPanel deleteIconPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); + deleteIconPane.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 7)); + deleteIconPane.add(deleteIcon); + deleteIconPane.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + NotificationCenter.getInstance().getNotifications().remove(NotificationCenter.getInstance().getNotifications().size() - index); + centerPanel.removeAll(); + addNotification(); + deleteLabel.setText("清除所有消息" + "(" + NotificationCenter.getInstance().getNotifications().size() + ")"); + pack(); + if (notificationNeedShow.size() == 0) { + centerWindow(); + } + NotificationCenterPane.getNotificationCenterPane().refreshButton(); + } + + @Override + public void mouseEntered(MouseEvent e) { + deleteIcon.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + + } + + @Override + public void mouseExited(MouseEvent e) { + deleteIcon.setCursor(Cursor.getDefaultCursor()); + } + }); + add(deleteIconPane, BorderLayout.EAST); + } + + public int getIndex() { + return index; + } + + public void setNotification(String message) { + messageLabel = new UILabel("" + message + ""); + messageLabel.addMouseListener(messageAndIconListener); + JPanel labelPanel = FRGUIPaneFactory.createBorderLayout_S_Pane(); + labelPanel.add(messageLabel); + this.add(labelPanel, BorderLayout.CENTER); + } + + protected Icon getIconForType(int messageType) { + String propertyName; + switch (messageType) { + case 0: + propertyName = "OptionPane.circularErrorIcon"; + break; + case 1: + propertyName = "OptionPane.newMessageIcon"; + break; + case 2: + propertyName = "OptionPane.circularWarningIcon"; + break; + default: + return null; + } + return UIManager.getIcon(propertyName); + } + + private MouseListener messageAndIconListener = new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + hideDialog(); + notificationDialogAction.doClick(); + } + + @Override + public void mouseEntered(MouseEvent e) { + messageLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + messageIcon.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + messageLabel.setForeground(new Color(250, 170, 57)); + + } + + @Override + public void mouseExited(MouseEvent e) { + messageLabel.setCursor(Cursor.getDefaultCursor()); + messageIcon.setCursor(Cursor.getDefaultCursor()); + messageLabel.setForeground(Color.BLACK); + } + }; + } +} diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java new file mode 100644 index 0000000000..55238a5eef --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java @@ -0,0 +1,54 @@ +package com.fr.design.notification.ui; + +import com.fr.design.constants.UIConstants; +import com.fr.design.dialog.BasicPane; +import com.fr.design.gui.ibutton.UIButton; +import com.fr.design.i18n.Toolkit; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.notification.NotificationCenter; +import com.fr.general.IOUtils; +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +public class NotificationCenterPane extends BasicPane { + private static NotificationCenterPane notificationCenterPane = new NotificationCenterPane(); + private static UIButton notificationCenterButton; + + private NotificationCenterPane() { + setPreferredSize(new Dimension(24, 24)); + setLayout(new BorderLayout()); + notificationCenterButton = new UIButton(); + notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/notificationCenter.png")); + notificationCenterButton.setToolTipText(Toolkit.i18nText("显示当前通知")); + notificationCenterButton.set4ToolbarButton(); + notificationCenterButton.setRolloverEnabled(false); + this.add(notificationCenterButton); + notificationCenterButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + NotificationCenterDialog notificationCenterDialog = new NotificationCenterDialog(DesignerContext.getDesignerFrame()); + notificationCenterDialog.setVisible(true); + } + }); + this.setBackground(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND); + } + + public static NotificationCenterPane getNotificationCenterPane() { + return notificationCenterPane; + } + + public void refreshButton() { + if (NotificationCenter.getInstance().getNotifications().size() > 0) { + notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/normal.png")); + } else { + notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/notificationCenter.png")); + } + } + + @Override + protected String title4PopupWindow() { + return "NotificationCenter"; + } +} diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 9fa6980e9d..275bb09de3 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -2,11 +2,14 @@ package com.fr.design.versioncheck; import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; +import com.fr.design.dialog.NotificationDialog; +import com.fr.design.dialog.NotificationDialogAction; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.DesignerWorkspaceType; import com.fr.design.env.RemoteWorkspace; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; +import com.fr.env.CheckServiceDialog; import com.fr.env.VersionCheckMessageDialog; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; @@ -68,8 +71,15 @@ public class VersionCheckUtils { public static void showVersionCheckDialog(String envName) { if (!VersionCheckUtils.versionCheck(envName)) { - VersionCheckMessageDialog versionCheckMessageDialog = new VersionCheckMessageDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Sync_Check_Brief_Info"), envName); - versionCheckMessageDialog.setVisible(true); + NotificationDialog notificationDialog = new NotificationDialog(DesignerContext.getDesignerFrame(), Toolkit.i18nText("Fine-Design_Basic_Sync_Prompt"), + true, NotificationDialog.WARNING_MESSAGE, Toolkit.i18nText("Fine-Design_Basic_Sync_Check_Brief_Info"), new NotificationDialogAction() { + @Override + public void doClick() { + CheckServiceDialog checkServiceDialog = new CheckServiceDialog(DesignerContext.getDesignerFrame(), GeneralUtils.readFullBuildNO(), getRemoteBranch(envName),getNoExistServiceDescription(envName)); + checkServiceDialog.setVisible(true); + } + }); + notificationDialog.setVisible(true); } } diff --git a/designer-realize/src/main/java/com/fr/start/MainDesigner.java b/designer-realize/src/main/java/com/fr/start/MainDesigner.java index 389538b2b3..5c8c57987b 100644 --- a/designer-realize/src/main/java/com/fr/start/MainDesigner.java +++ b/designer-realize/src/main/java/com/fr/start/MainDesigner.java @@ -29,6 +29,7 @@ import com.fr.design.mainframe.JWorkBook; import com.fr.design.mainframe.alphafine.component.AlphaFinePane; import com.fr.design.mainframe.bbs.UserInfoLabel; import com.fr.design.mainframe.bbs.UserInfoPane; +import com.fr.design.notification.ui.NotificationCenterPane; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.MenuDef; @@ -413,6 +414,10 @@ public class MainDesigner extends BaseDesigner { return AlphaFinePane.getAlphaFinePane(); } + public Component createNotificationCenterPane(){ + return NotificationCenterPane.getNotificationCenterPane(); + } + /** * 收集用户信息吗 */ From 993b9c20c81066f5b079302383d1c062429992f4 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 11 Jun 2021 16:50:54 +0800 Subject: [PATCH 05/11] =?UTF-8?q?REPORT-51958=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=A3=80=E6=B5=8B=E5=8F=8A=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/env/CheckServiceDialog.java | 5 ++--- .../fr/design/images/lookandfeel/deleteIcon.png | Bin 0 -> 326 bytes .../mainframe/notificationCenter/normal.png | Bin 0 -> 423 bytes .../notificationCenter/notificationCenter.png | Bin 0 -> 347 bytes 4 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/images/lookandfeel/deleteIcon.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/normal.png create mode 100644 designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/notificationCenter.png diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 185268e79c..ef4b0e0322 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -167,7 +167,8 @@ public class CheckServiceDialog extends JDialog implements ActionListener { centerPanel.add(detailsPane, BorderLayout.CENTER); JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10)); - if (isOnline()) { + boolean Sync = false; + if (Sync && isOnline()) { ignoreButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_Ignore")); ignoreButton.addActionListener(this); syncButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Sync_To_Local")); @@ -183,8 +184,6 @@ public class CheckServiceDialog extends JDialog implements ActionListener { buttonPanel.add(progressBar, BorderLayout.CENTER); buttonPanel.add(syncButton, BorderLayout.EAST); } else { - UILabel adviceLabel = new UILabel(Toolkit.i18nText("Fine-Design_Basic_Sync_Suggestion")); - centerPanel.add(adviceLabel, BorderLayout.SOUTH); UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Button_Confirm")); okButton.addActionListener(this); buttonPanel.add(okButton, BorderLayout.EAST); diff --git a/designer-base/src/main/resources/com/fr/design/images/lookandfeel/deleteIcon.png b/designer-base/src/main/resources/com/fr/design/images/lookandfeel/deleteIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..71c71fc82855a055159ddba17019fd7f2ae118c8 GIT binary patch literal 326 zcmV-M0lEH(P)DMTsaZQK8*v<0@$==;%>$2GVd23b+JEprr@ z`=H$QAzIr-n$m{|zMU)Y{ZI$sU#ztgfIj<>Ls&{8JTUXNX*h7uhg20N`;&*^L4$_c zKtx0l(Pb1>%Kcn44ca?8v=A+fwK5#*pr+2 YKZQ?+64-RMBme*a07*qoM6N<$f_N8@A^-pY literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/normal.png b/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/normal.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee1816682bcf905486879dfbd13663e692391da GIT binary patch literal 423 zcmV;Y0a*TtP)*v|#Day&iS-|+8(U*aNK@}>0`#(r@P9rd z0|Os6hy7<@_{7M-nE1+m%{rJo+yJm<#{a7s|1&V*^VNSwhJTFz8AD-)fDHgUo15zn zE}PK}{LjGf@%z_rsvz%x4G=vP)XMmuu?obFm2hFGRg7Wy@aHQ--pwgsy_3{)7z9|j z8Jg}dVOa8F4_NF!k@Z**JT22%LKpIk{yck-P6B!s8 zQDgZ3|Njg%cjq(AdA1E^E{XwQFTi9nq1Jd{A-sSbi0FoZ z_*gWf1|qI#1i1tR&}?P^C8+OTzp22Z5fT#=BqW%#DN4#PLnz8j`0@ZQIRI9{wh`a7 R`QiWo002ovPDHLkV1n=4#R32T literal 0 HcmV?d00001 diff --git a/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/notificationCenter.png b/designer-realize/src/main/resources/com/fr/design/mainframe/notificationCenter/notificationCenter.png new file mode 100644 index 0000000000000000000000000000000000000000..0445f313449a9ec1f97ccd5d3de489870e1db79c GIT binary patch literal 347 zcmV-h0i^zkP)G*rC7WyJ`lnoNm zU6P))BJu{vp)n>dzSjW!TOyp)Sr);-nBcS#ptW8F=oNs| zuyZ<{er&{X{Qlc7IZ#TuL@Up>%cNmIDP+v!<0G?_RzNxT@khpxC#IO002ovPDHLkV1j<@jEevO literal 0 HcmV?d00001 From 6be9984128b0a373c6c4331c4a098d5d9ddf3e9d Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 11 Jun 2021 17:09:26 +0800 Subject: [PATCH 06/11] =?UTF-8?q?REPORT-51958=20=E8=BF=9C=E7=A8=8B?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E6=A3=80=E6=B5=8B=E5=8F=8A=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/notification/NotificationCenter.java | 13 +++++++++++-- .../notification/ui/NotificationCenterDialog.java | 14 +++++++------- .../notification/ui/NotificationCenterPane.java | 4 ++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java b/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java index 65f28966ea..7ca868db59 100644 --- a/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java +++ b/designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java @@ -21,8 +21,17 @@ public class NotificationCenter { NotificationCenterPane.getNotificationCenterPane().refreshButton(); } - public List getNotifications(){ - return notifications; + public int getNotificationsCount(){ + return notifications.size(); + } + + public void removeNotification(int index){ + notifications.remove(index); + NotificationCenterPane.getNotificationCenterPane().refreshButton(); + } + + public Notification getNotification(int index){ + return notifications.get(index); } public void clearAllNotifications(){ diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java index 162286a9d5..789a02fa94 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java @@ -42,7 +42,7 @@ public class NotificationCenterDialog extends JDialog { public void initComponents() { centerPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1); addNotification(); - deleteLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotifications().size() + ")"); + deleteLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotificationsCount() + ")"); deleteLabel.setForeground(Color.BLUE); deleteLabel.addMouseListener(new MouseAdapter() { @@ -52,7 +52,7 @@ public class NotificationCenterDialog extends JDialog { centerPanel.removeAll(); addNotification(); pack(); - deleteLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotifications().size() + ")"); + deleteLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotificationsCount() + ")"); if (notificationNeedShow.size() == 0) { hideDialog(); } @@ -73,12 +73,12 @@ public class NotificationCenterDialog extends JDialog { private void addNotification() { notificationNeedShow.clear(); - List notifications = NotificationCenter.getInstance().getNotifications(); - int size = notifications.size(); + + int size = NotificationCenter.getInstance().getNotificationsCount(); for (int i = NOTIFICATIONCOUNT; i > 0; i--) { int j = size - i; if (j >= 0) { - Notification notification = notifications.get(j); + Notification notification = NotificationCenter.getInstance().getNotification(j); NotificationPane notificationPane = new NotificationPane(notification.getType(), notification.getMessage(), i, notification.getNotificationDialogAction()); notificationNeedShow.add(notificationPane); } @@ -141,10 +141,10 @@ public class NotificationCenterDialog extends JDialog { deleteIconPane.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - NotificationCenter.getInstance().getNotifications().remove(NotificationCenter.getInstance().getNotifications().size() - index); + NotificationCenter.getInstance().removeNotification(NotificationCenter.getInstance().getNotificationsCount() - index); centerPanel.removeAll(); addNotification(); - deleteLabel.setText("清除所有消息" + "(" + NotificationCenter.getInstance().getNotifications().size() + ")"); + deleteLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Clear_Notifications") + "(" + NotificationCenter.getInstance().getNotificationsCount() + ")"); pack(); if (notificationNeedShow.size() == 0) { centerWindow(); diff --git a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java index 55238a5eef..6ed74782b1 100644 --- a/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java +++ b/designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java @@ -21,7 +21,7 @@ public class NotificationCenterPane extends BasicPane { setLayout(new BorderLayout()); notificationCenterButton = new UIButton(); notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/notificationCenter.png")); - notificationCenterButton.setToolTipText(Toolkit.i18nText("显示当前通知")); + notificationCenterButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Show_Notification")); notificationCenterButton.set4ToolbarButton(); notificationCenterButton.setRolloverEnabled(false); this.add(notificationCenterButton); @@ -40,7 +40,7 @@ public class NotificationCenterPane extends BasicPane { } public void refreshButton() { - if (NotificationCenter.getInstance().getNotifications().size() > 0) { + if (NotificationCenter.getInstance().getNotificationsCount() > 0) { notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/normal.png")); } else { notificationCenterButton.setIcon(IOUtils.readIcon("/com/fr/design/mainframe/notificationcenter/notificationCenter.png")); From a320657685e423809699e71a9160f9cf7b9086d4 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Mon, 14 Jun 2021 18:02:38 +0800 Subject: [PATCH 07/11] =?UTF-8?q?REPORT-53706=20=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/com/fr/design/login/guide.css | 11 +++-- .../resources/com/fr/design/login/guide.js | 2 +- .../design/login/img/icon_install_normal.png | Bin 0 -> 543 bytes .../resources/com/fr/design/login/login.css | 44 +++++++++++++----- 4 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 designer-base/src/main/resources/com/fr/design/login/img/icon_install_normal.png 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 194296aa0a..12af5f6c3b 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 2dc054d2d9..355fb5e5b0 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 0000000000000000000000000000000000000000..a729d7173bcdfe37ab720170e6270e652b310c06 GIT binary patch literal 543 zcmV+)0^t3LP)YU6vodUiTrJ&#@I0?Ri4%WefcJU3w$(JYyV%5dAH;xXz zfpu-6HKs?>Hf@ME&AqonmuAhm=lkV5e{K+_{NR-JVFoaBfa^delhIqP)7C0Pi|vX&j^_mPM;0N@*7bJezQ zop7EAfYdIL```!5LWINt5kKqo+8QE~5P%nCn&vqXT+2d)#R0IP>)Lj;TKy0%fgdOf zAuHZ1aa?UhAymYL07S~6DlQB#4q_5nV%Pb z!^K^x;o5SXIAe_62={<#ZXFYK?*9r?TM&cgHCaTq5E#WA&V{174tEoXq9(D{iq^?22wRUR*YtoiCTmov0kbi)a#v hac5@$GY6*bz#kUPXEL-ulfVD~002ovPDHLkV1n)~^=1G7 literal 0 HcmV?d00001 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 10dd394f06..30b341c097 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; From e8752335465dd4c691a2faa452b6c89061fa5b07 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Mon, 14 Jun 2021 18:40:28 +0800 Subject: [PATCH 08/11] =?UTF-8?q?REPORT-51360=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E6=B6=88=E6=81=AF=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../login/message/DesignerMessageHelper.java | 117 ++++++++++++++++++ .../message/DesignerModuleClickType.java | 69 +++++++++++ .../login/message/NotificationJumpType.java | 31 +++++ .../fr/start/module/DesignerActivator.java | 2 + 4 files changed, 219 insertions(+) create mode 100644 designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java create mode 100644 designer-base/src/main/java/com/fr/design/login/message/DesignerModuleClickType.java create mode 100644 designer-base/src/main/java/com/fr/design/login/message/NotificationJumpType.java 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 0000000000..c23464c17c --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/login/message/DesignerMessageHelper.java @@ -0,0 +1,117 @@ +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 = 1L; + 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(); + } 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(); + } + } + } + } +} 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 0000000000..85b8983f11 --- /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 0000000000..e1b8f04ac3 --- /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-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index fee4ddaa90..3c9b4dc9db 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(); } }); From 48e762113cbf2620f8286683f8ba99e00439b4f5 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Mon, 14 Jun 2021 18:56:25 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BB=B6=E8=BF=9F?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/login/message/DesignerMessageHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index c23464c17c..e899234b3f 100644 --- 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 @@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit; */ public class DesignerMessageHelper { - private static final long DELAY = 1L; + private static final long DELAY = 7L; private static final String STATUS = "status"; private static final String DATA = "data"; private static final String SUCCESS = "success"; From cbe011be6b71f3353c73caeddcbd41e8387989ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=B2=B3?= <445798420@qq.com> Date: Tue, 15 Jun 2021 10:12:38 +0800 Subject: [PATCH 10/11] =?UTF-8?q?CHART-19525=20=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=A1=86=E8=AE=BE=E7=BD=AE=E4=B8=BA=E5=8F=AF?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/component/richText/VanChartRichTextDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 509055842a..29598fa294 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); } From 1af829055b777332899b50bb164f37a4972b81f9 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Tue, 15 Jun 2021 11:09:22 +0800 Subject: [PATCH 11/11] fix --- .../com/fr/design/login/message/DesignerMessageHelper.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 index e899234b3f..dbb2d69c44 100644 --- 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 @@ -99,7 +99,9 @@ public class DesignerMessageHelper { String ssoUrl = DesignerLoginUtils.generateDesignerSSOUrl(jumpTo); BrowseUtils.browser(ssoUrl); } - }).build(); + }) + .build() + .setVisible(true); } else if (notificationJumpType == NotificationJumpType.DESIGNER_MODULE) { DesignerModuleClickType designerModuleClickType = DesignerModuleClickType.valueOf(jumpTo); NotificationDialog.Builder() @@ -109,7 +111,8 @@ public class DesignerMessageHelper { .messageType(NotificationDialog.NEW_MESSAGE) .message(body) .notificationDialogAction(designerModuleClickType.getAction()) - .build(); + .build() + .setVisible(true); } } }