mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
css mobil style, language in extra componente
This commit is contained in:
parent
1a4e70225a
commit
bb63eaeab4
@ -1,20 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="app" class="font-sans text-gray-800">
|
<div id="app" class="font-sans text-gray-800">
|
||||||
<header>
|
<header></header>
|
||||||
<b-col class="text-center">
|
|
||||||
<b-dropdown
|
|
||||||
size="sm"
|
|
||||||
split
|
|
||||||
variant="secondary"
|
|
||||||
:text="$t('language') + ' - ' + $i18n.locale"
|
|
||||||
class="m-md-2"
|
|
||||||
>
|
|
||||||
<b-dropdown-divider></b-dropdown-divider>
|
|
||||||
<b-dropdown-item @click.prevent="setLocale('de')">Deutsch</b-dropdown-item>
|
|
||||||
<b-dropdown-item @click.prevent="setLocale('en')">English</b-dropdown-item>
|
|
||||||
</b-dropdown>
|
|
||||||
</b-col>
|
|
||||||
</header>
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<particles-bg type="custom" :config="config" :bg="true" />
|
<particles-bg type="custom" :config="config" :bg="true" />
|
||||||
<component :is="$route.meta.requiresAuth ? 'DashboardLayout' : 'AuthLayoutGDD'" />
|
<component :is="$route.meta.requiresAuth ? 'DashboardLayout' : 'AuthLayoutGDD'" />
|
||||||
@ -25,7 +11,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ParticlesBg } from 'particles-bg-vue'
|
import { ParticlesBg } from 'particles-bg-vue'
|
||||||
import icon from './icon.js'
|
import icon from './icon.js'
|
||||||
import { localeChanged } from 'vee-validate'
|
|
||||||
import DashboardLayout from '@/views/Layout/DashboardLayout_gdd.vue'
|
import DashboardLayout from '@/views/Layout/DashboardLayout_gdd.vue'
|
||||||
import AuthLayoutGDD from '@/views/Layout/AuthLayout_gdd.vue'
|
import AuthLayoutGDD from '@/views/Layout/AuthLayout_gdd.vue'
|
||||||
|
|
||||||
@ -54,13 +39,6 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
setLocale(locale) {
|
|
||||||
this.$i18n.locale = locale
|
|
||||||
this.$store.commit('language', this.$i18n.locale)
|
|
||||||
localeChanged(locale)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
22
frontend/src/components/LanguageSwitch.vue
Normal file
22
frontend/src/components/LanguageSwitch.vue
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<b-dropdown size="sm" :text="$t('language') + ' - ' + $i18n.locale">
|
||||||
|
<b-dropdown-item @click.prevent="setLocale('de')">Deutsch</b-dropdown-item>
|
||||||
|
<b-dropdown-item @click.prevent="setLocale('en')">English</b-dropdown-item>
|
||||||
|
</b-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { localeChanged } from 'vee-validate'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'language-switch',
|
||||||
|
methods: {
|
||||||
|
setLocale(locale) {
|
||||||
|
this.$i18n.locale = locale
|
||||||
|
this.$store.commit('language', this.$i18n.locale)
|
||||||
|
localeChanged(locale)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -79,7 +79,7 @@ describe('DashboardLayoutGdd', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('has five items in the navbar', () => {
|
it('has five items in the navbar', () => {
|
||||||
expect(navbar.findAll('ul > li')).toHaveLength(2)
|
expect(navbar.findAll('ul > li')).toHaveLength(5)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('has first item "send" in navbar', () => {
|
it('has first item "send" in navbar', () => {
|
||||||
|
|||||||
@ -3,12 +3,15 @@
|
|||||||
<notifications></notifications>
|
<notifications></notifications>
|
||||||
<side-bar @logout="logout" :balance="balance">
|
<side-bar @logout="logout" :balance="balance">
|
||||||
<template slot="links">
|
<template slot="links">
|
||||||
<b-nav-item href="#!" to="/overview">
|
<b-nav-item to="/overview">
|
||||||
<b-nav-text class="p-0 text-lg text-muted">{{ $t('send') }}</b-nav-text>
|
<b-nav-text class="p-0 text-lg text-muted">{{ $t('send') }}</b-nav-text>
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
<b-nav-item href="#!" to="/transactions">
|
<b-nav-item to="/transactions">
|
||||||
<b-nav-text class="p-0 text-lg text-muted">{{ $t('transactions') }}</b-nav-text>
|
<b-nav-text class="p-0 text-lg text-muted">{{ $t('transactions') }}</b-nav-text>
|
||||||
</b-nav-item>
|
</b-nav-item>
|
||||||
|
<b-nav-item class="d-lg-none">
|
||||||
|
<b-nav-text class="pt-3"><language-switch /></b-nav-text>
|
||||||
|
</b-nav-item>
|
||||||
<!--
|
<!--
|
||||||
<b-nav-item href="#!" to="/profile">
|
<b-nav-item href="#!" to="/profile">
|
||||||
<b-nav-text class="p-0 text-lg text-muted">{{ $t('site.navbar.my-profil') }}</b-nav-text>
|
<b-nav-text class="p-0 text-lg text-muted">{{ $t('site.navbar.my-profil') }}</b-nav-text>
|
||||||
@ -24,7 +27,6 @@
|
|||||||
</side-bar>
|
</side-bar>
|
||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<dashboard-navbar :type="$route.meta.navbarType"></dashboard-navbar>
|
<dashboard-navbar :type="$route.meta.navbarType"></dashboard-navbar>
|
||||||
|
|
||||||
<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 -->
|
||||||
@ -52,6 +54,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 LanguageSwitch from '@/components/LanguageSwitch.vue'
|
||||||
|
|
||||||
function hasElement(className) {
|
function hasElement(className) {
|
||||||
return document.getElementsByClassName(className).length > 0
|
return document.getElementsByClassName(className).length > 0
|
||||||
@ -75,6 +78,7 @@ export default {
|
|||||||
ContentFooter,
|
ContentFooter,
|
||||||
// DashboardContent,
|
// DashboardContent,
|
||||||
FadeTransition,
|
FadeTransition,
|
||||||
|
LanguageSwitch,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -9,8 +9,9 @@
|
|||||||
<!-- This item dont have <b-nav-item> because item have data-action/data-target on tag <a>, wich we cant add -->
|
<!-- This item dont have <b-nav-item> because item have data-action/data-target on tag <a>, wich we cant add -->
|
||||||
<li class="nav-item d-sm-none"></li>
|
<li class="nav-item d-sm-none"></li>
|
||||||
</b-navbar-nav>
|
</b-navbar-nav>
|
||||||
|
<language-switch class="mr-3" />
|
||||||
<b-navbar-nav class="align-items-center ml-auto ml-md-0">
|
<b-navbar-nav class="align-items-center ml-auto ml-md-0">
|
||||||
<a class="pr-1 nav-link" slot="title-container pointer">
|
<div class="pr-1" slot="title-container ">
|
||||||
<b-media no-body class="align-items-center">
|
<b-media no-body class="align-items-center">
|
||||||
<span class="pb-2 text-lg font-weight-bold">
|
<span class="pb-2 text-lg font-weight-bold">
|
||||||
{{ $store.state.email }}
|
{{ $store.state.email }}
|
||||||
@ -21,18 +22,20 @@
|
|||||||
</span>
|
</span>
|
||||||
</b-media-body>
|
</b-media-body>
|
||||||
</b-media>
|
</b-media>
|
||||||
</a>
|
</div>
|
||||||
</b-navbar-nav>
|
</b-navbar-nav>
|
||||||
</base-nav>
|
</base-nav>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { BaseNav } from '@/components'
|
import { BaseNav } from '@/components'
|
||||||
|
import LanguageSwitch from '@/components/LanguageSwitch.vue'
|
||||||
import VueQrcode from 'vue-qrcode'
|
import VueQrcode from 'vue-qrcode'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
BaseNav,
|
BaseNav,
|
||||||
VueQrcode,
|
VueQrcode,
|
||||||
|
LanguageSwitch,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<base-header class="pb-4 pt-2 bg-transparent"></base-header>
|
<base-header class="pb-lg-4 pt-lg-2 bg-transparent"></base-header>
|
||||||
<b-container fluid class="p-2 mt-5">
|
<b-container fluid class="p-lg-2 mt-lg-5">
|
||||||
<gdd-status v-if="showTransactionList" :balance="balance" :gdt-balance="GdtBalance" />
|
<gdd-status v-if="showTransactionList" :balance="balance" :gdt-balance="GdtBalance" />
|
||||||
<br />
|
<br />
|
||||||
<gdd-send
|
<gdd-send
|
||||||
|
|||||||
@ -25,7 +25,7 @@ describe('GddStatus', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
it('it displays the ammount of GDD', () => {
|
it('it displays the ammount of GDD', () => {
|
||||||
expect(wrapper.findAll('div.card-body').at(0).text()).toEqual('1234 GDD')
|
expect(wrapper.findAll('div.card-body b').at(0).text()).toEqual('1234')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('it displays the ammount of GDT', () => {
|
it('it displays the ammount of GDT', () => {
|
||||||
|
|||||||
@ -2,24 +2,15 @@
|
|||||||
<div>
|
<div>
|
||||||
<b-row>
|
<b-row>
|
||||||
<b-col>
|
<b-col>
|
||||||
<stats-card
|
<b-card style="background-color: #ebebeba3 !important">
|
||||||
type="gradient-red"
|
<b>{{ $n(balance) }}</b>
|
||||||
sub-title="balance_gdd"
|
GDD
|
||||||
class="mb-4 h1"
|
</b-card>
|
||||||
style="background-color: #ebebeba3 !important"
|
|
||||||
>
|
|
||||||
{{ $n(balance) }} GDD
|
|
||||||
</stats-card>
|
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col>
|
<b-col>
|
||||||
<stats-card
|
<b-card class="lg-h2 text-right" style="background-color: #ebebeba3 !important">
|
||||||
type="gradient-orange"
|
|
||||||
sub-title="balance_gdt"
|
|
||||||
class="mb-4 h1"
|
|
||||||
style="background-color: #ebebeba3 !important"
|
|
||||||
>
|
|
||||||
{{ $n(GdtBalance) }} GDT
|
{{ $n(GdtBalance) }} GDT
|
||||||
</stats-card>
|
</b-card>
|
||||||
</b-col>
|
</b-col>
|
||||||
</b-row>
|
</b-row>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -88,11 +88,9 @@
|
|||||||
</b-card>
|
</b-card>
|
||||||
</b-collapse>
|
</b-collapse>
|
||||||
</b-list-group-item>
|
</b-list-group-item>
|
||||||
<b-list-group-item>
|
<div v-if="transactions.length === 0" class="mt-lg-4 text-center">
|
||||||
<b-alert v-if="transactions.length === 0" show variant="secondary">
|
<span>{{ $t('transaction.nullTransactions') }}</span>
|
||||||
<span class="alert-text">{{ $t('transaction.nullTransactions') }}</span>
|
</div>
|
||||||
</b-alert>
|
|
||||||
</b-list-group-item>
|
|
||||||
</b-list-group>
|
</b-list-group>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
class="header pb-8 pt-5 pt-lg-8 d-flex align-items-center profile-header"
|
class="header pb-8 pt-lg-4 d-flex align-items-center profile-header"
|
||||||
style="max-height: 200px"
|
style="max-height: 200px"
|
||||||
></div>
|
></div>
|
||||||
<b-container fluid class="mt--6">
|
<b-container fluid class="mt--6">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user