diff --git a/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java b/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java index ae012210..c917dca0 100644 --- a/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java +++ b/app-core/src/main/java/com/mercury/platform/core/MercuryConstants.java @@ -1,7 +1,7 @@ package com.mercury.platform.core; public class MercuryConstants { - public static final String APP_VERSION = "1.0.1.8.0"; + public static final String APP_VERSION = "1.0.1.8.1"; public static final String SERVER_HOST = "exslims.ddns.net"; public static final int PORT = 5555; } diff --git a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java index 3b8ce102..10b942c5 100644 --- a/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java +++ b/app-core/src/main/java/com/mercury/platform/shared/config/configration/impl/HotKeyConfigurationService.java @@ -43,7 +43,7 @@ public HotKeysSettingsDescriptor getDefault() { scannerNDataList.add(new HotKeyPair(HotKeyType.N_CLOSE_NOTIFICATION,new HotKeyDescriptor("F6",NativeKeyEvent.VC_F6,false,false,false))); List taskBarNDataList = new ArrayList<>(); - taskBarNDataList.add(new HotKeyPair(HotKeyType.T_TO_HIDEOUT,new HotKeyDescriptor("F1",NativeKeyEvent.VC_F1,false,false,false))); + taskBarNDataList.add(new HotKeyPair(HotKeyType.T_TO_HIDEOUT,new HotKeyDescriptor("F10",NativeKeyEvent.VC_F10,false,false,false))); // taskBarNDataList.add(new HotKeyPair(HotKeyType.T_DND,new HotKeyDescriptor("F2",NativeKeyEvent.VC_F2,false,false,false))); hotKeysSettingsDescriptor.setIncNHotKeysList(incNDataList); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/adr/components/AdrComponentsFactory.java b/app-ui/src/main/java/com/mercury/platform/ui/adr/components/AdrComponentsFactory.java index b0199c2f..aa9eb285 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/adr/components/AdrComponentsFactory.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/adr/components/AdrComponentsFactory.java @@ -187,12 +187,12 @@ public void mousePressed(MouseEvent e) { MercuryStoreCore.hotKeySubject.subscribe(hotKey -> { if (allowed) { button.setBackground(AppThemeColor.BUTTON); - if (hotKey.getVirtualKeyCode() == 27) { + if (hotKey.getVirtualKeyCode() == 1) { descriptor.setHotKeyDescriptor(new HotKeyDescriptor()); } else { descriptor.setHotKeyDescriptor(hotKey); } - button.setText(hotKey.getTitle()); + button.setText(descriptor.getTitle()); allowed = false; MercuryStoreUI.adrReloadSubject.onNext(descriptor); button.addMouseListener(mouseAdapter); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/IncomingNotificationPanel.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/IncomingNotificationPanel.java index d5d98a54..26878444 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/IncomingNotificationPanel.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/IncomingNotificationPanel.java @@ -108,6 +108,7 @@ private JPanel getHeader(){ interactionPanel.add(openChatButton); interactionPanel.add(hideButton); + this.interactButtonMap.clear(); this.interactButtonMap.put(HotKeyType.N_INVITE_PLAYER,inviteButton); this.interactButtonMap.put(HotKeyType.N_TRADE_PLAYER,tradeButton); this.interactButtonMap.put(HotKeyType.N_KICK_PLAYER,kickButton); @@ -134,7 +135,9 @@ protected void updateHotKeyPool() { .stream() .filter(it -> it.getType().equals(type)) .findAny().orElse(null); - this.hotKeysPool.put(hotKeyPair.getDescriptor(),button); + if(!hotKeyPair.getDescriptor().getTitle().equals("...")) { + this.hotKeysPool.put(hotKeyPair.getDescriptor(), button); + } }); this.initResponseButtonsPanel(); Window windowAncestor = SwingUtilities.getWindowAncestor(IncomingNotificationPanel.this); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/OutgoingNotificationPanel.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/OutgoingNotificationPanel.java index ad301615..40efd02c 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/OutgoingNotificationPanel.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/OutgoingNotificationPanel.java @@ -77,6 +77,7 @@ private JPanel getHeader(){ // interactionPanel.add(backToHo); interactionPanel.add(openChatButton); interactionPanel.add(hideButton); + this.interactButtonMap.clear(); this.interactButtonMap.put(HotKeyType.N_VISITE_HIDEOUT,visiteHideout); this.interactButtonMap.put(HotKeyType.N_TRADE_PLAYER,tradeButton); this.interactButtonMap.put(HotKeyType.N_LEAVE,leaveButton); @@ -97,7 +98,9 @@ protected void updateHotKeyPool() { .stream() .filter(it -> it.getType().equals(type)) .findAny().orElse(null); - this.hotKeysPool.put(hotKeyPair.getDescriptor(),button); + if(!hotKeyPair.getDescriptor().getTitle().equals("...")) { + this.hotKeysPool.put(hotKeyPair.getDescriptor(), button); + } }); this.initResponseButtonPanel(); Window windowAncestor = SwingUtilities.getWindowAncestor(OutgoingNotificationPanel.this); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ScannerNotificationPanel.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ScannerNotificationPanel.java index 1a63361e..cad39509 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ScannerNotificationPanel.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/ScannerNotificationPanel.java @@ -76,6 +76,7 @@ private JPanel getHeader(){ interactionPanel.add(openChatButton); interactionPanel.add(hideButton); + this.interactButtonMap.clear(); this.interactButtonMap.put(HotKeyType.N_QUICK_RESPONSE,inviteMeButton); this.interactButtonMap.put(HotKeyType.N_VISITE_HIDEOUT,visiteHideout); this.interactButtonMap.put(HotKeyType.N_TRADE_PLAYER,tradeButton); @@ -106,7 +107,9 @@ protected void updateHotKeyPool() { .stream() .filter(it -> it.getType().equals(type)) .findAny().orElse(null); - this.hotKeysPool.put(hotKeyPair.getDescriptor(),button); + if(!hotKeyPair.getDescriptor().getTitle().equals("...")) { + this.hotKeysPool.put(hotKeyPair.getDescriptor(), button); + } }); } diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/controller/NotificationIncomingController.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/controller/NotificationIncomingController.java index 8e094d7f..7e43e4c8 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/controller/NotificationIncomingController.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/notification/controller/NotificationIncomingController.java @@ -1,6 +1,7 @@ package com.mercury.platform.ui.components.panel.notification.controller; import com.mercury.platform.shared.entity.message.ItemTradeNotificationDescriptor; +import com.mercury.platform.shared.entity.message.MercuryError; import com.mercury.platform.shared.entity.message.NotificationDescriptor; import com.mercury.platform.shared.store.MercuryStoreCore; import com.mercury.platform.ui.misc.MercuryStoreUI; @@ -63,9 +64,13 @@ public void showITH() { private void copyItemNameToClipboard(@NonNull String itemName){ Timer timer = new Timer(30, action -> { - StringSelection selection = new StringSelection(itemName); - Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); - clipboard.setContents(selection, null); + try { + StringSelection selection = new StringSelection(itemName); + Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); + clipboard.setContents(selection, null); + }catch (IllegalStateException e){ + MercuryStoreCore.errorHandlerSubject.onNext(new MercuryError(e)); + } }); timer.setRepeats(false); timer.start(); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/settings/page/HotKeyPanel.java b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/settings/page/HotKeyPanel.java index dd79df0b..7d5e5970 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/components/panel/settings/page/HotKeyPanel.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/components/panel/settings/page/HotKeyPanel.java @@ -38,9 +38,9 @@ public void mousePressed(MouseEvent e) { MercuryStoreCore.hotKeySubject.subscribe(hotKey -> { if (hotKeyAllowed) { button.setBackground(AppThemeColor.BUTTON); - if (hotKey.getVirtualKeyCode() == 27) { + if (hotKey.getVirtualKeyCode() == 1) { this.descriptor.setTitle("..."); - this.descriptor.setVirtualKeyCode(0); + this.descriptor.setVirtualKeyCode(-1); this.descriptor.setMenuPressed(false); this.descriptor.setShiftPressed(false); this.descriptor.setControlPressed(false); @@ -51,7 +51,7 @@ public void mousePressed(MouseEvent e) { this.descriptor.setShiftPressed(hotKey.isShiftPressed()); this.descriptor.setControlPressed(hotKey.isControlPressed()); } - button.setText(hotKey.getTitle()); + button.setText(this.descriptor.getTitle()); hotKeyAllowed = false; button.addMouseListener(mouseAdapter); } diff --git a/app-ui/src/main/java/com/mercury/platform/ui/frame/AbstractScalableComponentFrame.java b/app-ui/src/main/java/com/mercury/platform/ui/frame/AbstractScalableComponentFrame.java index b9ce1a2b..ce90a895 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/frame/AbstractScalableComponentFrame.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/frame/AbstractScalableComponentFrame.java @@ -45,7 +45,6 @@ public void setState(ScaleState state){ this.scaleState = ScaleState.DEFAULT; this.setContentPane(mainContainer); this.setVisible(prevConstraints.visible); - this.processEResize = prevConstraints.processEResize; this.setBackground(prevConstraints.bgColor); this.inScaleSettings = false; this.onScaleLock(); @@ -58,7 +57,6 @@ public void setState(ScaleState state){ this.isVisible(), this.processEResize, this.getBackground() ); - this.processEResize = false; initDefaultView(); this.setVisible(true); this.onScaleUnlock(); diff --git a/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/ItemsGridFrame.java b/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/ItemsGridFrame.java index d9e091d2..3c9f9bb5 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/ItemsGridFrame.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/ItemsGridFrame.java @@ -57,7 +57,7 @@ public void subscribe() { this.pack(); } }); - MercuryStoreUI.closeMessage.subscribe(message -> { + MercuryStoreCore.removeNotificationSubject.subscribe(message -> { if(message instanceof ItemTradeNotificationDescriptor) { this.itemsGridPanel.remove((ItemTradeNotificationDescriptor) message); if (itemsGridPanel.getActiveTabsCount() == 0) { diff --git a/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/NotificationFrame.java b/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/NotificationFrame.java index 5a0231b9..7dac9269 100644 --- a/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/NotificationFrame.java +++ b/app-ui/src/main/java/com/mercury/platform/ui/frame/movable/NotificationFrame.java @@ -86,11 +86,6 @@ public void subscribe() { this.currentOffers.add(message); } this.addNotification(notificationPanel); - if(this.notificationPanels.size() > 1 - && this.config.get().getFlowDirections().equals(FlowDirections.UPWARDS) - && !(notificationPanel instanceof ScannerNotificationPanel)){ - this.setLocation(new Point(this.getLocation().x,this.getLocation().y - notificationPanel.getSize().height)); - } }); }); MercuryStoreCore.newScannerMessageSubject.subscribe(message -> { @@ -154,8 +149,7 @@ private void addNotification(NotificationPanel notificationPanel){ this.pack(); this.repaint(); if(this.notificationPanels.size() > 1 - && this.config.get().getFlowDirections().equals(FlowDirections.UPWARDS) - && !(notificationPanel instanceof ScannerNotificationPanel)){ + && this.config.get().getFlowDirections().equals(FlowDirections.UPWARDS)){ this.setLocation(new Point(this.getLocation().x,this.getLocation().y - notificationPanel.getSize().height)); } } @@ -221,17 +215,6 @@ protected JPanel defaultView(ComponentsFactory factory) { .setComponentsFactory(factory) .setController(new OutStubController()) .build()); - root.add(this.providersFactory - .getProviderFor(NotificationType.SCANNER_MESSAGE) - .setData(testEngine.getRandomScannerMessage()) - .setComponentsFactory(factory) - .setController(new ScannerStubController()) - .build()); - Timer packTimer = new Timer(10, action -> { - this.pack(); - }); - packTimer.start(); - return root; } diff --git a/app-ui/src/main/resources/notes/patch/patch-notes.json b/app-ui/src/main/resources/notes/patch/patch-notes.json index 9e37d271..9d8338ba 100644 --- a/app-ui/src/main/resources/notes/patch/patch-notes.json +++ b/app-ui/src/main/resources/notes/patch/patch-notes.json @@ -1,9 +1,9 @@ { - "version":"1.0.1.8.0", + "version":"1.0.1.8.1", "notes":[ { - "title" : "Update", - "text" : "Just this week we've got more than 6000 new users which is insane. The update we're rolling out today affects every aspect of the application - basically a big rework of the core systems.\n\n- Notification panel rework (more info on reddit)\n- Overseer: new component \"Capture\".\n- All the buttons are now hotkeyable.\n- Chat scanner and history rework.\n- More responsive interface.\n\nA lot of work has been done, but that's it for today. Stay with us!", + "title" : "Hotfix", + "text" : "Hotfixes for the recent big update (check github/reddit):\n\n1. Now \"Escape\" is not a viable hotkey (lmao), will clear the hotkey instead.\n2. Fixed a bug with Item Grid boxes not being removed properly.\n3. Fixed a bug with panel resizing not working.\n4. Fixed Notification's Upwards Flow Direction option is not working properly.", "image" : "", "layout" : "VERTICAL" }