mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch 'remove-base-input-example-login-vue' of github.com:gradido/gradido into remove-base-input-example-login-vue
This commit is contained in:
commit
71a2a0c6aa
@ -41,20 +41,6 @@ describe('SideBar', () => {
|
|||||||
expect(wrapper.find('#sidenav-main').exists()).toBeTruthy()
|
expect(wrapper.find('#sidenav-main').exists()).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('balance', () => {
|
|
||||||
it('shows em-dash as balance while loading', () => {
|
|
||||||
expect(wrapper.find('.gddBalance').text()).toBe('— GDD')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('shows the when loaded', async () => {
|
|
||||||
wrapper.setProps({
|
|
||||||
pending: false,
|
|
||||||
})
|
|
||||||
await wrapper.vm.$nextTick()
|
|
||||||
expect(wrapper.find('.gddBalance').text()).toBe('1234.56 GDD')
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe('navbar button', () => {
|
describe('navbar button', () => {
|
||||||
it('has a navbar button', () => {
|
it('has a navbar button', () => {
|
||||||
expect(wrapper.find('button.navbar-toggler').exists()).toBeTruthy()
|
expect(wrapper.find('button.navbar-toggler').exists()).toBeTruthy()
|
||||||
@ -68,6 +54,20 @@ describe('SideBar', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('balance', () => {
|
||||||
|
it('shows em-dash as balance while loading', () => {
|
||||||
|
expect(wrapper.find('div.row.text-center').text()).toBe('— GDD')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('shows the when loaded', async () => {
|
||||||
|
wrapper.setProps({
|
||||||
|
pending: false,
|
||||||
|
})
|
||||||
|
await wrapper.vm.$nextTick()
|
||||||
|
expect(wrapper.find('div.row.text-center').text()).toBe('1234.56 GDD')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('close siedbar', () => {
|
describe('close siedbar', () => {
|
||||||
it('calls closeSidebar when clicked', async () => {
|
it('calls closeSidebar when clicked', async () => {
|
||||||
const spy = jest.spyOn(wrapper.vm.$sidebar, 'displaySidebar')
|
const spy = jest.spyOn(wrapper.vm.$sidebar, 'displaySidebar')
|
||||||
|
|||||||
@ -4,26 +4,21 @@
|
|||||||
id="sidenav-main"
|
id="sidenav-main"
|
||||||
>
|
>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="text-center">
|
<!--Toggler-->
|
||||||
<div class="mb-2">
|
<navbar-toggle-button @click.native="showSidebar"></navbar-toggle-button>
|
||||||
<img :src="logo" class="navbar-brand-img" alt="Gradido Logo" />
|
<div class="navbar-brand">
|
||||||
</div>
|
<img :src="logo" class="navbar-brand-img" alt="..." />
|
||||||
</div>
|
</div>
|
||||||
<div class="gddBalance text-center">{{ pending ? '—' : $n(balance, 'decimal') }} GDD</div>
|
<b-row class="text-center">
|
||||||
|
<b-col>{{ pending ? '—' : $n(balance, 'decimal') }} GDD</b-col>
|
||||||
<div class="text-center">
|
</b-row>
|
||||||
<div class="avatar">
|
|
||||||
<vue-qrcode :value="$store.state.email" type="image/png"></vue-qrcode>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<slot name="mobile-right">
|
<slot name="mobile-right">
|
||||||
<ul class="nav align-items-center d-md-none">
|
<ul class="nav align-items-center d-md-none">
|
||||||
<a slot="title-container" class="nav-link" role="button">
|
<div class="media align-items-center">
|
||||||
<div class="media align-items-center">
|
<span class="avatar avatar-sm">
|
||||||
<navbar-toggle-button @click.native="showSidebar"></navbar-toggle-button>
|
<vue-qrcode :value="$store.state.email" type="image/png"></vue-qrcode>
|
||||||
</div>
|
</span>
|
||||||
</a>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</slot>
|
</slot>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@ -74,15 +69,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import NavbarToggleButton from '@/components/NavbarToggleButton'
|
import NavbarToggleButton from '@/components/NavbarToggleButton'
|
||||||
import VueQrcode from 'vue-qrcode'
|
|
||||||
import LanguageSwitch from '@/components/LanguageSwitch.vue'
|
import LanguageSwitch from '@/components/LanguageSwitch.vue'
|
||||||
|
import VueQrcode from 'vue-qrcode'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'sidebar',
|
name: 'sidebar',
|
||||||
components: {
|
components: {
|
||||||
NavbarToggleButton,
|
NavbarToggleButton,
|
||||||
VueQrcode,
|
|
||||||
LanguageSwitch,
|
LanguageSwitch,
|
||||||
|
VueQrcode,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
logo: {
|
logo: {
|
||||||
|
|||||||
@ -24,6 +24,25 @@
|
|||||||
</template>
|
</template>
|
||||||
</side-bar>
|
</side-bar>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
|
<div class="d-none d-md-block">
|
||||||
|
<b-navbar>
|
||||||
|
<b-navbar-nav class="ml-auto">
|
||||||
|
<b-nav-item>
|
||||||
|
<b-media no-body class="align-items-center">
|
||||||
|
<span class="pb-2 text-lg font-weight-bold">
|
||||||
|
{{ $store.state.email }}
|
||||||
|
</span>
|
||||||
|
<b-media-body class="ml-2">
|
||||||
|
<span class="avatar">
|
||||||
|
<vue-qrcode :value="$store.state.email" type="image/png"></vue-qrcode>
|
||||||
|
</span>
|
||||||
|
</b-media-body>
|
||||||
|
</b-media>
|
||||||
|
</b-nav-item>
|
||||||
|
</b-navbar-nav>
|
||||||
|
</b-navbar>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div @click="$sidebar.displaySidebar(false)">
|
<div @click="$sidebar.displaySidebar(false)">
|
||||||
<fade-transition :duration="200" origin="center top" mode="out-in">
|
<fade-transition :duration="200" origin="center top" mode="out-in">
|
||||||
<!-- your content here -->
|
<!-- your content here -->
|
||||||
@ -51,6 +70,7 @@ import ContentFooter from './ContentFooter.vue'
|
|||||||
// import DashboardContent from './Content.vue';
|
// import DashboardContent from './Content.vue';
|
||||||
import { FadeTransition } from 'vue2-transitions'
|
import { FadeTransition } from 'vue2-transitions'
|
||||||
import communityAPI from '../../apis/communityAPI'
|
import communityAPI from '../../apis/communityAPI'
|
||||||
|
import VueQrcode from 'vue-qrcode'
|
||||||
|
|
||||||
function hasElement(className) {
|
function hasElement(className) {
|
||||||
return document.getElementsByClassName(className).length > 0
|
return document.getElementsByClassName(className).length > 0
|
||||||
@ -71,7 +91,7 @@ function initScrollbar(className) {
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ContentFooter,
|
ContentFooter,
|
||||||
// DashboardContent,
|
VueQrcode,
|
||||||
FadeTransition,
|
FadeTransition,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -129,4 +149,9 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss"></style>
|
<style lang="scss">
|
||||||
|
.xxx {
|
||||||
|
position: relative;
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user