@@ -2,22 +2,14 @@
|
||||
<div>
|
||||
<v-dialog v-model="showDialog" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title v-show="!success">Send a server invite</v-card-title>
|
||||
<v-card-title>Send a server invite</v-card-title>
|
||||
<v-alert v-model="showError" dismissible type="error" :class="`${success ? 'mb-0' : ''}`">
|
||||
{{ error }}
|
||||
</v-alert>
|
||||
<v-alert v-model="success" dismissible type="success">
|
||||
<v-alert v-model="success" timeout="3000" dismissible type="success">
|
||||
Great! An invite link has been sent.
|
||||
<br />
|
||||
Send another one?
|
||||
</v-alert>
|
||||
<v-form
|
||||
v-show="!success"
|
||||
ref="form"
|
||||
v-model="valid"
|
||||
class="px-2"
|
||||
@submit.prevent="sendInvite"
|
||||
>
|
||||
<v-form ref="form" v-model="valid" class="px-2" @submit.prevent="sendInvite">
|
||||
<v-card-text class="pb-0 mb-0">
|
||||
We will send an invite link for this server to the email below. You can also add a
|
||||
personal message if you want to.
|
||||
@@ -72,15 +64,16 @@ export default {
|
||||
},
|
||||
showDialog() {
|
||||
this.clear()
|
||||
this.email = null
|
||||
this.message = 'Hey, join this Speckle Server!'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.error = null
|
||||
this.showError = false
|
||||
this.email = null
|
||||
this.success = false
|
||||
this.message = 'Hey, join this Speckle Server!'
|
||||
this.$refs.form.resetValidation()
|
||||
},
|
||||
async sendInvite() {
|
||||
if (!this.$refs.form.validate()) return
|
||||
|
||||
@@ -2,26 +2,19 @@
|
||||
<div>
|
||||
<v-dialog v-model="showDialog" max-width="400">
|
||||
<v-card>
|
||||
<v-card-title v-show="!success">Send a stream invite</v-card-title>
|
||||
<v-card-title>Send a stream invite</v-card-title>
|
||||
<v-alert v-model="showError" dismissible type="error" :class="`${success ? 'mb-0' : ''}`">
|
||||
{{ error }}
|
||||
</v-alert>
|
||||
<v-alert v-model="success" dismissible type="success">
|
||||
Great! An invite link has been sent.
|
||||
<br />
|
||||
Send another one?
|
||||
</v-alert>
|
||||
<v-form
|
||||
v-show="!success"
|
||||
ref="form"
|
||||
v-model="valid"
|
||||
class="px-2"
|
||||
@submit.prevent="sendInvite"
|
||||
>
|
||||
<v-form ref="form" v-model="valid" class="px-2" @submit.prevent="sendInvite">
|
||||
<v-card-text class="pb-0 mb-0">
|
||||
We will send an invite link for this server to the email below and once your guest will
|
||||
accept the invite, <b>they will be granted access to this stream</b>. You can also add a
|
||||
personal message if you want to.
|
||||
accept the invite,
|
||||
<b>they will be granted access to this stream</b>
|
||||
. You can also add a personal message if you want to.
|
||||
</v-card-text>
|
||||
<v-card-text class="pt-0 mt-0">
|
||||
<v-text-field
|
||||
@@ -77,15 +70,16 @@ export default {
|
||||
},
|
||||
showDialog() {
|
||||
this.clear()
|
||||
this.email = null
|
||||
this.message = 'Hey, I want to share this stream with you!'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clear() {
|
||||
this.error = null
|
||||
this.showError = false
|
||||
this.email = null
|
||||
this.success = false
|
||||
this.message = 'Hey, I want to share this stream with you!'
|
||||
this.$refs.form.resetValidation()
|
||||
},
|
||||
async sendInvite() {
|
||||
if (!this.$refs.form.validate()) return
|
||||
|
||||
@@ -21,10 +21,9 @@
|
||||
>
|
||||
<v-list-item v-if="filteredSearchResults.length === 0" class="px-0 mx-0">
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>No users found. Note: you can search by name and email.</v-list-item-title>
|
||||
<v-list-item-subtitle>
|
||||
Hint: use the button below to send an invite!
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-title>
|
||||
No users found. Note: you can search by name and email.
|
||||
</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="filteredSearchResults.length === 0" class="px-0 mx-0">
|
||||
@@ -59,10 +58,11 @@
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card-text>
|
||||
<stream-invite-dialog :show="inviteDialog" :streamId="stream.id"/>
|
||||
<stream-invite-dialog :show="inviteDialog" :stream-id="stream.id" />
|
||||
<v-card-title>Existing collaborators</v-card-title>
|
||||
<v-card-text class="px-0">
|
||||
<v-list>
|
||||
<p v-if="collaborators.length === 0" class="ml-6">This stream has no collaborators.</p>
|
||||
<v-list v-else>
|
||||
<v-list-item v-for="user in collaborators" :key="user.id" two-lines>
|
||||
<v-list-item-icon>
|
||||
<user-avatar :id="user.id" :avatar="user.avatar" :name="user.name" :size="42" />
|
||||
|
||||
@@ -7,7 +7,11 @@
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" lg="4" xl="3">
|
||||
<router-view></router-view>
|
||||
<p class="caption text-center mt-2" v-html="serverInfo.termsOfService"></p>
|
||||
<p
|
||||
v-if="serverInfo"
|
||||
class="caption text-center mt-2"
|
||||
v-html="serverInfo.termsOfService"
|
||||
></p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
@@ -100,7 +100,7 @@ This email was sent from ${serverInfo.name} at ${process.env.CANONICAL_URL}, dep
|
||||
|
||||
async validateInvite( { email, id } ) {
|
||||
const invite = await module.exports.getInviteById( { id } )
|
||||
return invite.email === email
|
||||
return invite && invite.email === email
|
||||
},
|
||||
|
||||
async useInvite( { id, email } ) {
|
||||
|
||||
Reference in New Issue
Block a user