Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/actions/sharingPopupAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ export const action = new FileAction({
async exec(node, view, dir) {
// You need read permissions to see the sidebar
if ((node.permissions & Permission.READ) !== 0) {
setTimeout(() => {
const currentUrl = window.location.search

if (currentUrl.includes('popup')) {
document.querySelector('#app-sidebar-vue').style.width = '0%'
}
})
window.OCA.Files.Sidebar.close()

window.OCA.Files.Sidebar.setActiveTab('sharing-manage')
Expand Down
5 changes: 5 additions & 0 deletions src/components/OpenSharingButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export default {
window.OCA.Files.Sidebar.setActiveTab('sharing')
window.OCA.Files.Sidebar.setFullScreenMode(true)

const currentUrl = window.location.search
if (!currentUrl.includes('openfile')) {
document.querySelector('#app-sidebar-vue').style.width = '0%'
}

// TODO: migrate Sidebar to use a Node instead
window.OCA.Files.Sidebar.open(fileInfoPathName)

Expand Down
10 changes: 8 additions & 2 deletions src/views/SharingPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ export default {

closeThisModal() {
this.modal = false
const currentUrl = window.location.search

if (this.newLinkShare || this.shareSent) {
this.openSharingManage()
} else {
window.OCA.Files.Sidebar.close()
window.OCA.Files.Sidebar.setFullScreenMode(false)
currentUrl.includes('openfile') ? window.OCA.Files.Sidebar.setFullScreenMode(true) : window.OCA.Files.Sidebar.setFullScreenMode(false)
}
},

Expand All @@ -225,7 +226,12 @@ export default {
window.OCA.Files.Sidebar.close()
window.OCA.Files.Sidebar.setActiveTab('sharing')
window.OCA.Files.Sidebar.setActiveTab('sharing-manage')
window.OCA.Files.Sidebar.setFullScreenMode(false)
document.querySelector('#app-sidebar-vue').style.width = 'var(--app-sidebar-width)'

// set setfullscreen sidebar if opened in viewer else not
const currentSearch = window.location.search
const isTargetSearch = (currentSearch === '?dir=/' || currentSearch === '?dir=/&popup=true')
isTargetSearch ? window.OCA.Files.Sidebar.setFullScreenMode(false) : window.OCA.Files.Sidebar.setFullScreenMode(true)

// TODO: migrate Sidebar to use a Node instead
window.OCA.Files.Sidebar.open(fileInfoPathName)
Expand Down
Loading