Skip to content
Snippets Groups Projects
Commit b8c3303f authored by Tögl, Christina's avatar Tögl, Christina
Browse files

Fix problem with missing session storage username for recent files

parent d88c1b01
No related branches found
No related tags found
No related merge requests found
Pipeline #61928 failed
...@@ -441,6 +441,8 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -441,6 +441,8 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
} }
); );
this.userName = userName;
this.isPickerActive = true; this.isPickerActive = true;
this.loadDirectory(this.directoryPath); this.loadDirectory(this.directoryPath);
} catch (e) { } catch (e) {
...@@ -691,8 +693,10 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -691,8 +693,10 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
this.statusText = ""; this.statusText = "";
this.tabulatorTable.setData(dataObject); this.tabulatorTable.setData(dataObject);
if (this._('#directory-content-table').querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span")) {
//this.tabulatorTable.querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span").innerText = i18n.t('nextcloud-file-picker.no-favorites'); //this.tabulatorTable.querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span").innerText = i18n.t('nextcloud-file-picker.no-favorites');
this._('#directory-content-table').querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span").innerText = i18n.t('nextcloud-file-picker.no-favorites'); this._('#directory-content-table').querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span").innerText = i18n.t('nextcloud-file-picker.no-favorites');
}
this.isPickerActive = true; this.isPickerActive = true;
this._(".nextcloud-content").scrollTop = 0; this._(".nextcloud-content").scrollTop = 0;
...@@ -749,7 +753,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -749,7 +753,7 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
date.setMonth(date.getMonth() - 3); date.setMonth(date.getMonth() - 3);
let searchDate = date.toISOString().split('.')[0] + 'Z'; let searchDate = date.toISOString().split('.')[0] + 'Z';
if (this.webDavClient === null) { if (this.webDavClient === null || this.userName === null) {
// client is broken reload try to reset & reconnect // client is broken reload try to reset & reconnect
this.tabulatorTable.clearData(); this.tabulatorTable.clearData();
this.webDavClient = null; this.webDavClient = null;
...@@ -824,6 +828,12 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) { ...@@ -824,6 +828,12 @@ export class NextcloudFilePicker extends ScopedElementsMixin(DBPLitElement) {
this.tabulatorTable.setSort([ this.tabulatorTable.setSort([
{column: "lastmod", dir: "desc"} {column: "lastmod", dir: "desc"}
]); ]);
if (this._('#directory-content-table').querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span")) {
//this.tabulatorTable.querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span").innerText = i18n.t('nextcloud-file-picker.no-recent-files');
this._('#directory-content-table').querySelector("div.tabulator-tableHolder > div.tabulator-placeholder > span").innerText = i18n.t('nextcloud-file-picker.no-recent-files');
}
this.isPickerActive = true; this.isPickerActive = true;
this._(".nextcloud-content").scrollTop = 0; this._(".nextcloud-content").scrollTop = 0;
this._("#download-button").setAttribute("disabled", "true"); this._("#download-button").setAttribute("disabled", "true");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment