+
By template
-
\ No newline at end of file
+
diff --git a/src/components/Switcher.vue b/src/components/Switcher.vue
new file mode 100644
index 0000000..d2a6f45
--- /dev/null
+++ b/src/components/Switcher.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
diff --git a/src/components/TemplatesList.vue b/src/components/TemplatesList.vue
new file mode 100644
index 0000000..16c8417
--- /dev/null
+++ b/src/components/TemplatesList.vue
@@ -0,0 +1,287 @@
+
+
+
+
+
+
+
+
+
+
+
+ Save
+
+
+ Confirm in the wallet...
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/TonButton.vue b/src/components/TonButton.vue
index f56a950..719941b 100644
--- a/src/components/TonButton.vue
+++ b/src/components/TonButton.vue
@@ -1,14 +1,14 @@
-
+
\ No newline at end of file
+
diff --git a/src/components/Tooltip.vue b/src/components/Tooltip.vue
new file mode 100644
index 0000000..6c4a3d9
--- /dev/null
+++ b/src/components/Tooltip.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
diff --git a/src/components/WhiteLayout.vue b/src/components/WhiteLayout.vue
index a00e530..a648c69 100644
--- a/src/components/WhiteLayout.vue
+++ b/src/components/WhiteLayout.vue
@@ -1,6 +1,6 @@
-
+
@@ -14,8 +14,8 @@
- {{nexttext}}
-
+ {{ nexttext }}
+
@@ -28,17 +28,17 @@ import Header from "../components/Header.vue";
export default {
name: "WhiteLayout",
- components: {Header},
+ components: { Header },
props: {
next: {
- type: String
+ type: String,
},
nexttext: {
type: String,
- default: "Next"
- }
- }
-}
+ default: "Next",
+ },
+ },
+};
\ No newline at end of file
+
diff --git a/src/components/ZonePricing.vue b/src/components/ZonePricing.vue
index a4ac0aa..66a0f98 100644
--- a/src/components/ZonePricing.vue
+++ b/src/components/ZonePricing.vue
@@ -10,79 +10,98 @@
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- {{ '*'.repeat(zone.length_1) + '.' + zone.zone }}
-
- {{ zone.price_auction_1 }}
-
-
- {{ zone.price_buy_1 }}
-
-
-
- {{ '*'.repeat(zone.length_2) + '.' + zone.zone }}
-
- {{ zone.price_auction_2 }}
-
-
- {{ zone.price_buy_2 }}
-
-
+
+ {{ "*".repeat(zone.length_1) + "." + zone.zone }}
+
+ {{ zone.price_auction_1 }}
+
+
+ {{ zone.price_buy_1 }}
+
+
+
+ {{ "*".repeat(zone.length_2) + "." + zone.zone }}
+
+ {{ zone.price_auction_2 }}
+
+
+ {{ zone.price_buy_2 }}
+
+
-
-
- Get
-
+
+ Get
\ No newline at end of file
+
diff --git a/src/router/index.ts b/src/router/index.ts
index b05149d..dc1267e 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,5 +1,6 @@
-import {createRouter, createWebHistory} from 'vue-router'
-import Landing from '../views/Landing.vue'
+import { createRouter, createWebHistory } from "vue-router";
+import Landing from "../views/Landing.vue";
+import { mintCollection, myDomains } from "./routes";
/*
/find - bar + table
@@ -9,69 +10,81 @@ import Landing from '../views/Landing.vue'
*/
const router = createRouter({
- history: createWebHistory(import.meta.env.BASE_URL),
- routes: [
- {
- path: '/',
- name: 'home',
- component: Landing
- },
- {
- path: '/tonweb',
- name: 'tonweb',
- component: () => import('../views/TonWeb.vue')
- },
- {
- path: '/i-know',
- name: 'IKnow',
- component: () => import('../views/IKnow.vue')
- },
- {
- path: '/i-have',
- name: 'IHave',
- component: () => import('../views/IHave.vue')
- },
- {
- path: '/tondns',
- name: 'tondns',
- component: () => import('../views/TonDns.vue')
- },
- {
- path: '/get/:zone',
- name: 'GetZ',
- component: () => import('../views/Get.vue'),
- props: true
- },
- {
- path: '/get/:zone/:domain_init',
- name: 'Get',
- component: () => import('../views/Get.vue'),
- props: true
- },
- {
- path: '/find',
- name: 'Find',
- component: () => import('../views/Find.vue')
- },
- {
- path: '/checkout/:zone/:domain',
- name: 'Checkout',
- component: () => import('../views/Checkout.vue'),
- props: true
- },
- {
- path: '/find/:query',
- name: 'FindQ',
- component: () => import('../views/FindQ.vue'),
- props: true
- },
- {
- path: '/explore/:domain',
- name: 'Explore',
- component: () => import('../views/Explore.vue'),
- props: true
- }
- ]
-})
+ history: createWebHistory(import.meta.env.BASE_URL),
+ routes: [
+ {
+ path: "/",
+ name: "home",
+ component: Landing,
+ },
+ {
+ path: "/tonweb",
+ name: "tonweb",
+ component: () => import("../views/TonWeb.vue"),
+ },
+ {
+ path: "/i-know",
+ name: "IKnow",
+ component: () => import("../views/IKnow.vue"),
+ },
+ {
+ path: "/i-have",
+ name: "IHave",
+ component: () => import("../views/IHave.vue"),
+ },
+ {
+ path: "/tondns",
+ name: "tondns",
+ component: () => import("../views/TonDns.vue"),
+ },
+ {
+ path: "/get/:zone",
+ name: "GetZ",
+ component: () => import("../views/Get.vue"),
+ props: true,
+ },
+ {
+ path: "/get/:zone/:domain_init",
+ name: "Get",
+ component: () => import("../views/Get.vue"),
+ props: true,
+ },
+ {
+ path: "/find",
+ name: "Find",
+ component: () => import("../views/Find.vue"),
+ },
+ {
+ path: "/checkout/:zone/:domain",
+ name: "Checkout",
+ component: () => import("../views/Checkout.vue"),
+ props: true,
+ },
+ {
+ path: "/find/:query",
+ name: "FindQ",
+ component: () => import("../views/FindQ.vue"),
+ props: true,
+ },
+ {
+ path: "/explore/:domain",
+ name: "Explore",
+ component: () => import("../views/Explore.vue"),
+ props: true,
+ },
+ {
+ path: "/my-domains",
+ name: myDomains,
+ component: () => import("../views/MyDomains.vue"),
+ props: true,
+ },
+ {
+ path: "/mint-collection",
+ name: mintCollection,
+ component: () => import("../views/MintCollection.vue"),
+ props: true,
+ },
+ ],
+});
-export default router
+export default router;
diff --git a/src/router/routes.ts b/src/router/routes.ts
new file mode 100644
index 0000000..658de0d
--- /dev/null
+++ b/src/router/routes.ts
@@ -0,0 +1,2 @@
+export const myDomains = "my-domains";
+export const mintCollection = "mint-collection";
diff --git a/src/types.ts b/src/types.ts
new file mode 100644
index 0000000..76cce69
--- /dev/null
+++ b/src/types.ts
@@ -0,0 +1,24 @@
+export type Collection = {
+ address: string;
+ metadata: {
+ description: string;
+ image: string;
+ name: string;
+ };
+ next_item_index: number;
+ raw_collection_content: string;
+};
+
+export type CollectionItem = {
+ address: string;
+ metadata: {
+ name: string;
+ description: string;
+ image: string;
+ };
+ collection: {
+ address: string;
+ };
+ dns: string;
+ previews: { resolution: string; url: string }[];
+};
diff --git a/src/views/Checkout.vue b/src/views/Checkout.vue
index 8ba91b1..a101f01 100644
--- a/src/views/Checkout.vue
+++ b/src/views/Checkout.vue
@@ -1,19 +1,26 @@
-
+
-
+
Back
To buy
-
+
Confirm the transaction in your wallet
-
+
@@ -21,32 +28,32 @@
\ No newline at end of file
+
diff --git a/src/views/Explore.vue b/src/views/Explore.vue
index 1d2de4b..a510cda 100644
--- a/src/views/Explore.vue
+++ b/src/views/Explore.vue
@@ -1,58 +1,97 @@
-
+
-
+
Back
-
+
-
+
{{ domain }}
-
is owned by
+
+ is owned by
{{ ownerAddr }}
View nft
{{ domain }}
-
is owned by
+
View nft
-
+
+ Mint a subdomain collection
+
+
This domain is not owned.
-
-
- Get it
-
+
+ Get it
@@ -64,58 +103,87 @@
import DarkLayout from "../components/DarkLayout.vue";
import DomainBar from "../components/DomainBar.vue";
import RotateSquare2 from "../components/RotateSquare2.vue";
-import {get_constr_params, get_domain_result, get_records, SiteConstructorParams} from "../result";
-import {convertAddress} from "../utils";
-import contenteditable from 'vue-contenteditable';
-import {call_api, call_api_post, config} from "../api";
+import {
+ get_constr_params,
+ get_domain_result,
+ get_records,
+ SiteConstructorParams,
+} from "../result";
+import { convertAddress } from "../utils";
+import contenteditable from "vue-contenteditable";
+import { call_api, call_api_post, config } from "../api";
import Socket from "../components/Socket.vue";
import SiteSettings from "../components/SiteSettings.vue";
+import { mintCollection } from "@/router/routes";
export default {
name: "Explore",
- components: {SiteSettings, Socket, DomainBar, DarkLayout, RotateSquare2, contenteditable},
+ components: {
+ SiteSettings,
+ Socket,
+ DomainBar,
+ DarkLayout,
+ RotateSquare2,
+ contenteditable,
+ },
props: {
domain: {
type: String,
- }
+ },
},
data() {
- let saved_constructor_params = new SiteConstructorParams(this.domain, this.domain);
+ let saved_constructor_params = new SiteConstructorParams(
+ this.domain,
+ this.domain
+ );
+
return {
result: null,
- records: {wallet: null, storage: null, uri: null, next_resolver: null, site: null},
+ records: {
+ wallet: null,
+ storage: null,
+ uri: null,
+ next_resolver: null,
+ site: null,
+ },
wallet_rec: null,
site_rec: null,
signingSite: false,
signingWallet: false,
constructor_params: saved_constructor_params,
saved_constructor_params,
- interval: null
- }
+ interval: null,
+ };
},
mounted() {
- this.interval = setInterval(() => get_domain_result(this.domain, this.$store.getters.address).then(r => {
- this.result = Object.assign({}, r);
- if (this.isMine) {
- get_constr_params(this.domain).then(r => {
- this.constructor_params = r;
- this.saved_constructor_params = r;
- this.updSettingsComponent();
- });
- get_records(r.nft_info.address).then(r => {
- this.records = r;
- // this.timer = setTimeout(this.updRecords, 10000);
- this.updSettingsComponent()
- })
- }
- }), 20000);
+ this.interval = setInterval(
+ () =>
+ get_domain_result(this.domain, this.$store.getters.address).then(
+ (r) => {
+ this.result = Object.assign({}, r);
+ if (this.isMine) {
+ get_constr_params(this.domain).then((r) => {
+ this.constructor_params = r;
+ this.saved_constructor_params = r;
+ this.updSettingsComponent();
+ });
+ get_records(r.nft_info.address).then((r) => {
+ this.records = r;
+ // this.timer = setTimeout(this.updRecords, 10000);
+ this.updSettingsComponent();
+ });
+ }
+ }
+ ),
+ 20000
+ );
},
computed: {
core_domain() {
- return this.domain.split('.')[0];
+ return this.domain.split(".")[0];
},
zone() {
- return this.domain.split('.').slice(1).join('.');
+ return this.domain.split(".").slice(1).join(".");
},
loading() {
return this.result === null;
@@ -123,12 +191,13 @@ export default {
ownerAddr() {
let owner = this.result.owner;
if (!owner instanceof String) {
- return '';
+ return "";
}
let address = convertAddress(owner);
- return address.slice(0, 5) + '...' + address.slice(-4);
+ return address.slice(0, 5) + "..." + address.slice(-4);
},
isMine() {
+ console.log(this.result);
return this.result.owner === this.$store.getters.address;
},
walletChanged() {
@@ -137,13 +206,16 @@ export default {
siteChanged() {
let constr_change = false;
if (this.site_rec === config.agorata_adnl) {
- constr_change = this.constructor_params !== this.saved_constructor_params;
+ constr_change =
+ this.constructor_params !== this.saved_constructor_params;
}
- return this.records && (this.site_rec !== this.records.site || constr_change);
+ return (
+ this.records && (this.site_rec !== this.records.site || constr_change)
+ );
},
settingsCompLoaded() {
return this.$refs.site_settings !== undefined;
- }
+ },
},
methods: {
async saveWallet() {
@@ -151,7 +223,7 @@ export default {
return;
}
// get the message from api at /set-record/site/{site} and sign it with tonconnect (from storage)
- let message = await call_api('set-record/wallet/' + this.wallet_rec);
+ let message = await call_api("set-record/wallet/" + this.wallet_rec);
// send the message to tonconnect
let d = new Date();
let validness = parseInt((d.getTime() / 1000).toFixed(0)) + 360000;
@@ -161,13 +233,15 @@ export default {
{
amount: (0.05 * 1000000000).toString(),
address: this.result.nft_info.address,
- payload: message
- }
- ]
+ payload: message,
+ },
+ ],
};
this.signingWallet = true;
console.log("Sending transaction", transaction);
- const result = await this.$store.state.connector.sendTransaction(transaction);
+ const result = await this.$store.state.connector.sendTransaction(
+ transaction
+ );
this.signingWallet = false;
if (!result.boc) {
// todo
@@ -179,7 +253,7 @@ export default {
return;
}
// get the message from api at /set-record/site/{site} and sign it with tonconnect (from storage)
- let message = await call_api('set-record/site/' + this.site_rec);
+ let message = await call_api("set-record/site/" + this.site_rec);
// send the message to tonconnect
let d = new Date();
let validness = parseInt((d.getTime() / 1000).toFixed(0)) + 360000;
@@ -189,12 +263,14 @@ export default {
{
amount: (0.05 * 1000000000).toString(),
address: this.result.nft_info.address,
- payload: message
- }
- ]
+ payload: message,
+ },
+ ],
};
this.signingSite = true;
- const result = await this.$store.state.connector.sendTransaction(transaction);
+ const result = await this.$store.state.connector.sendTransaction(
+ transaction
+ );
this.signingSite = false;
if (!result.boc) {
// todo
@@ -205,21 +281,22 @@ export default {
if (this.site_rec !== this.records.site) {
await this.saveSite();
}
- await call_api_post('set-site-data', this.constructor_params);
+ await call_api_post("set-site-data", this.constructor_params);
this.saved_constructor_params = this.constructor_params;
this.updSettingsComponent();
},
updRecords() {
- get_records(this.result.nft_info.address).then(r => {
+ get_records(this.result.nft_info.address).then((r) => {
if (this.records.wallet !== r.wallet || this.records.site !== r.site) {
this.records = r;
}
- })
+ });
},
updSettingsComponent() {
this.$refs.site_settings.set_site_rec(this.site_rec);
- this.$refs.site_settings.saved_constructor_params = this.saved_constructor_params;
- }
+ this.$refs.site_settings.saved_constructor_params =
+ this.saved_constructor_params;
+ },
},
watch: {
records: function (val) {
@@ -228,33 +305,33 @@ export default {
this.site_rec = val.site;
}
},
- site_rec () {
+ site_rec() {
this.$refs.site_settings.set_site_rec(this.site_rec);
},
- saved_constructor_params () {
- this.$refs.site_settings.saved_constructor_params = this.saved_constructor_params;
+ saved_constructor_params() {
+ this.$refs.site_settings.saved_constructor_params =
+ this.saved_constructor_params;
},
- settingsCompLoaded () {
+ settingsCompLoaded() {
if (!this.loading && this.settingsCompLoaded) {
this.updSettingsComponent();
}
},
- loading () {
+ loading() {
if (!this.loading && this.settingsCompLoaded) {
this.updSettingsComponent();
}
- }
+ },
},
unmounted() {
clearInterval(this.interval);
- }
-}
+ },
+};
\ No newline at end of file
+
diff --git a/src/views/Get.vue b/src/views/Get.vue
index b459de3..0139d74 100644
--- a/src/views/Get.vue
+++ b/src/views/Get.vue
@@ -1,15 +1,24 @@
-
+
-
+
All zones
-
-
+
+
@@ -25,30 +34,31 @@ export default {
},
zone: {
type: String,
- }
+ },
},
- components: {DomainResult, DomainBar, DarkLayout},
+ components: { DomainResult, DomainBar, DarkLayout },
data() {
return {
- domain: this.domain_init
- }
+ domain: this.domain_init,
+ };
},
methods: {
search() {
- this.$router.push({name: 'Get', params: {domain_init: this.domain, zone: this.zone}});
+ this.$router.push({
+ name: "Get",
+ params: { domain_init: this.domain, zone: this.zone },
+ });
},
handle_input(val) {
this.domain = val;
- }
+ },
},
watch: {
domain_init: function (val) {
this.domain = val;
- }
- }
-}
+ },
+ },
+};
-
\ No newline at end of file
+
diff --git a/src/views/IHave.vue b/src/views/IHave.vue
index 1706917..1a5a1bd 100644
--- a/src/views/IHave.vue
+++ b/src/views/IHave.vue
@@ -1,19 +1,37 @@
-
+
-
-
-
+
+
- Very good! We can help you host a website there or sell subdomains.
- For now, you will have to contact us on Telegram .
- We are especially interested in partnering with different projects and communities which are interested in distributing domains to their users.
- Also, you can always buy another domain .
+ Very good! We can help you host a website there or sell
+ subdomains.
+ For now, you will have to
+ contact us on Telegram .
+ We are especially interested in partnering with different projects
+ and communities which are interested in distributing domains to
+ their users.
+ Also, you can always
+ buy another domain .
@@ -25,7 +43,7 @@
Contact us
-
+
Buy a domain
@@ -39,8 +57,8 @@ import WhiteLayout from "../components/WhiteLayout.vue";
export default {
name: "IHave",
- components: {WhiteLayout}
-}
+ components: { WhiteLayout },
+};
\ No newline at end of file
+
diff --git a/src/views/IKnow.vue b/src/views/IKnow.vue
index 2d2fa00..5f72d99 100644
--- a/src/views/IKnow.vue
+++ b/src/views/IKnow.vue
@@ -1,29 +1,40 @@
-
+
-
-
-
+
+
-
That's great! Maybe, you even have a domain already?
+
That's great! Maybe, you even have a domain already?
-
+
-
+
Yes
-
+
-
+
No
@@ -36,8 +47,8 @@ import WhiteLayout from "../components/WhiteLayout.vue";
export default {
name: "IKnow",
- components: {WhiteLayout}
-}
+ components: { WhiteLayout },
+};
\ No newline at end of file
+
diff --git a/src/views/Landing.vue b/src/views/Landing.vue
index c62359e..5768e9b 100644
--- a/src/views/Landing.vue
+++ b/src/views/Landing.vue
@@ -1,18 +1,20 @@
-
+
-
- Helping you be the new internet
+
+
+ Helping you be the new internet
+
-
Do you know what TON Web is?
+
Do you know what TON Web is?
+
Yes
-
+
No
@@ -31,7 +33,7 @@ main {
justify-content: center;
align-items: center;
color: white;
- font-family: 'Raleway',serif;
+ font-family: "Raleway", serif;
font-size: 1.5rem;
text-align: center;
}
@@ -52,5 +54,4 @@ main {
align-items: center;
padding: 2rem;
}
-
diff --git a/src/views/MintCollection.vue b/src/views/MintCollection.vue
new file mode 100644
index 0000000..4cb5122
--- /dev/null
+++ b/src/views/MintCollection.vue
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+ Back
+
+
+
+
+
+
+
+
+
diff --git a/src/views/MyDomains.vue b/src/views/MyDomains.vue
new file mode 100644
index 0000000..675164c
--- /dev/null
+++ b/src/views/MyDomains.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+ Back
+
+
+
+
+
+
+
diff --git a/src/views/TonDns.vue b/src/views/TonDns.vue
index 7c96f48..be0e4cb 100644
--- a/src/views/TonDns.vue
+++ b/src/views/TonDns.vue
@@ -1,27 +1,29 @@
-
+
-
TON domains — .ton and .t.me — are your names in the TON world.
- They can be used to host a website or to transfer money.
- You can host a TON website for your personal brand.
+
+ TON domains — .ton and .t.me — are your names in the TON world.
+ They can be used to host a website or to transfer money.
+ You can host a TON website for your personal brand.
+
-
+
Omg, can I get one?
-
+
@@ -33,8 +35,8 @@ import WhiteLayout from "../components/WhiteLayout.vue";
export default {
name: "TonDns",
- components: {WhiteLayout}
-}
+ components: { WhiteLayout },
+};
\ No newline at end of file
+
diff --git a/src/views/TonWeb.vue b/src/views/TonWeb.vue
index 0c92cf6..453dfee 100644
--- a/src/views/TonWeb.vue
+++ b/src/views/TonWeb.vue
@@ -1,26 +1,43 @@
-
+
-
+
-
TON Sites are just websites hosted on the TON Network.
- After some configuration, you can visit a website like foundation.ton.
+
+ TON Sites are just websites hosted on the TON Network.
+ After some configuration, you can visit a website like
+ foundation.ton.
+
They have a lot of advantages:
- The DApps are truly D: they cannot be banned or pressured, the servers cannot be traced, the apps
- don't get the user's IP
+
+ The DApps are truly D: they cannot be banned or pressured, the
+ servers cannot be traced, the apps don't get the user's IP
+
+ There can be no censorship
+
+ Validity of websites is determined on the blockchain instead of
+ trusting authorities for SSL
+
+
+ Domain ownership has clear rules on TON, there is no central
+ authority, no registrators
+
+ The TON Web is nicely integrated with the TON blockchain
+
+ There is no need for logins and passwords — you just use your TON
+ account
- There can be no censorship
- Validity of websites is determined on the blockchain instead of trusting authorities for SSL
- Domain ownership has clear rules on TON, there is no central authority, no registrators
- The TON Web is nicely integrated with the TON blockchain
- There is no need for logins and passwords — you just use your TON account
@@ -33,8 +50,8 @@ import WhiteLayout from "../components/WhiteLayout.vue";
export default {
name: "TonWeb",
- components: {WhiteLayout}
-}
+ components: { WhiteLayout },
+};
\ No newline at end of file
+
diff --git a/vite.config.ts b/vite.config.ts
index de5cb31..82e794d 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,14 +1,14 @@
-import { fileURLToPath, URL } from 'node:url'
-
-import { defineConfig } from 'vite'
-import vue from '@vitejs/plugin-vue'
+import { fileURLToPath, URL } from "node:url";
+import svgLoader from "vite-svg-loader";
+import { defineConfig } from "vite";
+import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
- plugins: [vue()],
+ plugins: [vue(), svgLoader({ svgo: false })],
resolve: {
alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- }
-})
+ "@": fileURLToPath(new URL("./src", import.meta.url)),
+ },
+ },
+});