From df487ec3647949fc277db7d09d932b412ecfac5f Mon Sep 17 00:00:00 2001 From: James Lyne Date: Tue, 26 Jan 2021 20:37:29 +0000 Subject: [PATCH] export Util functions separately --- src/App.vue | 8 +- src/components/chat/ChatMessage.vue | 4 +- src/components/map/vector/Areas.vue | 8 +- src/components/map/vector/Circles.vue | 8 +- src/components/map/vector/Lines.vue | 8 +- src/components/sidebar/FollowTarget.vue | 4 +- src/components/sidebar/PlayerListItem.vue | 4 +- src/leaflet/control/ClockControl.ts | 4 +- src/leaflet/icon/PlayerIcon.ts | 4 +- src/store/getters.ts | 6 +- src/util.ts | 274 +++++++++++----------- 11 files changed, 165 insertions(+), 167 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2b4972a..5c7c4b3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,7 +27,7 @@ import Sidebar from './components/Sidebar.vue'; import ChatBox from './components/ChatBox.vue'; import {useStore} from "./store"; import {ActionTypes} from "@/store/action-types"; -import Util from '@/util'; +import {parseUrl} from '@/util'; import {MutationTypes} from "@/store/mutation-types"; export default defineComponent({ @@ -85,8 +85,8 @@ export default defineComponent({ updateTimeout.value = 0; }, - parseUrl = () => { - const parsedUrl = Util.parseUrl(); + handleUrl = () => { + const parsedUrl = parseUrl(); if(parsedUrl) { //Remove legacy url if one was parsed @@ -115,7 +115,7 @@ export default defineComponent({ onMounted(() => loadConfiguration()); onBeforeUnmount(() => stopUpdates()); - parseUrl(); + handleUrl(); onResize(); onMounted(() => window.addEventListener('resize', onResize)); diff --git a/src/components/chat/ChatMessage.vue b/src/components/chat/ChatMessage.vue index 94cf01b..80afcd8 100644 --- a/src/components/chat/ChatMessage.vue +++ b/src/components/chat/ChatMessage.vue @@ -25,7 +25,7 @@