Browse Source

Back button + stuff for deploy

vue
Lev 2 years ago
parent
commit
6e71aba476
  1. 19
      .idea/workspace.xml
  2. 6
      src/api.ts
  3. 6
      src/result.ts
  4. 8
      src/views/Checkout.vue
  5. 3
      tsconfig.json

19
.idea/workspace.xml

@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="ddb8afd5-d3ba-47b1-b6d0-227403f1abf7" name="Changes" comment="Awesome QR at checkout"> <list default="true" id="ddb8afd5-d3ba-47b1-b6d0-227403f1abf7" name="Changes" comment="Add (almost) monochrome logo + loading QR on checkout">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/api.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/api.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/result.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/result.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/views/Checkout.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Checkout.vue" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/views/Checkout.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Checkout.vue" afterDir="false" />
<change beforePath="$PROJECT_DIR$/tsconfig.json" beforeDir="false" afterPath="$PROJECT_DIR$/tsconfig.json" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -71,7 +74,7 @@
<workItem from="1670927344373" duration="29000" /> <workItem from="1670927344373" duration="29000" />
<workItem from="1670927391338" duration="2277000" /> <workItem from="1670927391338" duration="2277000" />
<workItem from="1671024025708" duration="19806000" /> <workItem from="1671024025708" duration="19806000" />
<workItem from="1671204365793" duration="19693000" /> <workItem from="1671204365793" duration="22162000" />
</task> </task>
<task id="LOCAL-00001" summary="Wrote the landing"> <task id="LOCAL-00001" summary="Wrote the landing">
<created>1670844191163</created> <created>1670844191163</created>
@ -157,7 +160,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1671302241009</updated> <updated>1671302241009</updated>
</task> </task>
<option name="localTasksCounter" value="13" /> <task id="LOCAL-00013" summary="Add (almost) monochrome logo + loading QR on checkout">
<created>1671302856594</created>
<option name="number" value="00013" />
<option name="presentableId" value="LOCAL-00013" />
<option name="project" value="LOCAL" />
<updated>1671302856594</updated>
</task>
<option name="localTasksCounter" value="14" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
@ -187,6 +197,7 @@
<MESSAGE value="Checkout, Explore" /> <MESSAGE value="Checkout, Explore" />
<MESSAGE value="&quot;All zones&quot; button + some other stuff" /> <MESSAGE value="&quot;All zones&quot; button + some other stuff" />
<MESSAGE value="Awesome QR at checkout" /> <MESSAGE value="Awesome QR at checkout" />
<option name="LAST_COMMIT_MESSAGE" value="Awesome QR at checkout" /> <MESSAGE value="Add (almost) monochrome logo + loading QR on checkout" />
<option name="LAST_COMMIT_MESSAGE" value="Add (almost) monochrome logo + loading QR on checkout" />
</component> </component>
</project> </project>

6
src/api.ts

@ -1,5 +1,11 @@
import axios from 'axios' import axios from 'axios'
declare var process : {
env: {
NODE_ENV: string
}
}
export class Api { export class Api {
public readonly api_url: string; public readonly api_url: string;

6
src/result.ts

@ -40,7 +40,7 @@ const sleep = (milliseconds: number) => {
export async function get_search_results(query: string) { export async function get_search_results(query: string) {
// return await call_api('find/' + query); // return await call_api('find/' + query);
await sleep(1000); await sleep(200);
return [ return [
new Result(query + '.ton', 5, 3), new Result(query + '.ton', 5, 3),
new Result(query + '.ton', 1), new Result(query + '.ton', 1),
@ -51,7 +51,7 @@ export async function get_search_results(query: string) {
export async function get_domain_result(domain: string) { export async function get_domain_result(domain: string) {
// return await call_api('get/' + domain); // return await call_api('get/' + domain);
await sleep(1000); await sleep(100);
if (domain === 'test.ton') { if (domain === 'test.ton') {
return new Result(domain); return new Result(domain);
} }
@ -80,5 +80,5 @@ export class TonLink {
// Get the link for buying a domain // Get the link for buying a domain
export function get_ton_link(res: Result) { export function get_ton_link(res: Result) {
return new TonLink(res.zone(), res.buy_price!, 'b/' + res.domain); return new TonLink(res.zone(), 'b/' + res.domain, res.buy_price!);
} }

8
src/views/Checkout.vue

@ -1,5 +1,13 @@
<template> <template>
<DarkLayout> <DarkLayout>
<template v-slot:header>
<router-link :to="{name: 'Get', params: {domain_init: domain, zone: zone}}">
<button class="b darkish back">
<img src="@/assets/icons/ton_left.svg" alt="TON"/>
Back
</button>
</router-link>
</template>
<!-- todo: button to go back to Get --> <!-- todo: button to go back to Get -->
<!-- todo: handle auction --> <!-- todo: handle auction -->
<div class="text">To buy</div> <div class="text">To buy</div>

3
tsconfig.json

@ -5,7 +5,8 @@
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
} },
"allowJs": true
}, },
"references": [ "references": [

Loading…
Cancel
Save