From d0a64c8533659307b9dbbfcae36af37eb722ef85 Mon Sep 17 00:00:00 2001 From: Lenni009 Date: Tue, 16 Jul 2024 13:52:34 +0200 Subject: [PATCH 1/9] add link hover colour --- src/style/style.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/style/style.css b/src/style/style.css index 5dd03d3..5b78bfc 100644 --- a/src/style/style.css +++ b/src/style/style.css @@ -5,6 +5,16 @@ url('/NMS-Glyphs-Mono.ttf') format('truetype'); } +:root { + --link-hover: #363636; +} + +@media (prefers-color-scheme: dark) { + :root { + --link-hover: #c9c9c9; + } +} + html { scrollbar-gutter: stable; } @@ -25,3 +35,7 @@ html { .select select { width: 100%; } + +a:hover { + color: var(--link-hover); +} From 1611e9434f62e9068d61c2454d5c156b6d6119c3 Mon Sep 17 00:00:00 2001 From: Lenni009 Date: Sat, 20 Jul 2024 18:51:46 +0200 Subject: [PATCH 2/9] restrict new endpoints to only space stations --- src/App.vue | 2 +- src/components/EditEndpointDialogue.vue | 12 +++++--- src/components/FilterInput.vue | 9 ++---- src/types/teleportEndpoint.ts | 41 +++++++++++++++---------- src/variables/limits.ts | 1 + 5 files changed, 37 insertions(+), 28 deletions(-) create mode 100644 src/variables/limits.ts diff --git a/src/App.vue b/src/App.vue index e7e1332..9f17532 100644 --- a/src/App.vue +++ b/src/App.vue @@ -53,7 +53,7 @@ const renderJson = computed(() => { v-for="endpoint in json" v-show="renderJson.includes(endpoint)" :endpoint-json="endpoint" - :key="endpoint.Name" + :key="`${endpoint.Name}${endpoint.UniverseAddress}`" /> diff --git a/src/components/EditEndpointDialogue.vue b/src/components/EditEndpointDialogue.vue index 2d2967c..da64178 100644 --- a/src/components/EditEndpointDialogue.vue +++ b/src/components/EditEndpointDialogue.vue @@ -3,12 +3,11 @@ import { addressToXYZ, createEndpoint, endpointToGlyphs } from '@/common'; import { useId } from '@/helpers/id'; import { useEndpointDataStore } from '@/store/endpointData'; import type { DialogProps } from '@/types/props'; -import { teleporterTypesEnum, type TeleporterTypes } from '@/types/teleportEndpoint'; +import { teleporterTypes, type TeleporterTypes } from '@/types/teleportEndpoint'; import { storeToRefs } from 'pinia'; import { computed, ref } from 'vue'; const props = withDefaults(defineProps(), { - open: false, endpointData: () => createEndpoint(), }); @@ -20,6 +19,11 @@ const newEndpointAddress = ref(endpointToGlyphs(props.endpointData)); const newEndpointGalaxy = ref((props.endpointData.UniverseAddress.RealityIndex + 1).toString()); const newEndpointType = ref(props.endpointData.TeleporterType); +const stationEndpoints = teleporterTypes.filter((item) => item.startsWith('Spacestation')); + +const isNewEndpoint = computed(() => !props.endpointData.Name); +const editButtonText = computed(() => (isNewEndpoint.value ? 'Add Endpoint' : 'Save Changes')); + function resetEndpointInputs() { newEndpointName.value = props.endpointData.Name; newEndpointAddress.value = endpointToGlyphs(props.endpointData); @@ -74,8 +78,6 @@ const ids = { galaxyInput: 'galaxyInput' + uniqueId, }; -const editButtonText = computed(() => (props.endpointData.Name ? 'Save Changes' : 'Add Endpoint')); - const isOutOfSafeRange = computed(() => { const systemIndex = newEndpointAddress.value.substring(1, 4); const systemNumber = parseInt(systemIndex, 16); @@ -127,7 +129,7 @@ const isOutOfSafeRange = computed(() => {