From 36ce1368fce8d09bd481c13479c06c00ea026e6a Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Sat, 27 Jan 2024 00:50:24 +0100 Subject: [PATCH 1/3] Added dvanced caardview and Compact addresscomponent --- .../elements/CompactAddressComponent.vue | 35 ++++ src/components/elements/KeywordComponent.vue | 47 +++-- src/components/elements/ModalInner.vue | 32 +++ src/components/modals/ModalFrame.vue | 23 +-- src/views/AdvancedCardViewPage.vue | 182 ++++++++---------- 5 files changed, 177 insertions(+), 142 deletions(-) create mode 100644 src/components/elements/CompactAddressComponent.vue create mode 100644 src/components/elements/ModalInner.vue diff --git a/src/components/elements/CompactAddressComponent.vue b/src/components/elements/CompactAddressComponent.vue new file mode 100644 index 00000000..68794a42 --- /dev/null +++ b/src/components/elements/CompactAddressComponent.vue @@ -0,0 +1,35 @@ + + diff --git a/src/components/elements/KeywordComponent.vue b/src/components/elements/KeywordComponent.vue index dec80cb1..ee78d41b 100644 --- a/src/components/elements/KeywordComponent.vue +++ b/src/components/elements/KeywordComponent.vue @@ -5,13 +5,10 @@ :key="index" class="Keywords" > -

+

{{ keyword[0] }}

{{ keyword[1] }}

-
@@ -21,41 +18,41 @@ import * as R from "ramda"; import { useCardsRules } from "@/def-composables/useCardRules"; import { onMounted, reactive, watch } from "vue"; -const { rules } = useCardsRules() +const { rules } = useCardsRules(); -const props = withDefaults(defineProps<{ - keywords: Array> -}>(), { - keywords: () => [], -}) +const props = withDefaults( + defineProps<{ + keywords: Array>; + }>(), + { + keywords: () => [], + } +); const initialState: { - keywordDescriptions: Array> + keywordDescriptions: Array>; } = { - keywordDescriptions: new Array>() + keywordDescriptions: new Array>(), }; const state = reactive(initialState); const init = () => { state.keywordDescriptions = R.map( - (keyword) => [keyword, rules.value.definitions[firstLetterToLower(keyword as String)].description], - R.uniq(R.flatten(props.keywords)) - ) -} + (keyword) => [ + keyword, + rules.value.definitions[firstLetterToLower(keyword as String)] + .description, + ], + R.uniq(R.flatten(props.keywords)) + ); +}; const firstLetterToLower = (string: String) => { return string[0].toLowerCase() + string.substring(1); -} +}; watch(props, init); -onMounted(init) - +onMounted(init); - - \ No newline at end of file diff --git a/src/components/elements/ModalInner.vue b/src/components/elements/ModalInner.vue new file mode 100644 index 00000000..623fe87c --- /dev/null +++ b/src/components/elements/ModalInner.vue @@ -0,0 +1,32 @@ + + + diff --git a/src/components/modals/ModalFrame.vue b/src/components/modals/ModalFrame.vue index ff244e7a..a4fbd24e 100644 --- a/src/components/modals/ModalFrame.vue +++ b/src/components/modals/ModalFrame.vue @@ -1,24 +1,15 @@ \ No newline at end of file + From 1665fd361ad15bd4e06b5386a7d091f59ffcf557 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Sat, 27 Jan 2024 01:11:40 +0100 Subject: [PATCH 2/3] fixed Flavourtext --- src/views/AdvancedCardViewPage.vue | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/views/AdvancedCardViewPage.vue b/src/views/AdvancedCardViewPage.vue index 86ce6514..cb9cde48 100644 --- a/src/views/AdvancedCardViewPage.vue +++ b/src/views/AdvancedCardViewPage.vue @@ -9,10 +9,16 @@ class="lg:flex justify-center space-y-20 lg:space-y-0 lg:space-x-20 p-6" >
- +

"{{ state.card.FlavourText }}" - - +

+
+ +

Advanced Card Information

From 2009167d0fec22ae9866b85e0c88bca34a65ba72 Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Sat, 27 Jan 2024 01:12:30 +0100 Subject: [PATCH 3/3] fixed Flavourtext again --- src/views/AdvancedCardViewPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/AdvancedCardViewPage.vue b/src/views/AdvancedCardViewPage.vue index cb9cde48..e2e60c62 100644 --- a/src/views/AdvancedCardViewPage.vue +++ b/src/views/AdvancedCardViewPage.vue @@ -9,7 +9,7 @@ class="lg:flex justify-center space-y-20 lg:space-y-0 lg:space-x-20 p-6" >
-

+

"{{ state.card.FlavourText }}"