forked from fwd/nano-to
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path404.html
254 lines (254 loc) · 20.2 KB
/
404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!--
________ ____ ____ ______
|_ __ ||_ _| |_ _||_ _ `.
| |_ \_| \ \ /\ / / | | `. \
| _| \ \/ \/ / | | | |
_| |_ \ /\ / _| |_.' /
|_____| \/ \/ |______.'
Simplicity is soul of efficiency.
https://github.com/fwd/nano
-->
<!DOCTYPE html>
<html lang="en" manifest="appcache">
<head>
<title>Nano.to - Nano Username Service & Non-Custodial Checkout</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=0">
<meta name="author" content="https://twitter.com/nano2dev"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="transparent">
<meta name="apple-mobile-web-app-title" content="Nano.to">
<meta property="og:title" content="Nano.to">
<meta property="og:image" content="dist/images/cover.png">
<meta property="twitter:image" content="dist/images/cover.png">
<link rel="apple-touch-icon" href="dist/images/new_icon.png">
<link rel="icon" type="image/png" href="dist/favicon.png">
<link rel="stylesheet" href="dist/style.css?v=1.0.3">
<link rel="manifest" href="dist/manifest.json">
<script>
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.className += ' dark'
} else {
document.documentElement.className += ' light'
}
const isInStandaloneMode = window.matchMedia('(display-mode: standalone)').matches || (window.navigator.standalone) || document.referrer.includes('android-app://')
if (isInStandaloneMode) document.documentElement.className += ' web-app'
</script>
<script src="https://metrics.bar/js/script.js" id="metrics" async defer></script>
</head>
<body>
<p class="seo-hackz" style="display: none; opacity: 0;">Username service and non-custodial checkout UI for the Nano Blockchain. Nano.to is on a mission to accelerate the use of Nano currency around the world.</p>
<div id="app" :class=" `on ${color}`">
<div v-if="notification" :class="`notification ${status}`"><img :style="`filter:${checkout.color && checkout.color.background ? 'invert(1)' : 'invert(0)'};margin-bottom: 0px;max-width: 14px;margin-right: 12px;vertical-align: middle;margin-bottom: 2px;`" src="./dist/images/info2.png" class="lock-icon" style="margin-bottom: 0px;">{{ notification }}</div>
<div v-if="loading" class="loader"></div>
<div :style=" background ? `background-image: url('${ '${background}' }')` : `background-image: url('${ 'dist/images/latest.gif' }')` " id="backdrop"></div>
<div v-if="success && success.confetti">
<div v-for="i in 150" :class="`confetti-${i}`"></div>
</div>
<div v-if="success" id="success">
<div>
<h3 class="success-title">{{ success.title || (strings[lang] ? strings[lang].success : strings['en'].success) }}</h3>
<p style="margin-bottom: 0">{{ success.message }}</p>
<button v-if="checkout.fullscreen && success.button" class="btn" :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : ''};`" @click="redirect()">
<span>{{ success.button }}</span>
</button>
<div v-if="checkout.fullscreen && success.redirect && !success.button" class="redirecting">{{ success.redirect_msg || (strings[lang] ? strings[lang].redirecting : strings['en'].redirecting) }}</div>
<div v-if="!checkout.fullscreen" class="btn" :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : ''};`" @click="checkout = false; success = false">OK</div>
</div>
</div>
<div v-if="!checkout" :class="`cyber blue`">
<div v-if="title" style="cursor: pointer;" @click="reset()">
<h3 :class="`title ${status.status && status.status == false ? 'error' : ''}`" style="margin-top: 10px; font-size: 22px">{{ title }}</h3>
</div>
<div :class="`box--outer ${status.status && status.status == false ? 'error' : ''}`">
<div class="box">
<div class="box--inner">
<div class="content">
<div v-if="suggestions.length" id="search-screen" @click="suggestions = []"></div>
<div class="holder" style="max-width: 440px">
<div v-if="search">
<p style="font-size: 20px; margin-bottom: 30px; margin-top: 0;">{{ strings[lang] ? strings[lang].intro : strings['en'].intro }}</p>
<form @submit.prevent="query()">
<input type="text" v-model="string" placeholder="Username, Address, Hash" style="zoom: 1.2;background: #00000078;color: #FFF;">
<div class="suggest" v-if="suggestions.length">
<div v-for="suggestion in suggestions" :style="`color: ${suggestion.color || ''}`" @click="doSuggestion(suggestion)">
{{ capitalizeFirstLetter(suggestion.name) }}
<img v-if="suggestion.github" src="dist/images/verified.png" class="verified" alt="">
</div>
</div>
<div style="display: block; height: 15px;"></div>
<div class="row centered">
<button class="cybr-btn" style="zoom: 0.6; margin: 20px auto; "> {{ (strings[lang] ? strings[lang].search : strings['en'].search) }} <span aria-hidden>_</span>
<span aria-hidden class="cybr-btn__glitch">NANO_</span>
<!-- <span aria-hidden class="cybr-btn__tag">N2</span> -->
</button>
</div>
</form>
<div class="footer-icon">
<a href="https://github.com/fwd/nano-to#nano-name-service" target="_blank" style="opacity: 0.7; filter: invert(1); display: block; max-width: 70px;">
<div style="width: fit-content;zoom: 0.7;font-family: Cyber;text-align: center;"><img src="dist/svg/github.svg" img/></div>
</a>
</div>
</div>
<div v-if="!search">
<div v-if="prompt" class="small-mobile">
<div>
<h1 v-if="prompt.title" style="color: red; font-size: 40px !important; word-break: break-all; margin-top: 0px">
<span @click="dev_mode = !dev_mode">{{ prompt.title }}</span>
<img @click="alert(`Verified as @${prompt.github} on Github.`)" v-if="prompt.github" src="dist/images/verified.png" class="verified" alt="">
</h1>
<p v-html="prompt.body"></p>
</div>
</div>
<div v-if="prompt && (dev_mode || queryToObject().nocache)" style="font-size: 16px;">
<div style="margin-bottom: 10px"><span style="color: red;">{{ (strings[lang] ? strings[lang].created : strings['en'].created) }}:</span> {{ prompt.created }}</div>
<div style="margin-bottom: 10px;">
<span style="color: red;">{{ (strings[lang] ? strings[lang].expires : strings['en'].expires) }}:</span> {{ prompt.expires }}
</div>
<div v-if="prompt.github">
<span style="color: red;">{{ (strings[lang] ? strings[lang].github : strings['en'].github) }}:</span>
<a target="_blank" :href="'https://github.com/' + prompt.github">github.com/{{ prompt.github }}</a></div>
</div>
<div v-if="prompt && prompt.buttons && prompt.buttons.length && !dev_mode" class="row centered button-group" :style="`margin-top: 30px; justify-content: ${prompt.buttons.length > 1 ? 'space-around' : ''}`">
<div v-for="button in prompt.buttons">
<a @click="doButton(button)">
<button class="cybr-btn" style="zoom: 0.65;">
{{ button.label }}
<span aria-hidden>_</span>
<span aria-hidden class="cybr-btn__glitch">{{ button.label }}
<span aria-hidden>_</span>
</span>
<!-- <span aria-hidden class="cybr-btn__tag">R25</span> -->
</button>
<a/>
</div>
</div>
<div v-if="prompt && dev_mode" class="row centered button-group" :style="`margin-top: 30px; justify-content: ${prompt.buttons.length > 1 ? 'space-around' : ''}`">
<div>
<a target="_blank" :href="`https://nano.to/${prompt.title}/renew`">
<button class="cybr-btn" style="zoom: 0.6;">
{{ (strings[lang] ? strings[lang].renew : strings['en'].renew) }}
<span aria-hidden>_</span>
<span aria-hidden class="cybr-btn__glitch">{{ (strings[lang] ? strings[lang].renew : strings['en'].renew) }}
<span aria-hidden>_</span>
</span>
<!-- <span aria-hidden class="cybr-btn__tag">R26</span> -->
</button>
<a/>
</div>
</div>
<a v-if="prompt" @click.prevent="prompt = false; search = true">
<p style=" margin-top: 30px; font-size: 16px; opacity: 0.7; margin-bottom: -20px; text-transform: uppercase;">
<span>{{ (strings[lang] ? strings[lang].cancel : strings['en'].cancel) }}</span>
</p>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-if="checkout" id="checkout" class="flex">
<div id="avatar" v-if="!checkout.fullscreen || checkout.cancel" :class="`flex center justify ${!checkout.plans || !checkout.plans.length ? '' : ''}`" @click="cancel()">
<h3 :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : '#000'};`">{{ checkout.cancel_text ? '← ' + checkout.cancel_text : `← ${ (strings[lang] ? strings[lang].cancel : strings['en'].cancel) }` }}</h3>
</div>
<section v-if="checkout.plans || checkout.image" id="order" :class="`${!checkout.fullscreen || checkout.cancel ? 'cancel' : ''}`" :style="`background-color: ${checkout.color && checkout.color.left ? checkout.color.left : '#FFF'}; align-items: ${checkout.plans && checkout.plans.length < 4 ? 'start' : 'center'};`">
<div class="about" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : '#000'};`">
<div class="name flex center justify">
<h2>
{{ checkout.title || checkout.lease }}
<img @click="alert(`Verified as @${checkout.github} on Github.`)" v-if="checkout.github" src="dist/images/verified.png" class="verified" alt="">
</h2>
<p v-if="checkout.amount && !checkout.random_int" class="price">{{ currency == 'NANO' ? 'Ӿ ' : currency }} {{ nFormatter( String(checkout.amount).includes('.') ? Number(checkout.amount).toFixed(3) : checkout.amount ) }}</p>
<p v-if="checkout.amount && checkout.random_int" class="price">{{ currency == 'NANO' ? 'Ӿ ' : currency }} {{ Number(checkout.amount).toFixed(0) }}</p>
</div>
<div v-if="checkout.goal" id="goal-meter">
<div id="funding-wrap">
<div class="flex-item">
<div class="goal-stat">{{ checkout.goal.title || 'Funding Goal' }}</div>
<div class="goal-stat">Ӿ {{ checkout.goal.total }}</div>
</div>
<div id="glass">
<div id="contribution" :style="`left:${ (100 * checkout.goal.balance) / checkout.goal.total > 100 ? '100%' : (100 * checkout.goal.balance) / checkout.goal.total + '%' }; width: ${ (100 * checkout.amount) / checkout.goal.total > 100 ? '100%' : (100 * checkout.amount) / checkout.goal.total + '%' }`"></div>
<div id="progress" :style="`width:${ (100 * checkout.goal.balance) / checkout.goal.total > 100 ? '100%' : (100 * checkout.goal.balance) / checkout.goal.total + '%' }`"></div>
</div>
<div class="flex-item">
<div class="goal-stat">
<span class="goal-number">{{ ( (100 * checkout.goal.balance) / checkout.goal.total ).toFixed(1) }}% <b>Funded</b></span>
</div>
<div class="goal-stat">
<span class="goal-number">Ӿ {{ checkout.goal.balance }} <b>Raised</b></span>
</div>
</div>
</div>
</div>
<img v-if="checkout.image" class="checkout-image" :src="checkout.image" alt="">
<p v-if="checkout.description || checkout.body || checkout.text || checkout.note || checkout.message" class="description" v-html="checkout.description || checkout.body || checkout.text || checkout.note || checkout.message"></p>
<div class="plans">
<div v-for="plan in checkout.plans" :style="`border-color:${checkout.color && checkout.color.primary ? checkout.color.primary : 'rgb(70 91 104 / 15%)'} !important; background: ${String(plan.value) === String(checkout.amount) ? '#000' : 'transparent'};};`" :class="`${String(plan.value) == String(checkout.amount) ? 'active' : ''}`">
<div class="flex justify center" @click="clickPlan(plan)" >
<h4>
{{ plan.title || plan.name }}
<span :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : ''};`" v-if="plan.discount" class="discount">{{ Number(plan.discount) ? plan.discount + '% OFF' : plan.discount }}</span>
</h4>
<h4>{{ Number(plan.value) > 1 ? Math.floor(plan.value) : Number(plan.value).toFixed(3) }} {{ currency }}</h4>
</div>
</div>
</div>
<div class="plans custom" v-if="checkout.custom">
<div :class="`flex justify center`" :style="`border-color:${checkout.color && checkout.color.primary ? checkout.color.primary : 'rgb(70 91 104 / 8%)'};`">
<h4>{{ (strings[lang] ? strings[lang].custom : strings['en'].custom) }}</h4>
<div class="dinput">
<input type="number" inputmode="decimal" max="133248297" v-model="customAmount" >
</div>
</div>
</div>
</div>
</section>
<section id="payment" :style="checkout.color && checkout.color.right ? `background-color: ${checkout.color.right}` : 'background-color: #009dff'" :class="checkout.plans || checkout.image ? '' : 'full'">
<div class="details">
<div class="crypto">
<h4 v-if="checkout.amount" class="instructions">
<span v-if="checkout.instruction !== false" class="faded" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : '#FFF'};`">{{ checkout.instruction || (strings[lang] ? strings[lang].guide : strings['en'].guide) }}</span>
<b @click="copy(checkout.amount)" class="amount" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : '#FFF'};cursor:pointer`">{{ checkout.amount }}
<span class="blocky">{{ 'NANO' }}</span>
<span class="hide-desktop"><img :style="`filter:${(checkout.color && checkout.color.background) || (checkout.color && checkout.color.address && checkout.color.address.background) ? 'invert(1)' : 'invert(0)'}`"src="./dist/images/clipboard.png" alt=""></span>
</b>
<span v-if="rate" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : '#FFF'};cursor: pointer;opacity: 0.7; display: block; margin-bottom: 10px;`">≈ {{ nFormatter( (checkout.amount * rate).toFixed(2) ) }} {{ currency === 'NANO' ? 'USD' : currency }} @ <a :href="`https://www.coingecko.com/en/coins/nano/${currency !== 'NANO' ? currency.toLowerCase() : 'usd'}`" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : ''};cursor: pointer;`" target="_blank" class="cursor"> {{ rate.toFixed(3) }} <img src="./dist/images/info2.png" alt="" class="info-icon">
</a>
</span>
</h4>
<h1 v-if="!checkout.amount" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : ''};`">{{ checkout.title }}</h1>
<p class="address" :style="`color:${checkout.color && checkout.color.address && checkout.color.address.highlight_color ? checkout.color.address.highlight_color : '#000'}; background:${checkout.color && checkout.color.address && checkout.color.address.highlight_background ? checkout.color.address.highlight_background : (checkout.color && checkout.color.address && checkout.color.highlight_background ? checkout.color.highlight_background : '#FFF')};`" @click="copy(checkout.address)">
<span class="highlight" :style="`color:${checkout.color && checkout.color.vanity ? checkout.color.vanity : ''};`">{{ checkout.address.slice(0, 12) }}</span><span :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};`">{{ checkout.address.slice(12, 58) }}</span><span class="highlight" :style="`color:${checkout.color && checkout.color.vanity ? checkout.color.vanity : ''};`">{{ checkout.address.slice(59, 99) }}</span>
<img src="./dist/images/clipboard.png" alt="">
</p>
<div class="qrSwitcher">
<a :href="`nano:${checkout.address}${checkout.amount ? '?amount=' + convert(checkout.amount, 'NANO', 'RAW') : ''}`">
<div class="qrcode" :style="`border-color:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : '#FFF'}; background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : '#FFF'};`">
<div id="qrcode"></div>
</div>
<div class="security-notice nano" :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : ''};`">
<img :style="`filter:${checkout.color && checkout.color.background ? 'invert(1)' : 'invert(0)'}`" src="./dist/images/info2.png" class="lock-icon" style="margin-bottom: 0px;"> {{ checkout.tip || (strings[lang] ? strings[lang].tap : strings['en'].tap) }}
</div>
</a>
</div>
<button v-if="checkout.amount || checkout.plans.length" class="button" :style="`color:${checkout.color && checkout.color.highlight_color ? checkout.color.highlight_color : ''};background:${checkout.color && checkout.color.highlight_background ? checkout.color.highlight_background : ''};`" @click="check()">
<span>{{ checkout.buttonText || (strings[lang] ? strings[lang].button : strings['en'].button) }}</span>
</button>
<div class="security-notice shrink">
<div class="flex center" :style="`color:${checkout.color && checkout.color.text ? checkout.color.text : ''};`">{{ checkout.note || (strings[lang] ? strings[lang].note : strings['en'].note) }}</div>
</div>
</div>
</div>
</section>
</div>
</div>
<script src="dist/vue.min.js"></script>
<script src="dist/axios.min.js"></script>
<script src="dist/easy.qrcode.min.js"></script>
<script src="dist/nanocurrency.min.js"></script>
<script src="dist/app.js?v=1.1.8"></script>
</body>
</html>