Commit Graph

620 Commits

Author SHA1 Message Date
James Lyne
f7b774321b Use template strings over array joins for map names 2022-02-04 20:36:10 +00:00
James Lyne
e2a89c28d0 Handle possible nested arrays when calculating Squaremap/Pl3xmap bounds from points 2022-01-31 22:36:25 +00:00
James Lyne
c7c17af6d5 Fix point marker icon updates 2022-01-22 12:05:54 +00:00
James Lyne
3ca7a72703 Fix player image not updating on follow target change 2022-01-22 12:03:40 +00:00
James Lyne
80fe8916f3 Refactor config loading
- Move config validation into map providers
- Move TileLayer creation into map providers
- Simplify config loading logic
2022-01-21 20:20:01 +00:00
James Lyne
4535af754c Clear player head cache/queue on server change 2022-01-17 20:15:22 +00:00
James Lyne
b82c9f39d2 Only show "Show More" button if there is actually more to show. 2022-01-17 19:57:04 +00:00
James Lyne
c87ea083a0 Only center points that need centering 2022-01-17 19:21:52 +00:00
James Lyne
62f7b25fb5 Center point markers in their block to match player markers 2022-01-17 19:01:19 +00:00
James Lyne
d9ca473674 Cancel existing follow when manually switching worlds 2022-01-17 16:45:42 +00:00
James Lyne
91739d513a Markers sidebar section 2022-01-17 15:15:00 +00:00
James Lyne
9265f8a02a Scroll to top of list when searching players 2022-01-17 12:21:23 +00:00
James Lyne
14e67571b2 Use class for styling player search 2022-01-17 12:20:33 +00:00
James Lyne
f9eb7b1fd2 Fix typo in circle bounds 2022-01-16 23:24:12 +00:00
James Lyne
f906264021 Add global marker update handler which handles all marker sets 2022-01-16 23:21:22 +00:00
James Lyne
687a31f0f7 Refactor Map pan handling
- Add setView method to handle all panning/zooming
- Replaced SET_PAN_TARGET mutation with more generic SET_VIEW_TARGET which accepts locations/bounds/zooms and leaflet options
- Merged all scheduled variables into single scheduledView
2022-01-16 22:15:12 +00:00
James Lyne
aaf4ee630d Precalculate bounds for path markers 2022-01-16 21:18:48 +00:00
James Lyne
846f894502 Follow UI improvements
- Stick to bottom of screen
- Prevent layout shift when player visibility changes
- Increase image size
2022-01-16 00:50:10 +00:00
James Lyne
cfda231048 Rename marker layer utility methods 2022-01-15 18:45:01 +00:00
James Lyne
5391b2a34c Recreate tooltips on marker update 2022-01-15 16:00:19 +00:00
James Lyne
f47bf8e691 Use HTML tooltip for marker display when it exists 2022-01-15 15:50:27 +00:00
James Lyne
42e553bda7 Marker storage/display improvements
- Store markers of all types for a marker set in a single map
- Merge all marker type components into a single Markers component
- Add marker type prefixes to dynmap marker ids to ensure they remain unique
- Add id and type properties to marker objects
- Remove now-unused update handler for specific marker types
2022-01-15 15:45:59 +00:00
James Lyne
9abd96ccb1 Overhaul marker update handling
- Renamed pendingSetUpdates to pendingMarkerUpdates
- pendingMarkerUpdates is now a simple array of LiveAtlasMarkerUpdates
- Added separate ADD_MARKER_UPDATES mutation for marker updates
- Set updates via ADD_MARKER_SET_UPDATES are applied immediately and not stored in state
- Removed all marker pop actions and mutations except POP_MARKER_UPDATES, which now returns all marker types
- Added centralised markup update handler in markers.ts, replacing much of the logic in the individual marker type components. Allows additional handlers to be registered for specific marker sets and types
2022-01-15 00:07:25 +00:00
James Lyne
61b6b820aa Combine buildArea/buildRectangle in Pl3xmapMapProvider 2022-01-14 20:52:37 +00:00
James Lyne
6b232f387b Rename markers.ts 2022-01-14 20:52:05 +00:00
James Lyne
e800b9fb73 Pl3xmap tooltip fixes 2022-01-14 20:11:43 +00:00
James Lyne
8382142cb2 Cleanup url getter 2022-01-14 20:11:43 +00:00
James Lyne
46fc602a96 Fix incorrect argument type for DynmapTileLayer.getTileInfo 2022-01-14 20:11:43 +00:00
James Lyne
b3a685e003 Add location property for all marker types
Areas/lines will calculate a center point to use for their location
2022-01-14 20:11:43 +00:00
James Lyne
d1edad952e Fix build 2022-01-14 14:38:58 +00:00
James Lyne
715aa8bd55 Add missing export 2022-01-14 14:38:43 +00:00
James Lyne
ac575e4ee9 Fix server switching 2022-01-14 13:58:26 +00:00
James Lyne
234b2d0a6b Store plain text version of HTML marker tooltip content 2022-01-14 13:53:43 +00:00
James Lyne
4e8780b3a4 Sidebar cleanup and fixes
- Merge functions handling sidebar section events, focusing and toggling
- Use hidden attribute instead of v-show for sidebar sections
- Ignore hidden sidebar sections when navigating with the keyboard
- Allow focusing an already visible section via down arrow on its button
2022-01-14 13:16:04 +00:00
James Lyne
ef28afaceb Don't focus sidebar sections due to expandUI on initial load 2022-01-14 11:34:09 +00:00
James Lyne
fc55d56692 Fix sidebar repaint on scroll 2022-01-14 00:37:17 +00:00
James Lyne
1d1fa0abc8 Slightly increase sidebar width and player icon padding 2022-01-14 00:36:19 +00:00
James Lyne
9ea3f616c3 New map icons 2022-01-13 20:10:29 +00:00
James Lyne
9c74d7b163 Marker changes
- Merge marker label/tooltipContent
- Rename tooltipContent/popupContent to tooltip/popup
- Set tooltip from label for all dynmap marker types
2022-01-13 16:07:27 +00:00
James Lyne
4415b17ceb Rename Markers component to Points 2022-01-13 14:41:05 +00:00
James Lyne
7cd21a19e2 Rename marker types for clarity
- Add "Marker" suffix
- Rename regular marker to "PointMarker"
2022-01-13 14:14:11 +00:00
James Lyne
323b700568 Clear followTarget in SET_PAN_TARGET 2022-01-13 13:38:26 +00:00
James Lyne
9bed746ccc Move player search into PlayerList 2022-01-13 11:51:06 +00:00
James Lyne
763b4d907e Make player search sticky 2022-01-13 01:52:22 +00:00
James Lyne
97c6916194 Prevent sidebar section heading wrapping 2022-01-13 01:52:09 +00:00
James Lyne
cc39b3c0c9 Make sidebar section headers sticky 2022-01-13 01:35:44 +00:00
James Lyne
b39db090f5 Message handling improvements
-Define message keys in a single place
-Add fallback for missing messages
-Slight reduction in filesize
2022-01-12 15:21:01 +00:00
James Lyne
4b834aa0b0 Split lists into their own components 2022-01-12 13:27:16 +00:00
James Lyne
ac7c269fe1 Add squaremap server definition (alias for pl3xmap) 2022-01-12 01:06:18 +00:00
James Lyne
51ec91be22 Rename VITE_VERSION to VITE_APP_VERSION 2022-01-12 00:31:54 +00:00
James Lyne
eaad0b4de5 Revert "Work around dynmap bugs in markup handling"
This reverts commit 297a593f
2022-01-11 17:52:37 +00:00
James Lyne
ff77f09025 Move marker set contents outside the store, other small optimisations.
Improves marker set creation performance by avoiding traversal of all markers when watching the marker set.

Various other small changes to reduce allocations when creating markers
2022-01-11 16:08:30 +00:00
James Lyne
6717cab096 FollowTarget improvements
- Show current world/location when follow target is visible
- Add ellipsis overflow
- Add copy location on click
2022-01-10 22:16:05 +00:00
James Lyne
6d49021220 Refactor sidebar sections
- Rename CollapsibleSection to SidebarSection with a collapsible prop
- Move section__content element to SidebarSection
- Move sidebar section styling to SidebarSection
2022-01-10 20:24:22 +00:00
James Lyne
450a5ee46c Refactor sidebar sections
- Rename CollapsibleSection to SidebarSection with a collapsible prop
- Move section__content element to SidebarSection
- Move sidebar section styling to SidebarSection
2022-01-10 19:56:23 +00:00
James Lyne
df1d2ee73b Add window size to vuex state 2022-01-10 19:33:41 +00:00
James Lyne
297a593fa7 Work around dynmap bugs in markup handling 2022-01-10 00:08:06 +00:00
James Lyne
53c2ecab71 Allow use of specific default liveatlas by setting a map's icon to "liveatlas_[icon_name]" in the map plugin's configuration 2021-12-28 16:09:44 +00:00
James Lyne
9ee99c9290 Fix incorrect scheduledZoom type check 2021-12-23 23:00:23 +00:00
James Lyne
27231ff5ff Fix config hash handling in update response 2021-12-23 21:53:38 +00:00
James Lyne
980141ccba Fix zoom level 0 being ignored in url and map default zoom 2021-12-23 16:43:14 +00:00
James Lyne
421c72dba7 Fix inactive maps stealing pending tile updates 2021-12-16 00:33:41 +00:00
James Lyne
fd0e11fac0 Handle pl3xmap world ordering 2021-12-10 16:36:32 +00:00
James Lyne
cbd6c7f3b9 Handle pl3xmap world default zoom 2021-12-10 15:54:55 +00:00
James Lyne
2ab03f8fde Handle pl3xmap player update interval 2021-12-10 15:54:30 +00:00
James Lyne
e082502f88 Add configuration version checking 2021-12-09 18:26:57 +00:00
James Lyne
b98f37729d Suggest solutions for missing config object 2021-12-09 18:26:20 +00:00
James Lyne
5a778828f8 Initial version of pl3xmap player facing. Closes #129 2021-12-09 01:13:23 +00:00
James Lyne
3355dbbd32 Add compactPlayerMarkers ui option for pre-2.0 style markers 2021-12-07 21:53:09 +00:00
James Lyne
6b05ef8f8f Add CSS variables for marker colours 2021-12-07 21:48:54 +00:00
James Lyne
bffcea1642 Only pan to markers with popups on second click 2021-12-07 20:42:24 +00:00
James Lyne
935cba1c0f Fix marker popups not displaying on click (Fixes #261) 2021-12-07 20:18:49 +00:00
James Lyne
1237b9cc5f Use @types/dynmap where possible (Closes #224) 2021-11-12 00:23:08 +00:00
James Lyne
0c87849356 Use @types/dynmap where possible (Closes #224) 2021-11-12 00:22:52 +00:00
James Lyne
8a66d05139 Support plugin source for dynmap chat (Closes #242) 2021-11-12 00:12:17 +00:00
James Lyne
71ad1b03c2 Fix unbalanced marker label padding when player images are disabled 2021-09-30 23:22:46 +01:00
James Lyne
fc4916565b Fix LogoControl image size 2021-09-30 22:37:00 +01:00
James Lyne
6c0837deae Improve session expiry handling
- Reload configuration and show login dialog when any request fails with "login required"
- Current map position etc is lost, more work needed here
2021-09-30 20:13:23 +01:00
James Lyne
31c1148c38 Decode HTML entities for markup: false dynmap marker labels (Fixes: #172) 2021-09-30 16:43:35 +01:00
James Lyne
8f794d044f Support Pl3xmap custom world icons 2021-09-30 15:04:01 +01:00
James Lyne
ca1d90a739 Remove unused world/map properties 2021-09-30 13:16:39 +01:00
James Lyne
daee15dd3f Fix various issues with Pl3xmap world/map creation 2021-09-29 21:35:26 +01:00
James Lyne
dc479ca6e8 Support disabling player images in player list
- showplayerfacesinmenu in Dynmap
- Player image is removed entirely rather than mirroring Dynmap behaviour of showing a Steve head, to be consistent with player markers and chat.
- Images are also disabled in FollowTarget
2021-09-29 21:16:31 +01:00
James Lyne
fac72fd615 Use brighter colour for player marker dot 2021-09-29 19:59:01 +01:00
James Lyne
bf383afb8d Support disabling player marker images
- showplayerfaces: false in Dynmap, player-tracker.nameplate.show-head: false in Pl3xmap
- Remove showSkin option in favour of 'none' image size
2021-09-29 19:58:39 +01:00
James Lyne
5896d4504c Fix PlayerMarker name disappearing when hidden 2021-09-29 15:31:09 +01:00
James Lyne
016b784634 Fix PlayerMarker health/armor not displaying immediately 2021-09-29 15:02:17 +01:00
James Lyne
493fd91299 Remove extra PlayerMarker name padding when health/armor are both disabled 2021-09-29 15:01:34 +01:00
James Lyne
58199aaed0 Use large player image on Pl3xmap when both health/armor are enabled 2021-09-29 14:56:13 +01:00
James Lyne
5ce922505b Fix getMinecraftHead calls 2021-09-29 14:39:56 +01:00
James Lyne
96b43899a4 Optimise some images 2021-09-29 14:35:18 +01:00
James Lyne
5087d0e29c New health/armor images, PlayerMarker label style tweaks 2021-09-29 14:35:03 +01:00
James Lyne
66355dfe38 Decouple player image pixel size from PlayerMarker.
- Use single template image and set size after cloning
- Use util method to retrieve pixel size when needed
- Use LiveAtlasPlayerImageSize in getMinecraftHead
2021-09-29 14:33:52 +01:00
James Lyne
07d851fc86 Use 20 for health/armor meter max 2021-09-29 14:32:12 +01:00
James Lyne
770c9242a8 Player marker improvements
- Use <meter> for health/armor
- Condense small/body image properties into single image size option
- Remove image-size dependant margins
- Add circle alongside label for indicating player position
2021-09-29 01:30:35 +01:00
James Lyne
bfc0a381a8 Respect pl3xmap show-armor setting 2021-09-28 18:54:51 +01:00
James Lyne
c71e8289dd Only fetch Pl3xmap players when player markers are enabled 2021-09-28 18:38:34 +01:00
James Lyne
0ae8b11ce6 Ensure trailing / in Pl3xmap base URL 2021-09-28 13:33:05 +01:00
James Lyne
98d7ede3d9 Remove extra / from Pl3xmap players URL (Closes #125) 2021-09-28 13:32:42 +01:00
James Lyne
48b94f6bfb Fix parseUrl issues 2021-09-12 20:37:59 +01:00