Allow to accept / reject participants

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-09-20 18:22:03 +02:00
parent ffa4ec9209
commit abf3a58657
31 changed files with 1208 additions and 299 deletions

View File

@@ -16,24 +16,23 @@
size="is-large"/>
</div>
<div class="media-content">
<p>The report will be sent to the moderators of your instance.
You can explain why you report this content below.</p>
<p>{{ $t('The report will be sent to the moderators of your instance. You can explain why you report this content below.') }}</p>
<div class="control">
<b-input
v-model="content"
type="textarea"
@keyup.enter="confirm"
placeholder="Additional comments"
:placeholder="$t('Additional comments')"
/>
</div>
<p v-if="outsideDomain">
The content came from another server. Transfer an anonymous copy of the report ?
{{ $t('The content came from another server. Transfer an anonymous copy of the report?') }}
</p>
<div class="control" v-if="outsideDomain">
<b-switch v-model="forward">Transfer to {{ outsideDomain }}</b-switch>
<b-switch v-model="forward">{{ $t('Transfer to {outsideDomain}', { outsideDomain }) }}</b-switch>
</div>
</div>
</div>
@@ -44,13 +43,13 @@
class="button"
ref="cancelButton"
@click="close">
{{ cancelText }}
{{ translatedCancelText }}
</button>
<button
class="button is-primary"
ref="confirmButton"
@click="confirm">
{{ confirmText }}
{{ translatedConfirmText }}
</button>
</footer>
</div>
@@ -69,13 +68,21 @@ export default class ReportModal extends Vue {
@Prop({ type: Function, default: () => {} }) onConfirm;
@Prop({ type: String }) title;
@Prop({ type: String, default: '' }) outsideDomain;
@Prop({ type: String, default: 'Cancel' }) cancelText;
@Prop({ type: String, default: 'Send the report' }) confirmText;
@Prop({ type: String }) cancelText;
@Prop({ type: String }) confirmText;
isActive: boolean = false;
content: string = '';
forward: boolean = false;
get translatedCancelText() {
return this.cancelText || this.$t('Cancel');
}
get translatedConfirmText() {
return this.confirmText || this.$t('Send the report');
}
confirm() {
this.onConfirm(this.content, this.forward);
this.close();