Skip to content
Snippets Groups Projects
Commit 9dffcce6 authored by Steinwender, Tamara's avatar Steinwender, Tamara
Browse files

Hide permissions from interface, fix '//' from path

parent 8f1fa193
No related branches found
No related tags found
No related merge requests found
Pipeline #12676 passed
...@@ -26,7 +26,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -26,7 +26,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
this.isPickerActive = false; this.isPickerActive = false;
this.statusText = ''; this.statusText = '';
this.lastDirectoryPath = '/'; this.lastDirectoryPath = '/';
this.directoryPath = '/'; this.directoryPath = '';
this.webDavClient = null; this.webDavClient = null;
this.tabulatorTable = null; this.tabulatorTable = null;
this.allowedMimeTypes = '*/*'; this.allowedMimeTypes = '*/*';
...@@ -152,8 +152,8 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -152,8 +152,8 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
const minutes = ("0" + timestamp.getMinutes()).slice(-2); const minutes = ("0" + timestamp.getMinutes()).slice(-2);
return date + "." + month + "." + year + " " + hours + ":" + minutes; return date + "." + month + "." + year + " " + hours + ":" + minutes;
}}, }},
{title: "rights", field: "props.permissions"},//, visible:false}, {title: "rights", field: "props.permissions", visible:false},
{title: "acl", field: "props.acl-list.acl.acl-permissions"}//, visible:false} {title: "acl", field: "props.acl-list.acl.acl-permissions", visible:false}
], ],
initialSort:[ initialSort:[
{column:"basename", dir:"asc"}, {column:"basename", dir:"asc"},
...@@ -332,8 +332,8 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -332,8 +332,8 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
console.error(error.message); console.error(error.message);
// on Error: try to reload with home directory // on Error: try to reload with home directory
if (path != "/" && this.webDavClient !== null){ if ((path !== "/" || path !== "") && this.webDavClient !== null && error.message.search("401") === -1) {
this.loadDirectory("/"); this.loadDirectory("");
} }
else { else {
this.loading = false; this.loading = false;
...@@ -804,7 +804,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -804,7 +804,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
*/ */
getBreadcrumb() { getBreadcrumb() {
let htmlpath = []; let htmlpath = [];
htmlpath[0] = html`<span class="breadcrumb"><a @click="${() => { this.loadDirectory("/"); }}" title="${i18n.t('nextcloud-file-picker.folder-home')}"><dbp-icon name="home"></dbp-icon> </a></span>`; htmlpath[0] = html`<span class="breadcrumb"><a @click="${() => { this.loadDirectory(""); }}" title="${i18n.t('nextcloud-file-picker.folder-home')}"><dbp-icon name="home"></dbp-icon> </a></span>`;
const directories = this.directoryPath.split('/'); const directories = this.directoryPath.split('/');
if (directories[1] === "") if (directories[1] === "")
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment