From 4b834aa0b00e80c5ba9c09c6e8b2bec1a637f38a Mon Sep 17 00:00:00 2001 From: James Lyne Date: Wed, 12 Jan 2022 13:20:23 +0000 Subject: [PATCH] Split lists into their own components --- src/components/Sidebar.vue | 26 ++++----- src/components/list/PlayerList.vue | 41 +++++++++++++ .../{sidebar => list}/PlayerListItem.vue | 0 src/components/list/ServerList.vue | 43 ++++++++++++++ .../{sidebar => list}/ServerListItem.vue | 0 src/components/list/WorldList.vue | 58 +++++++++++++++++++ .../{sidebar => list}/WorldListItem.vue | 0 src/components/map/MapContextMenu.vue | 2 +- ...llowTarget.vue => FollowTargetSection.vue} | 2 +- .../{PlayerList.vue => PlayersSection.vue} | 13 ++--- .../{ServerList.vue => ServersSection.vue} | 14 ++--- src/components/sidebar/SidebarSection.vue | 2 +- .../{WorldList.vue => WorldsSection.vue} | 14 ++--- 13 files changed, 172 insertions(+), 43 deletions(-) create mode 100644 src/components/list/PlayerList.vue rename src/components/{sidebar => list}/PlayerListItem.vue (100%) create mode 100644 src/components/list/ServerList.vue rename src/components/{sidebar => list}/ServerListItem.vue (100%) create mode 100644 src/components/list/WorldList.vue rename src/components/{sidebar => list}/WorldListItem.vue (100%) rename src/components/sidebar/{FollowTarget.vue => FollowTargetSection.vue} (99%) rename src/components/sidebar/{PlayerList.vue => PlayersSection.vue} (87%) rename src/components/sidebar/{ServerList.vue => ServersSection.vue} (77%) rename src/components/sidebar/{WorldList.vue => WorldsSection.vue} (79%) diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index e03398d..7e0522d 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -30,21 +30,21 @@ diff --git a/src/components/sidebar/PlayerListItem.vue b/src/components/list/PlayerListItem.vue similarity index 100% rename from src/components/sidebar/PlayerListItem.vue rename to src/components/list/PlayerListItem.vue diff --git a/src/components/list/ServerList.vue b/src/components/list/ServerList.vue new file mode 100644 index 0000000..d7ec69a --- /dev/null +++ b/src/components/list/ServerList.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/components/sidebar/ServerListItem.vue b/src/components/list/ServerListItem.vue similarity index 100% rename from src/components/sidebar/ServerListItem.vue rename to src/components/list/ServerListItem.vue diff --git a/src/components/list/WorldList.vue b/src/components/list/WorldList.vue new file mode 100644 index 0000000..b46227b --- /dev/null +++ b/src/components/list/WorldList.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/src/components/sidebar/WorldListItem.vue b/src/components/list/WorldListItem.vue similarity index 100% rename from src/components/sidebar/WorldListItem.vue rename to src/components/list/WorldListItem.vue diff --git a/src/components/map/MapContextMenu.vue b/src/components/map/MapContextMenu.vue index 825a935..9975150 100644 --- a/src/components/map/MapContextMenu.vue +++ b/src/components/map/MapContextMenu.vue @@ -45,7 +45,7 @@ import LiveAtlasLeafletMap from "@/leaflet/LiveAtlasLeafletMap"; import {computed, defineComponent, onMounted, onUnmounted, watch} from "@vue/runtime-core"; import {LeafletMouseEvent} from "leaflet"; import {useStore} from "@/store"; -import WorldListItem from "@/components/sidebar/WorldListItem.vue"; +import WorldListItem from "@/components/list/WorldListItem.vue"; import {CSSProperties, ref} from "vue"; import {clipboardError, clipboardSuccess, getUrlForLocation} from "@/util"; import {nextTick} from 'vue'; diff --git a/src/components/sidebar/FollowTarget.vue b/src/components/sidebar/FollowTargetSection.vue similarity index 99% rename from src/components/sidebar/FollowTarget.vue rename to src/components/sidebar/FollowTargetSection.vue index fab891a..e885195 100644 --- a/src/components/sidebar/FollowTarget.vue +++ b/src/components/sidebar/FollowTargetSection.vue @@ -44,7 +44,7 @@ import SvgIcon from "@/components/SvgIcon.vue"; import "@/assets/icons/cross.svg"; export default defineComponent({ - name: 'FollowTarget', + name: 'FollowTargetSection', components: {SvgIcon}, props: { target: { diff --git a/src/components/sidebar/PlayerList.vue b/src/components/sidebar/PlayersSection.vue similarity index 87% rename from src/components/sidebar/PlayerList.vue rename to src/components/sidebar/PlayersSection.vue index 67888f1..8418207 100644 --- a/src/components/sidebar/PlayerList.vue +++ b/src/components/sidebar/PlayersSection.vue @@ -1,5 +1,5 @@