Commit Graph

568 Commits

Author SHA1 Message Date
James Lyne
83bc0ec86d Freeze/seal marker related objects in Pl3xmap provider 2021-09-10 15:31:05 +01:00
James Lyne
8bf0fe04a7 Split DynmapMapProvider build methods into their own file 2021-09-10 15:30:29 +01:00
James Lyne
f90b32c41a Cleanup App.vue and parseUrl
- Fix double event listener add in unmount hook
- Remove onUrlChange as it does the same thing as handleUrl
- Merge duplicate mount/unmount hooks
- Pass a URL to parseUrl instead of directly using window.location
2021-09-10 15:29:27 +01:00
James Lyne
969e9db5cc Cleanup App.vue
- Fix double event listener add in unmount hook
- Remove onUrlChange as it does the same thing as handleUrl
- Merge duplicate mount/unmount hooks
2021-09-10 15:28:12 +01:00
James Lyne
6450b76439 Switch to modern-normalize 2021-09-08 19:28:39 +01:00
James Lyne
63a00d0681 Move loginEnabled logic to store getter 2021-09-08 15:23:21 +01:00
James Lyne
0e57a50e0c Cleanup redundant useStore calls 2021-09-08 15:21:27 +01:00
James Lyne
56470790de Convert more components to composition api 2021-09-08 15:20:04 +01:00
James Lyne
1b9a3e4f1a Cleanup configuration loading a bit
- Move configuration hash clearing to RESET
- Dispatch STOP_UPDATES and RESET actions from LOAD_CONFIGURATION action
- Make exception handling simpler
2021-09-08 14:35:44 +01:00
James Lyne
aca007ee94 Reset zoom level when switching worlds 2021-09-07 23:20:35 +01:00
James Lyne
ba02a2148f Only allow maps shortcut when login required modal is open 2021-09-07 23:14:54 +01:00
James Lyne
12632004d1 Move loginRequired state into store, reset login related state in RESET 2021-09-07 23:10:57 +01:00
James Lyne
b2f58f681c Fully support Pl3xmap URLs 2021-09-07 23:08:44 +01:00
James Lyne
46c9468214 Remove some debug logging 2021-09-01 18:42:26 +01:00
James Lyne
ab5ede1ccc Only reset splash screen state on server changes, reset loading attempts correctly. 2021-09-01 18:14:19 +01:00
James Lyne
78655e7ebe Don't clear parsed url on config load 2021-09-01 18:06:49 +01:00
James Lyne
ca9b3ce1f4 Quick fix for world with many maps defined
Need a better long term solution for this
2021-09-01 17:53:08 +01:00
James Lyne
c1ed50f8c4 Make player markers interactive 2021-09-01 17:47:43 +01:00
James Lyne
eb7d31669f Fix build 2021-09-01 17:47:29 +01:00
James Lyne
d682358306 Limit width of marker labels in a better way 2021-09-01 17:40:16 +01:00
James Lyne
79fc8f6816 Reuse existing players pane if present 2021-09-01 17:39:44 +01:00
James Lyne
77b9850ea9 Marker refactoring
- Don't extend DivIcon as we don't use anything that class provides
- Update PlayerMarker icon using internal watch
- Remove unused panTo() PlayerMarker method
- Apply needed parts of _setIconStyles directly in GenericIcon's createIcon
2021-09-01 17:38:42 +01:00
James Lyne
fb53ad195c Improve login ux on smaller screens
- Hide other UI elements when modal opens, to reduce clutter
- Hide login required modal if the server list is opened, to allow switching servers without overlapping the modal
- Use tel input for registration code
2021-09-01 02:18:02 +01:00
James Lyne
5350c2483f Reset splash screen on show instead of hide 2021-09-01 02:15:51 +01:00
James Lyne
ca3d3c7442 Update chat login button to use login modal 2021-09-01 02:15:00 +01:00
James Lyne
c015886f4a Improve login modal mobile styling 2021-09-01 02:13:44 +01:00
James Lyne
4fbd41c040 Add configurable invalid input border color 2021-09-01 01:07:24 +01:00
James Lyne
aa78d6ad63 Change Maps button to a Servers button when <2 maps are defined in the current server 2021-09-01 01:06:43 +01:00
James Lyne
8a7a05c0d1 Prevent closing and allow server selection from login required modal, 2021-09-01 01:05:30 +01:00
James Lyne
21cb8da32f Modal updates
- Add options for removing backdrop and preventing closing
- Add close button
- Style tweaks
2021-09-01 01:00:42 +01:00
James Lyne
1e4c8a080f Revert "Drop :active styles"
This reverts commit 146aadb9
2021-08-31 19:56:42 +01:00
James Lyne
c4230fda7d Use --outline-focus for map focus indicator 2021-08-31 17:46:02 +01:00
James Lyne
0b05ad05e4 Focus login button when closing modal 2021-08-31 17:45:37 +01:00
James Lyne
ca60f2bb09 Store and clear loadConfiguration timeouts
- Avoids double loads if switching servers right after a config load has failed
2021-08-31 17:45:05 +01:00
James Lyne
3cb9f8f315 Fix super call in GenericIcon 2021-08-31 16:41:11 +01:00
James Lyne
fdf5e521d8 Prefer using super over prototype calls 2021-08-31 16:38:19 +01:00
James Lyne
0ae42a9409 Fix typings for LiveAtlasTileLayer _tiles property 2021-08-31 16:35:30 +01:00
James Lyne
00483025cd Correctly cleanup CoordinatesControl event handlers 2021-08-31 16:00:11 +01:00
James Lyne
f1d38e7485 Fix layer control error when switching servers 2021-08-31 15:55:39 +01:00
James Lyne
a82052714d aria-live login modal alerts 2021-08-31 15:03:33 +01:00
James Lyne
8deabad47b Refactor mutations
- Remove some unused mutations
- Move CLEAR_PLAYERS into RESET
- Clear chat history in RESET
2021-08-31 15:03:32 +01:00
James Lyne
9fd53d754e Reduce CoordinatesControl layout shifts 2021-08-31 15:03:32 +01:00
James Lyne
76f151a64c First attempt at login/register 2021-08-30 22:28:20 +01:00
James Lyne
6028779b45 Icon optimisations
- Ran icons through SVGo
- Removed some remaining unneeded attributes
2021-08-30 22:28:19 +01:00
James Lyne
b426ed3cae Refactor fetch logic
- Add credentials: include
- Allow passing arbitrary options to fetch, and rename existing simple get to getJSON
2021-08-30 22:28:19 +01:00
James Lyne
e41a841bdb Don't make sendChatMessage abstract 2021-08-30 22:28:19 +01:00
James Lyne
dc0a03daa8 Refactor server configuration loading
- Move store cleanup to single RESET mutation
- Move showSplash, RESET and STOP_UPDATES calls into loadConfiguration
2021-08-30 22:28:15 +01:00
James Lyne
0fba7747c8 Reset splash error state on hide 2021-08-30 22:02:57 +01:00
James Lyne
882efa8373
Merge pull request #94 from JLyne/dependabot/npm_and_yarn/typescript-4.4.2
Bump typescript from 4.3.5 to 4.4.2
2021-08-27 03:07:51 +01:00
James Lyne
ec115615d1 Fix build with Typescript 4.4 2021-08-27 02:40:25 +01:00
James Lyne
ed52f811bc More button style tweaks 2021-08-27 02:26:21 +01:00
James Lyne
116c9efa0d Use cross icon for unfollow button 2021-08-27 02:26:04 +01:00
James Lyne
a2b1bd148f Fix context menu styling 2021-08-27 02:04:23 +01:00
James Lyne
8e381d5b90 Disable tile image smoothing on Firefox 2021-08-27 01:58:27 +01:00
James Lyne
959db53b11 Use newest version of leaflet fork with stripped down styling. Simplify leaflet-related LiveAtlas styling. 2021-08-27 01:58:05 +01:00
James Lyne
379b4978ae Update button styles 2021-08-26 22:44:03 +01:00
James Lyne
d0d24d528f Fix display issues with long player names in player list 2021-08-26 22:23:47 +01:00
James Lyne
b37d5d6739 Remove redundant loading control css animation 2021-08-26 22:05:20 +01:00
James Lyne
e6e7e3d9f9 Optimise icons 2021-08-26 21:57:47 +01:00
James Lyne
15e66bf222 New players/maps icons 2021-08-26 21:57:06 +01:00
James Lyne
ca8142cca8 Use declare for leaflet defined fields 2021-08-26 21:40:54 +01:00
James Lyne
6c861bb927 New link icon 2021-08-26 00:54:40 +01:00
James Lyne
ba070eee9a Style updates
- Add new variable for selected colour, using old hover colour
- More subtle hover colour
- Dimmer selected colour
- Bold font on selected elements for better readability
- Tweaked text colours
- Use brighter text colour for headings
- Reduced border-radius
- Restore some missing text shadows
2021-08-26 00:54:40 +01:00
James Lyne
146aadb963 Drop :active styles 2021-08-26 00:54:40 +01:00
James Lyne
89c56e176b Some style refactoring
- Use CSS variables for UI element size/spacing
- Make buttons smaller on smaller screens
- Reduce location size on smaller screens
- Add common leaflet-control-button class for all button-y controls
2021-08-26 00:54:40 +01:00
James Lyne
2d485ac4e5 Fix marker labels disappearing when toggling a showLabels: true layer twice 2021-08-16 04:21:48 +01:00
James Lyne
552b289bb9 Avoid recreating tiles from scratch when refreshing Pl3xmap 2021-08-16 03:33:28 +01:00
James Lyne
f316c0dd50 Use fetch for tile loads, move loading logic to LiveAtlasTileLayer 2021-08-16 03:08:35 +01:00
James Lyne
280e036276 Basic support for Pl3xmap tile update interval 2021-08-13 23:51:03 +01:00
James Lyne
13260bbfeb Fix placeholders in Pl3xmap page title 2021-08-12 14:27:39 +01:00
James Lyne
6aa9aaf2bd Only set config hash if present in update response
Prevents infinite reloading if the update response doesn't contain a hash for some reason
2021-08-03 02:26:43 +01:00
James Lyne
eba8a5b7e1 Fix incorrect player head URL (Fixes #2) 2021-08-02 17:12:29 +01:00
James Lyne
b143fc1561 Player list heading fixes 2021-07-29 19:16:37 +01:00
James Lyne
f4aca39975 Fix incorrect Dynmap player head URL generation 2021-07-29 19:05:33 +01:00
James Lyne
2ff16c81ed Merge remote-tracking branch 'origin/master' 2021-07-29 18:20:05 +01:00
James Lyne
e07ac55c33 Merge branch 'pl3xmap'
# Conflicts:
#	src/api.ts
#	src/components/Map.vue
#	src/components/map/layer/MapLayer.vue
#	src/components/map/layer/MarkerSetLayer.vue
#	src/components/map/vector/Areas.vue
#	src/components/map/vector/Circles.vue
#	src/components/map/vector/Lines.vue
#	src/components/map/vector/Markers.vue
#	src/components/sidebar/WorldListItem.vue
#	src/dynmap.d.ts
#	src/index.d.ts
#	src/leaflet/icon/GenericIcon.ts
#	src/leaflet/layer/LiveAtlasLayerGroup.ts
#	src/leaflet/tileLayer/DynmapTileLayer.ts
#	src/leaflet/vector/LiveAtlasPolygon.ts
#	src/leaflet/vector/LiveAtlasPolyline.ts
#	src/model/LiveAtlasMapDefinition.ts
#	src/model/LiveAtlasProjection.ts
#	src/store/actions.ts
#	src/store/getters.ts
#	src/store/state.ts
#	src/util.ts
#	src/util/areas.ts
#	src/util/circles.ts
#	src/util/lines.ts
#	src/util/markers.ts
2021-07-29 18:15:35 +01:00
James Lyne
38946d7015 Initial pl3xmap support 2021-07-29 18:06:19 +01:00
James Lyne
a7fa366635 Create marker labels lazily when showLabels is false 2021-07-29 17:46:11 +01:00
James Lyne
f5002ed828
Fix URL zoom being ignored on initial load (Fixes #59) 2021-07-29 14:14:01 +01:00
James Lyne
02c705de36 Fix build errors 2021-07-29 03:39:28 +01:00
James Lyne
90ec2080ee Add tooltip support 2021-07-29 03:06:05 +01:00
James Lyne
d05b7a63ac Use playerMarkers.layerName for the layer name 2021-07-29 00:34:40 +01:00
James Lyne
ee8607ed6d Fix player layer duplicating in some situations 2021-07-29 00:34:18 +01:00
James Lyne
8151dfaab5 Make followZoom optional 2021-07-28 23:52:51 +01:00
James Lyne
b3f186a197 Move grayHiddenPlayers to playerMarkers component 2021-07-28 23:52:03 +01:00
James Lyne
7bff12b729 Move maxPlayers to separate field in store, add mutation 2021-07-28 23:50:59 +01:00
James Lyne
4feb46c641 Move player count/max into playersHeading 2021-07-28 22:27:43 +01:00
James Lyne
4350fae1d5 Fix uuid handling in player map 2021-07-28 22:17:02 +01:00
James Lyne
110c75f9a3 Allow partial updates of component settings 2021-07-28 22:16:26 +01:00
James Lyne
d04226e3ec Refactor popup handling
- Merge label and popupContent properties for vector layers, as only one is ever used
- Move common vector methods to separate file and remove duplicates
- Rename isHTML properties to be clearer
2021-07-28 17:49:38 +01:00
James Lyne
2a216dd4e8 Path performance improvements
- Avoid intermediate objects when creating leaflet objects to reduce allocations
- Make individual path objects non-reactive
- Avoid projecting path points twice during updates
2021-07-28 04:04:47 +01:00
James Lyne
9517de0760 Path point handling changes
- Store path points as {x,y,z} objects instead of separate arrays
- Project point objects right before layer creation
- A bit slower overall but matches the format of Pl3xmap path points.
2021-07-28 04:04:46 +01:00
James Lyne
c69aeb8f5f Make map definitions non-reactive to improve projection performance 2021-07-27 04:31:43 +01:00
James Lyne
42f8cbd74b Show maps button if there is a single map but multiple servers 2021-07-27 02:36:24 +01:00
James Lyne
d37657d3e2 Prevent unnecessary marker repositioning on world change 2021-07-27 02:28:01 +01:00
James Lyne
0aa61517dc Set the correct world object in map definitions 2021-07-26 01:05:08 +01:00
James Lyne
5cf353cd8a Update license headers 2021-07-26 01:05:08 +01:00
James Lyne
9e2caa6f63 More type renaming 2021-07-26 01:05:08 +01:00
James Lyne
5fb0a3e2f4 Move night/update handling into DynmapTileLayer 2021-07-26 01:05:07 +01:00
James Lyne
355c0c71cf Restructure LiveAtlasServerDefinition 2021-07-26 01:05:07 +01:00
James Lyne
e61d0def04 Replace serverConfig getter with MapProvider url methods 2021-07-26 01:05:07 +01:00
James Lyne
e7945b3f9a Add fields to DynmapTileLayer 2021-07-26 01:05:07 +01:00
James Lyne
e4e7dfcd5f Move fetchJSON to abstract MapProvider 2021-07-26 01:05:07 +01:00
James Lyne
ad9af04e9e Rename world/map title to displayName 2021-07-26 01:05:05 +01:00
James Lyne
c202def955 Move login from configuration to components 2021-07-26 01:04:18 +01:00
James Lyne
e46a97df15 Fix scheduledZoom/scheduledPan handling on map change 2021-07-26 01:04:18 +01:00
James Lyne
0c1ca36be1 Fix build 2021-07-26 01:04:18 +01:00
James Lyne
bc38af3254 Use generic names for more types 2021-07-26 01:04:18 +01:00
James Lyne
cba4b33e1a Refactor DynmapMapProvider.ts 2021-07-26 01:04:18 +01:00
James Lyne
e809f28455 (Re)move some config store properties 2021-07-26 01:04:18 +01:00
James Lyne
1d27e05f7c Rename DynmapPlayer to LiveAtlasPlayer, rename some fields, add uuid field 2021-07-26 01:04:18 +01:00
James Lyne
44b3a7e276 Remove updateInterval from store 2021-07-26 01:04:18 +01:00
James Lyne
33b5b305e2 Add MapProvider, move dynmap api handling to DynmapMapProvider 2021-07-26 01:04:17 +01:00
James Lyne
c99215e259 Use generic names for extended leaflet classes 2021-07-26 01:04:17 +01:00
James Lyne
ef26d78c19 Refactor map handling
- Map definitions now have their own class
- A map's projection is now a private property of the instance. Coordinates are converted via map instance methods.
- Moved map icon handling to instance getter
- Removed currentProjection and related mutations from store
- Changed currentProjection watchers to currentMap
2021-07-26 01:04:13 +01:00
James Lyne
9021c5291d Use generic names for extended leaflet classes 2021-07-23 22:28:06 +01:00
James Lyne
c7ec76767e Refactor map handling
- Map definitions now have their own class
- A map's projection is now a private property of the instance. Coordinates are converted via map instance methods.
- Moved map icon handling to instance getter
- Removed currentProjection and related mutations from store
- Changed currentProjection watchers to currentMap
2021-07-23 20:42:18 +01:00
James Lyne
b9807b3a7b Fix config validation 2021-07-22 23:18:26 +01:00
James Lyne
dd17bc63bd Avoid applying the base background colour twice to buttons in leaflet-controls 2021-07-22 23:18:18 +01:00
James Lyne
01907f22a0 Fix players button title 2021-07-22 20:47:37 +01:00
James Lyne
8b064f6217 Fix misaligned sidebar buttons on landscape mobile 2021-07-22 03:10:29 +01:00
James Lyne
636bebd237 Focus style improvements
- Replace js :focus-visible polyfill with css
- Improve fallback :focus styles
2021-07-22 02:48:09 +01:00
James Lyne
79dfea446b More lenient nether regex 2021-07-21 21:24:15 +01:00
James Lyne
2f107b2126 Add world dimension property 2021-07-21 17:27:24 +01:00
James Lyne
ea181f3a0b Tweak mobile sidebar padding 2021-07-21 16:54:53 +01:00
James Lyne
f2b810f56b Reduce layer list padding 2021-07-21 16:19:39 +01:00
James Lyne
028cb4e1af Player list search 2021-07-21 16:19:18 +01:00
James Lyne
649f571a20 Configuration improvements
- Default playersAboveMarkers to true to match previous behaviour
- Move all window.liveAtlasConfig handling to main.ts and a single mutation
- Rename server configuration mutations to differentiate server and global configurations
2021-07-20 21:18:41 +01:00
James Lyne
c67db75586 Fix typo 2021-07-20 20:37:42 +01:00
James Lyne
fbe252472f Add setting for displaying players above/below other markers (Fixes #14) 2021-07-20 20:27:07 +01:00
James Lyne
2598f1794e Hidden player fixes
- Don't apply other-world class for hidden players
- Use opacity instead of grayscale for player name to preserve colours (Fixes #40)
2021-07-20 16:32:10 +01:00
James Lyne
92a854701a Update map, pan and zoom if the url is edited manually 2021-07-20 03:25:42 +01:00
James Lyne
9bea4519c6 Rename some types 2021-07-19 16:40:30 +01:00
James Lyne
ee910453d5 Make menu buttons transparent by default properly 2021-07-19 00:37:57 +01:00
James Lyne
bfe3814aa9 Make menu buttons transparent by default 2021-07-19 00:35:42 +01:00
James Lyne
0081dcfa3a Override player name colours when hovering etc 2021-06-23 22:59:48 +01:00
James Lyne
d39a17d627 Increase sidebar width a bit 2021-06-23 22:57:47 +01:00
James Lyne
8fd92267b8 Fix long player name display in sidebar 2021-06-23 22:57:34 +01:00
James Lyne
14a49126f2 Cleanup 2021-06-23 18:19:09 +01:00
James Lyne
f9e55ff673 Hide player list when playermarkers component is disabled (Fixes #21) 2021-06-23 18:18:42 +01:00
James Lyne
362ac3cbdc Respect --border-radius in zoom control (Fixes #36) 2021-06-23 17:57:52 +01:00
James Lyne
006a536a89 Sort player list by dynmap sort value, then alphabetically (Fixes #37) 2021-06-23 17:40:56 +01:00
James Lyne
e130aaead1 Fix sidebar button positioning on wide short mobile resolutions 2021-06-22 18:55:39 +01:00
James Lyne
c2a43f6414 Fix indentation 2021-06-22 18:25:19 +01:00
James Lyne
0698085d98 Improve display of long layer names (Fixes #32) 2021-06-22 18:24:22 +01:00
James Lyne
72ea95d52b Hide context menu map list when there's no other maps to switch to 2021-06-13 01:16:32 +01:00
James Lyne
ae9358bdbe Fix build 2021-06-13 01:09:33 +01:00
James Lyne
bd8fe7ba5e Update PlayerListItem.vue 2021-06-13 01:06:58 +01:00
James Lyne
a623179039 Respect dynmap append_to_world setting (Fixes #28) 2021-06-13 00:52:56 +01:00
James Lyne
c65da2ad03 Use surface icon for maps named "surface" in nether/end worlds 2021-06-13 00:40:03 +01:00