Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): fix DOM error in production #130

Merged
merged 5 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/api/src/dataFeedsRouter.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"minSecsBetweenUpdates": 900
},
"Price-OLO/USDC-6": {
"label": "($)",
"label": "$",
"deviationPercentage": 0.1,
"maxSecsBetweenUpdates": 86400,
"minSecsBetweenUpdates": 900
Expand Down
5 changes: 4 additions & 1 deletion packages/api/test/validateFeedsConfig.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { normalizeConfig } from '../src/utils/index'
describe('validateDataFeedsConfig', () => {
it('check if the structure is correct', async () => {
const dataFeedsRouterConfig = JSON.parse(
fs.readFileSync(path.resolve('./test/web3Middleware/dataFeedsRouter.json'), 'utf-8')
fs.readFileSync(
path.resolve('./test/web3Middleware/dataFeedsRouter.json'),
'utf-8'
)
)

const feeds = normalizeConfig(dataFeedsRouterConfig)
Expand Down
2 changes: 1 addition & 1 deletion packages/api/test/web3Middleware/dataFeedsRouter.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,4 @@
}
}
}
}
}
3 changes: 2 additions & 1 deletion packages/ui/assets/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@

//sidebar
--tab-gradient: linear-gradient(90deg, #2d2c39d3 95%, #4ab6a02c);
--tab-gradient-selected: linear-gradient(90deg, #2d2c39d3 0%, rgba(74, 182, 160, 0.05) 20%, rgba(74, 182, 160, 0.10) 24%, rgba(74, 182, 160, 0.15) 30%, rgba(74, 182, 160, 0.173) 35%);
--tab-background: #2D2C39;
--tab-gradient-selected: linear-gradient(90deg, #2D2C39 0%, rgba(74, 182, 160, 0.05) 20%, rgba(74, 182, 160, 0.10) 24%, rgba(74, 182, 160, 0.15) 30%, rgba(74, 182, 160, 0.173) 35%);

//breadcrumbs
--selected-option: #4AB6A1;
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/components/InfoTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,14 @@ export default {
}
.container {
display: flex;
align-items: center;
}
.info {
display: flex;
align-items: center;
font-size: 10px;
width: 10px;
height: 10px;
cursor: pointer;
}
@media (max-width: 300px) {
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/components/IntegrationDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ export default {
}
.icon {
font-size: 10px;
width: 10px;
height: 10px;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/components/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
/>
<div v-if="selected && selected.length" class="feeds-container">
<div class="title-container">
<p class="title bold">
<div class="title bold">
<SvgIcon class="logo" :name="selected[0].network.toLowerCase()" />{{
selected[0].network
}}
</p>
</div>
<p class="subtitle light-text bold">
{{ $t('main.network_subtitle') }}
<span class="bold text">{{ selected[0].network }}</span>
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ export default {
},
closeMenu() {
this.isMenuVisible = false
this.$emit('scroll', this.isMenuVisible)
},
toggleMenu() {
this.isMenuVisible = !this.isMenuVisible
this.$emit('scroll', this.isMenuVisible)
},
displayDropDown() {
this.displayBox = !this.displayBox
Expand Down Expand Up @@ -184,6 +186,7 @@ export default {
&.last-item {
display: flex;
justify-content: center;
padding-bottom: 24px;
}
.btn-container {
width: max-content;
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/components/ThemeSwitch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export default {
.mode-icon {
color: var(--icon-color);
font-size: 20px;
width: 20px;
height: 20px;
}
.icon-container {
cursor: pointer;
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/components/Transaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ export default {
color: var(--witnet-transaction);
font-family: Roboto Mono, monospace;
.icon {
width: 10px;
height: 10px;
font-size: var(--text-size-small);
}
}
Expand Down
19 changes: 17 additions & 2 deletions packages/ui/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="background">
<div class="background" :class="{ 'hide-scroll': hideScroll }">
<MainSection>
<NavBar slot="navbar" />
<NavBar slot="navbar" @scroll="handleScroll" />
<BreadCrumbs slot="breadcrumbs" />
<Nuxt slot="content" />
<Footer slot="footer" />
Expand All @@ -11,9 +11,19 @@

<script>
export default {
data() {
return {
hideScroll: false,
}
},
head() {
return this.$nuxtI18nHead({ addSeoAttributes: true })
},
methods: {
handleScroll(scroll) {
this.hideScroll = scroll
},
},
}
</script>
<style lang="scss">
Expand All @@ -30,6 +40,11 @@ html {
background: var(--bg);
scroll-behavior: smooth;
}
.hide-scroll {
height: 100vh;
position: absolute;
overflow-y: hidden;
}
html,
body {
Expand Down
1 change: 0 additions & 1 deletion packages/ui/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export default {
},
meta: [
{ charset: 'utf-8' },
{ name: 'theme-color', content: '#0094a8' },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we should remove this line?

{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'title',
Expand Down