Browse Source

add mobile version for balance dashboard

main
matthew 2 years ago
parent
commit
f95688dd1c
  1. 28
      searching-front/app/core/pages/State/styles.module.css
  2. 6
      searching-front/services/domain-watcher.ts

28
searching-front/app/core/pages/State/styles.module.css

@ -86,8 +86,6 @@
margin-left: 8px; margin-left: 8px;
} }
.button { .button {
position: absolute; position: absolute;
top: 2px; top: 2px;
@ -165,13 +163,13 @@
background-color: var(--button_primary); background-color: var(--button_primary);
} }
.newestListItemRight:hover .tonScanIcon{ .newestListItemRight:hover .tonScanIcon {
color: white; color: white;
background: var(--button_primary); background: var(--button_primary);
transition: all .3s ease-in-out; transition: all 0.3s ease-in-out;
} }
.tonScanIcon{ .tonScanIcon {
width: 24px; width: 24px;
height: 24px; height: 24px;
border-radius: 50%; border-radius: 50%;
@ -182,8 +180,24 @@
margin-left: 4px; margin-left: 4px;
} }
.siteButton,
.tonScanIcon {
transition: background-color 0.2s ease-in-out;
}
@media only screen and (max-width: 500px) {
.newestListItem {
flex-direction: column;
}
.newestListItemRight,
.newestListItemLeft {
padding: 24px 34px;
justify-content: center;
}
.newestListItemRight {
text-align: left;
.siteButton, .tonScanIcon { border-top: 1px solid var(--border_color_main);
transition: background-color .2s ease-in-out; border-left: none;
}
} }

6
searching-front/services/domain-watcher.ts

@ -24,7 +24,7 @@ const getFullUrl = (dmn: string) => `http://${dmn}`
interface UpsertDmnParams { interface UpsertDmnParams {
available: boolean available: boolean
walletAddress?: string walletAddress?: string
tonBalance?: number tonBalance?: string
} }
const upsertDmn = async ( const upsertDmn = async (
dmn: string, dmn: string,
@ -107,8 +107,10 @@ const fetchDomainInfo = async (url: string) => {
address, address,
} }
} }
console.log('There is no domain info ofr', url)
return null return null
} catch (e) { } catch (e) {
console.log('Failed fetch domain info for', url,e)
return null return null
} }
} }
@ -134,7 +136,7 @@ const main = async () =>
.then(async (dmn) => { .then(async (dmn) => {
const domainInfo = await fetchDomainInfo(dmn) const domainInfo = await fetchDomainInfo(dmn)
console.log("success dmn", dmn) console.log("success dmn", dmn)
upsertDmn(dmn, {available: true, walletAddress:domainInfo?.address,tonBalance:domainInfo?.balance}) upsertDmn(dmn, {available: true, walletAddress:domainInfo?.address, tonBalance:domainInfo?.balance})
}) })
.catch((dmn) => { .catch((dmn) => {
upsertDmn(dmn, {available: false}) upsertDmn(dmn, {available: false})

Loading…
Cancel
Save