From 1099ebc13d68cf51f2f6a7ec18e366127f943713 Mon Sep 17 00:00:00 2001 From: ennucore Date: Thu, 15 Dec 2022 11:42:42 +0100 Subject: [PATCH] Started writing ZoneTable + improvements to the search bar --- .idea/workspace.xml | 30 +++++++----- src/components/DarkLayout.vue | 2 +- src/components/DomainBar.vue | 17 ++++--- src/components/ZoneTable.vue | 86 +++++++++++++++++++++++++++++++++++ src/router/index.ts | 12 +++-- src/views/Find.vue | 31 +++++++++++++ src/views/Get.vue | 6 +++ src/zone.ts | 27 +++++++++++ 8 files changed, 187 insertions(+), 24 deletions(-) create mode 100644 src/components/ZoneTable.vue create mode 100644 src/views/Find.vue create mode 100644 src/zone.ts diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2a7f36e..97aca1f 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,16 +1,15 @@ - - - - - + + + + - - + + - + @@ -76,7 +76,7 @@ - + 1670844191163 @@ -99,7 +99,14 @@ - \ No newline at end of file diff --git a/src/components/DarkLayout.vue b/src/components/DarkLayout.vue index 79750b6..301b6bf 100644 --- a/src/components/DarkLayout.vue +++ b/src/components/DarkLayout.vue @@ -2,7 +2,7 @@
-
+
diff --git a/src/components/DomainBar.vue b/src/components/DomainBar.vue index cf74426..6e8fc96 100644 --- a/src/components/DomainBar.vue +++ b/src/components/DomainBar.vue @@ -58,12 +58,11 @@ export default { border-radius: 1rem; width: 30rem; min-height: 5rem; - padding: 0 0.5rem; + padding: 0 1rem; background-color: #4e5a88; display: flex; - justify-content: center; - align-items: center; - place-items: center; + justify-content: space-between; + margin-bottom: 1rem; } /* flex container with vertical centering */ @@ -72,6 +71,8 @@ export default { justify-content: center; align-items: center; place-items: center; + margin-top: 1rem; + margin-bottom: 1rem; } /* the bar is narrower on mobile (90% of the screen) */ @@ -87,7 +88,7 @@ export default { .prompt { border-radius: 0.5rem; - min-width: 40%; + min-width: 8rem; height: 3rem; background-color: #363e5e; display: flex; @@ -102,8 +103,6 @@ export default { user-select: none; cursor: text; margin-right: 0.4rem; - margin-top: 0.5rem; - margin-bottom: 0.5rem; } /* #e36464 search button with #363e5e text */ @@ -121,7 +120,7 @@ export default { padding: 0 1rem; cursor: pointer; margin-left: 1rem; - margin-top: 0.5rem; - margin-bottom: 0.5rem; + margin-top: 1rem; + margin-bottom: 1rem; } \ No newline at end of file diff --git a/src/components/ZoneTable.vue b/src/components/ZoneTable.vue new file mode 100644 index 0000000..04b7b57 --- /dev/null +++ b/src/components/ZoneTable.vue @@ -0,0 +1,86 @@ + + + + + \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 9bbfee0..62bba14 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -25,9 +25,15 @@ const router = createRouter({ component: () => import('../views/TonDns.vue') }, { - path: '/get', - name: 'get', - component: () => import('../views/Get.vue') + path: '/get/:domain', + name: 'Get', + component: () => import('../views/Get.vue'), + props: true + }, + { + path: '/find', + name: 'Find', + component: () => import('../views/Find.vue') } ] }) diff --git a/src/views/Find.vue b/src/views/Find.vue new file mode 100644 index 0000000..df1a7b7 --- /dev/null +++ b/src/views/Find.vue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/src/views/Get.vue b/src/views/Get.vue index 6c5b1fd..58965fa 100644 --- a/src/views/Get.vue +++ b/src/views/Get.vue @@ -1,5 +1,6 @@ @@ -9,6 +10,11 @@ import DarkLayout from "../components/DarkLayout.vue"; import DomainBar from "../components/DomainBar.vue"; export default { name: "Get", + props: { + domain: { + type: String, + } + }, components: {DomainBar, DarkLayout} } diff --git a/src/zone.ts b/src/zone.ts new file mode 100644 index 0000000..3599343 --- /dev/null +++ b/src/zone.ts @@ -0,0 +1,27 @@ +/* Define type Zone with the string zone (like .example.ton) and terms (prices with different conditions) */ +export class Zone { + zone: string; + min_length: number; + length_1: number; + length_2: number; + price_buy_1?: number; + price_buy_2?: number; + price_auction_1?: number; + price_auction_2?: number; + + constructor(zone: string, + price_buy_1?: number, price_buy_2?: number, price_auction_1?: number, price_auction_2?: number, + min_length: number = 2, length_1: number = 3, length_2: number = 8 + ) { + this.zone = zone; + this.min_length = min_length; + this.length_1 = length_1; + this.length_2 = length_2; + this.price_buy_1 = price_buy_1; + this.price_buy_2 = price_buy_2; + this.price_auction_1 = price_auction_1; + this.price_auction_2 = price_auction_2; + } + + +}