editing #158

Merged
floatingghost merged 21 commits from editing into develop 2022-09-06 19:25:04 +00:00
5 changed files with 8 additions and 5 deletions
Showing only changes of commit dad2a8e5bd - Show all commits

View file

@ -87,6 +87,7 @@ export default {
return this.$store.getters.mergedConfig.alwaysShowNewPostButton || this.layoutType === 'mobile'
},
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
editingAvailable () { return this.$store.state.instance.editingAvailable },
layoutType () { return this.$store.state.interface.layoutType },
privateMode () { return this.$store.state.instance.private },
reverseLayout () {

View file

@ -58,8 +58,8 @@
<MobilePostStatusButton />
<UserReportingModal />
<PostStatusModal />
<EditStatusModal />
<StatusHistoryModal />
<EditStatusModal v-if="editingAvailable" />
<StatusHistoryModal v-if="editingAvailable" />
<SettingsModal />
<UpdateNotification />
<GlobalNoticeList />

View file

@ -273,6 +273,7 @@ const getNodeInfo = async ({ store }) => {
store.dispatch('setInstanceOption', { name: 'mediaProxyAvailable', value: features.includes('media_proxy') })
store.dispatch('setInstanceOption', { name: 'safeDM', value: features.includes('safe_dm_mentions') })
store.dispatch('setInstanceOption', { name: 'pollsAvailable', value: features.includes('polls') })
store.dispatch('setInstanceOption', { name: 'editingAvailable', value: features.includes('editing') })
store.dispatch('setInstanceOption', { name: 'pollLimits', value: metadata.pollLimits })
store.dispatch('setInstanceOption', { name: 'mailerEnabled', value: metadata.mailerEnabled })
store.dispatch('setInstanceOption', { name: 'translationEnabled', value: features.includes('akkoma:machine_translation') })

View file

@ -166,7 +166,8 @@ const ExtraButtons = {
},
isEdited () {
return this.status.edited_at !== null
}
},
editingAvailable () { return this.$store.state.instance.editingAvailable }
}
}

View file

@ -74,7 +74,7 @@
/><span>{{ $t("status.unbookmark") }}</span>
</button>
<button
v-if="ownStatus"
v-if="ownStatus && editingAvailable"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="editStatus"
@click="close"
@ -85,7 +85,7 @@
/><span>{{ $t("status.edit") }}</span>
</button>
<button
v-if="isEdited"
v-if="isEdited && editingAvailable"
class="button-default dropdown-item dropdown-item-icon"
@click.prevent="showStatusHistory"
@click="close"