-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added 'help' button on header (#772)
* fix: display EVM withdraw when users have balance in withdrawal * fix: added help button on header * fix: removed release note on the template.md * fix: test * fix: test (2) * fix: display ModalConectionTrouble when app is loading
- Loading branch information
1 parent
edc1ed5
commit e454c09
Showing
14 changed files
with
182 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
<template> | ||
<div class="wrapper--trouble-help"> | ||
<button | ||
type="button" | ||
:class="width >= screenSize.sm ? 'btn--help' : 'm-btn--help'" | ||
@click="setShowModal(true)" | ||
> | ||
<div class="icon--help"> | ||
<astar-icon-help size="20" /> | ||
</div> | ||
<template v-if="width >= screenSize.sm"> | ||
{{ $t('help') }} | ||
</template> | ||
</button> | ||
<modal-connection-trouble v-if="showModal" :set-is-open="setShowModal" :show="showModal" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, ref } from 'vue'; | ||
import { useBreakpoints } from 'src/hooks'; | ||
import ModalConnectionTrouble from 'src/components/common/ModalConnectionTrouble.vue'; | ||
export default defineComponent({ | ||
components: { ModalConnectionTrouble }, | ||
setup() { | ||
const { width, screenSize } = useBreakpoints(); | ||
const showModal = ref<boolean>(false); | ||
const setShowModal = (isOpen: boolean): void => { | ||
showModal.value = isOpen; | ||
}; | ||
return { | ||
width, | ||
screenSize, | ||
showModal, | ||
setShowModal, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import 'src/css/quasar.variables.scss'; | ||
@import 'src/css/utils.scss'; | ||
.wrapper--trouble-help { | ||
margin-right: 8px; | ||
@media (min-width: $lg) { | ||
margin-right: 16px; | ||
} | ||
} | ||
.btn--help { | ||
display: flex; | ||
height: 32px; | ||
flex-direction: row; | ||
align-items: center; | ||
padding: 8px 16px 8px 16px; | ||
background: transparent; | ||
border-radius: 16px; | ||
margin-left: 8px; | ||
transition: all 0.3s ease 0s; | ||
color: #fff; | ||
border: 1px solid $gray-4; | ||
@media (min-width: $lg) { | ||
color: $navy-1; | ||
border: 1px solid $navy-3; | ||
} | ||
} | ||
.btn--help:hover { | ||
background: $astar-blue; | ||
border: 1px solid transparent; | ||
.icon--help { | ||
color: $gray-1; | ||
} | ||
@media (min-width: $lg) { | ||
background: #fff; | ||
border: 1px solid $gray-4; | ||
.icon--help { | ||
color: $navy-1; | ||
} | ||
} | ||
} | ||
.m-btn--help { | ||
padding-left: 10px; | ||
width: 32px; | ||
height: 32px; | ||
border: 1px solid $navy-3; | ||
border-radius: 16px; | ||
margin-left: 16px; | ||
transition: all 0.3s ease 0s; | ||
background: transparent; | ||
color: $gray-3; | ||
border: 1px solid $gray-4; | ||
@media (min-width: $lg) { | ||
border: 1px solid $navy-3; | ||
} | ||
} | ||
.m-btn--help:hover { | ||
background: $astar-blue; | ||
border: 1px solid transparent; | ||
.icon--help { | ||
color: $gray-1; | ||
} | ||
@media (min-width: $lg) { | ||
background: #fff; | ||
} | ||
} | ||
.icon--help { | ||
margin-right: 4px; | ||
transition: all 0.3s ease 0s; | ||
color: $gray-3; | ||
margin-left: -6px; | ||
margin-top: -1px; | ||
@media (min-width: $lg) { | ||
color: $navy-3; | ||
} | ||
} | ||
.body--dark { | ||
.btn--help { | ||
background: transparent; | ||
color: #fff; | ||
border: 1px solid $gray-4; | ||
} | ||
.btn--help:hover { | ||
background: $astar-blue; | ||
border: 1px solid transparent; | ||
.icon--help { | ||
color: $gray-1; | ||
} | ||
} | ||
.icon--help { | ||
color: $gray-3; | ||
} | ||
.m-btn--help { | ||
background: transparent; | ||
color: $gray-3; | ||
border: 1px solid $gray-4; | ||
} | ||
.m-btn--help:hover { | ||
background: $astar-blue; | ||
border: 1px solid transparent; | ||
.icon--help { | ||
color: $gray-1; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { clickPolicyButton } from 'src/modules/playwright'; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto('/astar/assets'); | ||
}); | ||
|
||
test.describe('init screen', () => { | ||
test('has connection trouble', async ({ page }) => { | ||
await clickPolicyButton(page); | ||
const connectionTroubleButton = page.locator('.btn--help'); | ||
await connectionTroubleButton.click(); | ||
const connectionTroubleModal = page.locator('.wrapper--modal-connection-trouble'); | ||
await expect(connectionTroubleModal).toBeVisible(); | ||
}); | ||
}); |
Oops, something went wrong.