mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
use computed auth links from mixins
This commit is contained in:
parent
7702b88083
commit
70e11b8e49
@ -28,24 +28,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { authLinks } from '../../mixins/authLinks'
|
||||
|
||||
export default {
|
||||
name: 'AuthNavbar',
|
||||
mixins: [authLinks],
|
||||
data() {
|
||||
return {
|
||||
logo: '/img/brand/green.png',
|
||||
sheet: '/img/template/Blaetter.png',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
login() {
|
||||
if (this.$route.params.code) return '/login/' + this.$route.params.code
|
||||
return '/login'
|
||||
},
|
||||
register() {
|
||||
if (this.$route.params.code) return '/register/' + this.$route.params.code
|
||||
return '/register'
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -11,18 +11,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { authLinks } from '../../mixins/authLinks'
|
||||
|
||||
export default {
|
||||
name: 'AuthNavbarSmall',
|
||||
computed: {
|
||||
login() {
|
||||
if (this.$route.params.code) return '/login/' + this.$route.params.code
|
||||
return '/login'
|
||||
},
|
||||
register() {
|
||||
if (this.$route.params.code) return '/register/' + this.$route.params.code
|
||||
return '/register'
|
||||
},
|
||||
},
|
||||
mixins: [authLinks],
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
@ -25,9 +25,11 @@
|
||||
</template>
|
||||
<script>
|
||||
import RedeemInformation from '@/components/LinkInformations/RedeemInformation.vue'
|
||||
import { authLinks } from '../../mixins/authLinks'
|
||||
|
||||
export default {
|
||||
name: 'RedeemLoggedOut',
|
||||
mixins: [authLinks],
|
||||
components: {
|
||||
RedeemInformation,
|
||||
},
|
||||
@ -35,13 +37,5 @@ export default {
|
||||
linkData: { type: Object, required: true },
|
||||
isContributionLink: { type: Boolean, default: false },
|
||||
},
|
||||
computed: {
|
||||
login() {
|
||||
return '/login/' + this.$route.params.code
|
||||
},
|
||||
register() {
|
||||
return '/register/' + this.$route.params.code
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
12
frontend/src/mixins/authLinks.js
Normal file
12
frontend/src/mixins/authLinks.js
Normal file
@ -0,0 +1,12 @@
|
||||
export const authLinks = {
|
||||
computed: {
|
||||
login() {
|
||||
if (this.$route.params.code) return '/login/' + this.$route.params.code
|
||||
return '/login'
|
||||
},
|
||||
register() {
|
||||
if (this.$route.params.code) return '/register/' + this.$route.params.code
|
||||
return '/register'
|
||||
},
|
||||
},
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user