bug fixes

This commit is contained in:
sairaj mote 2023-01-14 01:45:58 +05:30
parent 811ba560d2
commit c1d50da655
4 changed files with 18 additions and 7 deletions

View File

@ -1680,7 +1680,10 @@ fieldset legend {
} }
@media screen and (max-width: 40rem) { @media screen and (max-width: 40rem) {
#home { #home.is-sub-admin {
align-content: flex-start;
}
#home:not(.is-sub-admin) {
padding-bottom: 3rem; padding-bottom: 3rem;
} }
#home > * { #home > * {

2
css/main.min.css vendored

File diff suppressed because one or more lines are too long

View File

@ -1565,7 +1565,12 @@ fieldset {
} }
@media screen and (max-width: 40rem) { @media screen and (max-width: 40rem) {
#home { #home {
padding-bottom: 3rem; &.is-sub-admin {
align-content: flex-start;
}
&:not(.is-sub-admin) {
padding-bottom: 3rem;
}
> * { > * {
padding: 0 1rem; padding: 0 1rem;
} }

View File

@ -741,7 +741,7 @@
<div class="grid gap-1"></div> <div class="grid gap-1"></div>
</div> </div>
</div> </div>
<nav id="bottom_nav" class="hide-on-desktop"> <nav id="bottom_nav" class="hide-on-desktop user-element">
<ul> <ul>
<li> <li>
<a href="#/home" class="nav-item nav-item--active"> <a href="#/home" class="nav-item nav-item--active">
@ -1910,6 +1910,7 @@
notify('Browser is not fully compatible, some features may not work. for best experience please use Chrome, Edge, Firefox or Safari', 'error') notify('Browser is not fully compatible, some features may not work. for best experience please use Chrome, Edge, Firefox or Safari', 'error')
} }
document.body.classList.remove('hidden') document.body.classList.remove('hidden')
handleMobileChange(mobileQuery)
document.querySelectorAll('sm-input[data-flo-id]').forEach(input => input.customValidation = floCrypto.validateAddr) document.querySelectorAll('sm-input[data-flo-id]').forEach(input => input.customValidation = floCrypto.validateAddr)
getRef('receiver_container').querySelectorAll('sm-input[data-bc-address]').forEach(input => input.customValidation = btcOperator.validateAddress) getRef('receiver_container').querySelectorAll('sm-input[data-bc-address]').forEach(input => input.customValidation = btcOperator.validateAddress)
document.addEventListener('keyup', (e) => { document.addEventListener('keyup', (e) => {
@ -1969,6 +1970,7 @@
} }
const generalPages = ['sign_up', 'sign_in', 'loading', 'landing'] const generalPages = ['sign_up', 'sign_in', 'loading', 'landing']
async function routeTo(targetPage, options = {}) { async function routeTo(targetPage, options = {}) {
console.log('route to', targetPage)
const { firstLoad, hashChange } = options const { firstLoad, hashChange } = options
let pageId let pageId
let params = {} let params = {}
@ -2206,7 +2208,8 @@
const targetListItem = [...document.querySelectorAll(`a.nav-item`)].find(item => item.href.includes(pageId)) const targetListItem = [...document.querySelectorAll(`a.nav-item`)].find(item => item.href.includes(pageId))
if (targetListItem) { if (targetListItem) {
targetListItem.classList.add('nav-item--active') targetListItem.classList.add('nav-item--active')
getRef('bottom_nav').classList.remove('hidden') if (!floGlobals.isSubAdmin)
getRef('bottom_nav').classList.remove('hidden')
} else { } else {
getRef('bottom_nav').classList.add('hidden') getRef('bottom_nav').classList.add('hidden')
} }
@ -2493,10 +2496,10 @@
const mobileQuery = window.matchMedia('(max-width: 40rem)') const mobileQuery = window.matchMedia('(max-width: 40rem)')
function handleMobileChange(e) { function handleMobileChange(e) {
floGlobals.isMobileView = e.matches floGlobals.isMobileView = e.matches
routeTo(window.location.hash) if (floGlobals.loaded)
routeTo(window.location.hash)
} }
mobileQuery.addEventListener('change', handleMobileChange) mobileQuery.addEventListener('change', handleMobileChange)
handleMobileChange(mobileQuery)
const reduceMotionQuery = window.matchMedia('(prefers-reduced-motion: reduce)'); const reduceMotionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
reduceMotionQuery.addEventListener('change', () => { reduceMotionQuery.addEventListener('change', () => {
floGlobals.prefersReducedMotion = reduceMotionQuery.matches floGlobals.prefersReducedMotion = reduceMotionQuery.matches