Renote visibility (#3290)
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
<footer>
|
||||
<a class="quote" v-if="!quote" @click="onQuote">{{ $t('quote') }}</a>
|
||||
<ui-button class="button cancel" inline @click="cancel">{{ $t('cancel') }}</ui-button>
|
||||
<ui-button class="button ok" inline primary @click="ok" :disabled="wait">{{ wait ? this.$t('reposting') : this.$t('renote') }}</ui-button>
|
||||
<ui-button class="button home" inline :primary="visibility != 'public'" @click="ok('home')" :disabled="wait">{{ wait ? this.$t('reposting') : this.$t('renote-home') }}</ui-button>
|
||||
<ui-button class="button ok" inline :primary="visibility == 'public'" @click="ok('public')" :disabled="wait">{{ wait ? this.$t('reposting') : this.$t('renote') }}</ui-button>
|
||||
</footer>
|
||||
</template>
|
||||
<template v-if="quote">
|
||||
@@ -24,14 +25,16 @@ export default Vue.extend({
|
||||
data() {
|
||||
return {
|
||||
wait: false,
|
||||
quote: false
|
||||
quote: false,
|
||||
visibility: this.$store.state.settings.defaultNoteVisibility
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
ok() {
|
||||
ok(v: string) {
|
||||
this.wait = true;
|
||||
this.$root.api('notes/create', {
|
||||
renoteId: this.note.id
|
||||
renoteId: this.note.id,
|
||||
visibility: v || this.visibility
|
||||
}).then(data => {
|
||||
this.$emit('posted');
|
||||
this.$notify(this.$t('success'));
|
||||
@@ -81,7 +84,11 @@ export default Vue.extend({
|
||||
height 40px
|
||||
|
||||
&.cancel
|
||||
right 280px
|
||||
|
||||
&.home
|
||||
right 148px
|
||||
font-size 13px
|
||||
|
||||
&.ok
|
||||
right 16px
|
||||
|
||||
Reference in New Issue
Block a user