Skip to content

Commit

Permalink
Rework
Browse files Browse the repository at this point in the history
  • Loading branch information
JanAckermann committed Feb 10, 2022
1 parent 474ff05 commit 22559b3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export default {
name: 'editDescription',
icon: 'pencil',
label: () => {
return this.$gettext('Change description')
return this.$gettext('Change short description')
},
handler: this.$_editDescription_trigger,
isEnabled: () => false, // @TODO enable as soon as backend supports this
isEnabled: () => true,
componentType: 'oc-button',
class: 'oc-files-actions-edit-description-trigger'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { isLocationSpacesActive } from '../../../router'
import { client } from 'web-client'
import { useStore } from 'web-pkg/src/composables'

export default {
setup: function () {
const store = useStore()
const { graph } = client(store.getters.configuration.server, store.getters.getToken)
return {
graph
}
},
computed: {
$_setSpaceImage_items() {
return [
Expand Down Expand Up @@ -32,6 +41,20 @@ export default {
}
},
methods: {
async $_setSpaceImage_trigger({ resources }) {}
$_setSpaceImage_trigger({ resources }) {
const id = this.$route.params.spaceId
return this.graph.drives
.updateDrive(id, {}, {})
.then(() => {
this.loadImageTask.perform(this)
})
.catch((error) => {
this.showMessage({
title: this.$gettext('Set space image failed…'),
desc: error,
status: 'danger'
})
})
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ export default {
}
},
methods: {
async $_setSpaceMarkdown_trigger({ resources }) {}
$_setSpaceMarkdown_trigger({ resources }) {
const id = this.$route.params.spaceId
return this.graph.drives
.updateDrive(id, {}, {})
.then(() => {
this.loadImageTask.perform(this)
})
.catch((error) => {
this.showMessage({
title: this.$gettext('Set space description failed…'),
desc: error,
status: 'danger'
})
})
}
}
}

0 comments on commit 22559b3

Please sign in to comment.