mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
merge my local master in git clone master 2
This commit is contained in:
parent
c8555af3ad
commit
543e78e7ab
@ -1,121 +1,81 @@
|
|||||||
<template>
|
<template>
|
||||||
<SlideYUpTransition :duration="animationDuration">
|
<!--Notice modal-->
|
||||||
<b-modal class="modal fade"
|
<modal :show.sync="$store.state.modals"
|
||||||
ref="app-modal"
|
modal-classes="modal-danger"
|
||||||
:size="size"
|
modal-content-classes="bg-gradient-danger">
|
||||||
:hide-header="!$slots.header"
|
<h6 slot="header" class="modal-title">Your attention is required</h6>
|
||||||
:modal-class="[{'modal-mini': type === 'mini'}, ...modalClasses]"
|
|
||||||
@mousedown.self="closeModal"
|
|
||||||
tabindex="-1"
|
|
||||||
role="dialog"
|
|
||||||
centered
|
|
||||||
@close="closeModal"
|
|
||||||
@hide="closeModal"
|
|
||||||
:header-class="headerClasses"
|
|
||||||
:footer-class="footerClasses"
|
|
||||||
:content-class="[gradient ? `bg-gradient-${gradient}` : '', ...modalContentClasses]"
|
|
||||||
:body-class="bodyClasses"
|
|
||||||
:aria-hidden="!show">
|
|
||||||
|
|
||||||
<template v-slot:modal-header>
|
<div class="py-3 text-center">
|
||||||
<slot name="header"></slot>
|
|
||||||
<slot name="close-button">
|
<form ref="form" @submit.stop.prevent="handleSubmit">
|
||||||
<button type="button"
|
<b-form-group
|
||||||
class="close"
|
label="Name"
|
||||||
v-if="showClose"
|
label-for="name-input"
|
||||||
@click="closeModal"
|
invalid-feedback="Name is required"
|
||||||
data-dismiss="modal"
|
:state="nameState"
|
||||||
aria-label="Close">
|
>
|
||||||
<span :aria-hidden="!show">×</span>
|
<b-form-input
|
||||||
</button>
|
id="name-input"
|
||||||
</slot>
|
v-model="name"
|
||||||
</template>
|
:state="nameState"
|
||||||
|
required
|
||||||
|
></b-form-input>
|
||||||
|
</b-form-group>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<slot />
|
<template slot="footer">
|
||||||
|
<base-button type="white">Ok</base-button>
|
||||||
<template v-slot:modal-footer>
|
<base-button type="link" class="text-white ml-auto" @click="$store.state.modals = false">abbrechen</base-button>
|
||||||
<slot name="footer"></slot>
|
</template>
|
||||||
</template>
|
</modal>
|
||||||
|
|
||||||
</b-modal>
|
|
||||||
</SlideYUpTransition>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
|
||||||
import { SlideYUpTransition } from "vue2-transitions";
|
|
||||||
|
|
||||||
export default {
|
<script>
|
||||||
name: "modal",
|
|
||||||
components: {
|
|
||||||
SlideYUpTransition
|
export default {
|
||||||
},
|
name: 'modal',
|
||||||
props: {
|
data() {
|
||||||
show: Boolean,
|
return {
|
||||||
showClose: {
|
name: '',
|
||||||
type: Boolean,
|
nameState: null,
|
||||||
default: true
|
submittedNames: []
|
||||||
},
|
|
||||||
type: {
|
|
||||||
type: String,
|
|
||||||
default: "",
|
|
||||||
validator(value) {
|
|
||||||
let acceptedValues = ["", "notice", "mini"];
|
|
||||||
return acceptedValues.indexOf(value) !== -1;
|
|
||||||
},
|
|
||||||
description: 'Modal type (notice|mini|"") '
|
|
||||||
},
|
|
||||||
modalClasses: {
|
|
||||||
type: [Object, String],
|
|
||||||
description: "Modal dialog css classes"
|
|
||||||
},
|
|
||||||
size: {
|
|
||||||
type: String,
|
|
||||||
description: 'Modal size',
|
|
||||||
validator(value) {
|
|
||||||
let acceptedValues = ["", "sm", "lg"];
|
|
||||||
return acceptedValues.indexOf(value) !== -1;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
modalContentClasses: {
|
|
||||||
type: [Object, String],
|
|
||||||
description: "Modal dialog content css classes"
|
|
||||||
},
|
|
||||||
gradient: {
|
|
||||||
type: String,
|
|
||||||
description: "Modal gradient type (danger, primary etc)"
|
|
||||||
},
|
|
||||||
headerClasses: {
|
|
||||||
type: [Object, String],
|
|
||||||
description: "Modal Header css classes"
|
|
||||||
},
|
|
||||||
bodyClasses: {
|
|
||||||
type: [Object, String],
|
|
||||||
description: "Modal Body css classes"
|
|
||||||
},
|
|
||||||
footerClasses: {
|
|
||||||
type: [Object, String],
|
|
||||||
description: "Modal Footer css classes"
|
|
||||||
},
|
|
||||||
animationDuration: {
|
|
||||||
type: Number,
|
|
||||||
default: 500,
|
|
||||||
description: "Modal transition duration"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
/*Modal*/
|
||||||
closeModal() {
|
checkFormValidity() {
|
||||||
this.$emit("update:show", false);
|
const valid = this.$refs.form.checkValidity()
|
||||||
this.$emit("close");
|
this.nameState = valid
|
||||||
}
|
return valid
|
||||||
},
|
},
|
||||||
watch: {
|
resetModal() {
|
||||||
show(val) {
|
this.name = ''
|
||||||
if (val) {
|
this.nameState = null
|
||||||
this.$refs['app-modal'].show();
|
},
|
||||||
} else {
|
handleOk(bvModalEvt) {
|
||||||
this.$refs['app-modal'].hide();
|
// Prevent modal from closing
|
||||||
|
bvModalEvt.preventDefault()
|
||||||
|
// Trigger submit handler
|
||||||
|
this.handleSubmit()
|
||||||
|
},
|
||||||
|
handleSubmit() {
|
||||||
|
// Exit when the form isn't valid
|
||||||
|
if (!this.checkFormValidity()) {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
// Push the name to submitted names
|
||||||
}
|
this.submittedNames.push(this.name)
|
||||||
|
this.$store.state.modals = false
|
||||||
|
this.$store.commit('loginAsAdmin')
|
||||||
|
this.$router.push('/AdminOverview')
|
||||||
|
|
||||||
|
// Hide the modal manually
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$bvModal.hide('modal-prevent-closing')
|
||||||
|
})
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@ -82,28 +82,45 @@
|
|||||||
<!--Divider-->
|
<!--Divider-->
|
||||||
<hr class="my-3">
|
<hr class="my-3">
|
||||||
<!--Heading-->
|
<!--Heading-->
|
||||||
<h6 class="navbar-heading text-muted">Documentation</h6>
|
<h6 class="navbar-heading text-muted">{{ $t('site.sidebar.community') }}</h6>
|
||||||
<!--Navigation-->
|
<!--Navigation-->
|
||||||
<ul class="navbar-nav mb-md-3">
|
<ul class="navbar-nav mb-md-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link"
|
<a class="nav-link"
|
||||||
href="https://www.creative-tim.com/learning-lab/bootstrap-vue/alerts/argon-dashboard">
|
href="https://gradido.net/de/">
|
||||||
<i class="ni ni-spaceship"></i> Getting started
|
<i class="ni ni-spaceship"></i> Gradido.net
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link"
|
<a class="nav-link"
|
||||||
href="https://www.creative-tim.com/learning-lab/bootstrap-vue/colors/argon-dashboard">
|
href="https://elopage.com/s/gradido/sign_in">
|
||||||
<i class="ni ni-palette"></i> Foundation
|
<i class="ni ni-palette"></i> {{ $t('site.sidebar.members_area') }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link"
|
<a class="nav-link"
|
||||||
href="https://www.creative-tim.com/learning-lab/bootstrap-vue/alerts/argon-dashboard">
|
href="https://gradido.net/de/memberships/">
|
||||||
<i class="ni ni-ui-04"></i> Components
|
<i class="ni ni-ui-04"></i> {{ $t('site.sidebar.membership') }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<!--Divider-->
|
||||||
|
<hr class="my-3">
|
||||||
|
<!--Heading-->
|
||||||
|
<h6 class="navbar-heading text-muted">{{ $t('site.sidebar.language') }}</h6>
|
||||||
|
<!--Navigation-->
|
||||||
|
<ul class="navbar-nav mb-md-3">
|
||||||
|
<li class="nav-item">
|
||||||
|
<div class="nav-link" @click.prevent="setLocale('en')">
|
||||||
|
<i class="ni ni-ui-04"></i> English</div>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<div class="nav-link" @click.prevent="setLocale('de')">
|
||||||
|
<i class="ni ni-ui-04"></i> Deutsch</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@ -139,7 +156,14 @@
|
|||||||
},
|
},
|
||||||
showSidebar() {
|
showSidebar() {
|
||||||
this.$sidebar.displaySidebar(true)
|
this.$sidebar.displaySidebar(true)
|
||||||
}
|
},
|
||||||
|
setLocale(locale) {
|
||||||
|
this.$i18n.locale = locale
|
||||||
|
this.$router.push({
|
||||||
|
params: { lang: locale }
|
||||||
|
})
|
||||||
|
this.hideDropdown()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
if (this.$sidebar.showSidebar) {
|
if (this.$sidebar.showSidebar) {
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<b-row align-v="center" class="justify-content-lg-between">
|
<b-row align-v="center" class="justify-content-lg-between">
|
||||||
<b-col lg="6">
|
<b-col lg="6">
|
||||||
<div class="copyright text-center text-lg-left text-muted">
|
<div class="copyright text-center text-lg-left text-muted">
|
||||||
© {{year}} <a href="https://www.creative-tim.com" class="font-weight-bold ml-1" target="_blank">Gradido WalletFcreativ</a>
|
© {{year}} <a href="https://gradido.net/" class="font-weight-bold ml-1" target="_blank">Gradido Wallet</a>
|
||||||
</div>
|
</div>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col lg="6">
|
<b-col lg="6">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user