forked from AkkomaGang/akkoma-fe
now it actually works
This commit is contained in:
parent
6165b7366a
commit
ef968d8e1e
5 changed files with 21 additions and 9 deletions
|
@ -24,7 +24,7 @@ const PostStatusForm = {
|
||||||
'replyTo',
|
'replyTo',
|
||||||
'repliedUser',
|
'repliedUser',
|
||||||
'attentions',
|
'attentions',
|
||||||
'messageScope',
|
'copyMessageScope',
|
||||||
'subject'
|
'subject'
|
||||||
],
|
],
|
||||||
components: {
|
components: {
|
||||||
|
@ -46,6 +46,12 @@ const PostStatusForm = {
|
||||||
statusText = buildMentionsString({ user: this.repliedUser, attentions: this.attentions }, currentUser)
|
statusText = buildMentionsString({ user: this.repliedUser, attentions: this.attentions }, currentUser)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(this.copyMessageScope)
|
||||||
|
const scope = (this.copyMessageScope && this.$store.state.config.copyScope || this.copyMessageScope === 'direct')
|
||||||
|
? this.copyMessageScope
|
||||||
|
: this.$store.state.users.currentUser.default_scope
|
||||||
|
|
||||||
|
console.log(this)
|
||||||
return {
|
return {
|
||||||
dropFiles: [],
|
dropFiles: [],
|
||||||
submitDisabled: false,
|
submitDisabled: false,
|
||||||
|
@ -58,7 +64,7 @@ const PostStatusForm = {
|
||||||
contentType: 'text/plain',
|
contentType: 'text/plain',
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
files: [],
|
files: [],
|
||||||
visibility: this.messageScope || this.$store.state.users.currentUser.default_scope
|
visibility: scope
|
||||||
},
|
},
|
||||||
caret: 0
|
caret: 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,15 +70,15 @@
|
||||||
<select id="subjectLineBehavior" v-model="subjectLineBehaviorLocal">
|
<select id="subjectLineBehavior" v-model="subjectLineBehaviorLocal">
|
||||||
<option value="email">
|
<option value="email">
|
||||||
{{$t('settings.subject_line_email')}}
|
{{$t('settings.subject_line_email')}}
|
||||||
{{subjectLineBehaviorLocal == 'email' ? $t('settings.instance_default_simple') : ''}}
|
{{subjectLineBehaviorDefault == 'email' ? $t('settings.instance_default_simple') : ''}}
|
||||||
</option>
|
</option>
|
||||||
<option value="masto">
|
<option value="masto">
|
||||||
{{$t('settings.subject_line_mastodon')}}
|
{{$t('settings.subject_line_mastodon')}}
|
||||||
{{subjectLineBehaviorLocal == 'mastodon' ? $t('settings.instance_default_simple') : ''}}
|
{{subjectLineBehaviorDefault == 'mastodon' ? $t('settings.instance_default_simple') : ''}}
|
||||||
</option>
|
</option>
|
||||||
<option value="noop">
|
<option value="noop">
|
||||||
{{$t('settings.subject_line_noop')}}
|
{{$t('settings.subject_line_noop')}}
|
||||||
{{subjectLineBehaviorLocal == 'noop' ? $t('settings.instance_default_simple') : ''}}
|
{{subjectLineBehaviorDefault == 'noop' ? $t('settings.instance_default_simple') : ''}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
<i class="icon-down-open"/>
|
<i class="icon-down-open"/>
|
||||||
|
|
|
@ -174,10 +174,16 @@ const Status = {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
replySubject () {
|
replySubject () {
|
||||||
if (this.status.summary && !this.status.summary.match(/^re[: ]/i)) {
|
if (!this.status.summary) return '';
|
||||||
return 're: '.concat(this.status.summary)
|
const behavior = this.$store.state.config.subjectLineBehavior
|
||||||
}
|
const startsWithRe = this.status.summary.match(/^re[: ]/i)
|
||||||
|
if (behavior !== 'noop' && startsWithRe || behavior === 'masto') {
|
||||||
return this.status.summary
|
return this.status.summary
|
||||||
|
} else if (behavior === 'email') {
|
||||||
|
return 're: '.concat(this.status.summary)
|
||||||
|
} else if (behavior === 'noop') {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
attachmentSize () {
|
attachmentSize () {
|
||||||
if ((this.$store.state.config.hideAttachments && !this.inConversation) ||
|
if ((this.$store.state.config.hideAttachments && !this.inConversation) ||
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="container" v-if="replying">
|
<div class="container" v-if="replying">
|
||||||
<div class="reply-left"/>
|
<div class="reply-left"/>
|
||||||
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" :message-scope="status.visibility" :subject="replySubject" v-on:posted="toggleReplying"/>
|
<post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" :copy-message-scope="status.visibility" :subject="replySubject" v-on:posted="toggleReplying"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,7 +19,7 @@ const defaultState = {
|
||||||
formattingOptionsEnabled: false,
|
formattingOptionsEnabled: false,
|
||||||
collapseMessageWithSubject: false,
|
collapseMessageWithSubject: false,
|
||||||
disableChat: false,
|
disableChat: false,
|
||||||
scopeCopy: false,
|
scopeCopy: true,
|
||||||
subjectLineBehavior: 'email',
|
subjectLineBehavior: 'email',
|
||||||
|
|
||||||
// Nasty stuff
|
// Nasty stuff
|
||||||
|
|
Loading…
Reference in a new issue