mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
setting up invite button
This commit is contained in:
parent
ff50273f94
commit
e6dc3f42ce
17
webapp/components/InviteButton/InviteButton.vue
Normal file
17
webapp/components/InviteButton/InviteButton.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<template>
|
||||
<dropdown class="avatar-menu" offset="8" :placement="placement">
|
||||
<template #default="{ toggleMenu }">
|
||||
XXX
|
||||
</template>
|
||||
</dropdown>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Dropdown from '~/components/Dropdown'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Dropdown,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@ -29,6 +29,8 @@ const sentry = {
|
||||
const options = {
|
||||
VERSION: process.env.VERSION || pkg.version,
|
||||
DESCRIPTION: process.env.DESCRIPTION || pkg.description,
|
||||
PUBLIC_REGISTRATION: process.env.PUBLIC_REGISTRATION === 'true',
|
||||
INVITE_REGISTRATION: process.env.INVITE_REGISTRATION === 'true',
|
||||
// Cookies
|
||||
COOKIE_EXPIRE_TIME: process.env.COOKIE_EXPIRE_TIME || 730, // Two years by default
|
||||
COOKIE_HTTPS_ONLY: process.env.COOKIE_HTTPS_ONLY || process.env.NODE_ENV === 'production', // ensure true in production if not set explicitly
|
||||
|
||||
@ -50,6 +50,10 @@
|
||||
<client-only>
|
||||
<notification-menu placement="top" />
|
||||
</client-only>
|
||||
XXX {{ showInviteButton }}
|
||||
<client-only v-if="showInviteButton">
|
||||
<invite-button placement="top" />
|
||||
</client-only>
|
||||
<client-only>
|
||||
<avatar-menu placement="top" />
|
||||
</client-only>
|
||||
@ -84,6 +88,7 @@ import seo from '~/mixins/seo'
|
||||
import FilterMenu from '~/components/FilterMenu/FilterMenu.vue'
|
||||
import PageFooter from '~/components/PageFooter/PageFooter'
|
||||
import AvatarMenu from '~/components/AvatarMenu/AvatarMenu'
|
||||
import InviteButton from '~/components/InviteButton/InviteButton'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -95,6 +100,7 @@ export default {
|
||||
AvatarMenu,
|
||||
FilterMenu,
|
||||
PageFooter,
|
||||
InviteButton,
|
||||
},
|
||||
mixins: [seo],
|
||||
data() {
|
||||
@ -103,6 +109,11 @@ export default {
|
||||
toggleMobileMenu: false,
|
||||
}
|
||||
},
|
||||
asyncData({ app }) {
|
||||
return {
|
||||
inviteRegistration: app.$env.INVITE_REGISTRATION,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
isLoggedIn: 'auth/isLoggedIn',
|
||||
@ -111,6 +122,9 @@ export default {
|
||||
const [firstRoute] = this.$route.matched
|
||||
return firstRoute && firstRoute.name === 'index'
|
||||
},
|
||||
showInviteButton() {
|
||||
return this.inviteRegistration
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toggleMobileMenuView() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user