mirror of https://github.com/keeweb/keeweb.git
fixed google drive files listing
This commit is contained in:
parent
b6d507d5bc
commit
40c3b0b5bd
|
@ -19,15 +19,14 @@ const StorageFileListView = Backbone.View.extend({
|
|||
this.allStorageFiles[file.path] = file;
|
||||
return {
|
||||
path: file.path,
|
||||
name: UrlUtil.getDataFileName(file.name),
|
||||
name: file.name.replace(/\.kdbx$/i, ''),
|
||||
kdbx: UrlUtil.isKdbx(file.name),
|
||||
dir: file.dir
|
||||
};
|
||||
});
|
||||
let hasHiddenFiles = this.showHiddenFiles;
|
||||
const visibleFiles = files.filter(f => !f.dir && f.kdbx);
|
||||
const canShowHiddenFiles = visibleFiles.length && files.length > visibleFiles.length;
|
||||
if (!this.showHiddenFiles) {
|
||||
const visibleFiles = files.filter(f => !f.dir && f.kdbx);
|
||||
hasHiddenFiles = files.length > visibleFiles.length;
|
||||
if (visibleFiles.length > 0) {
|
||||
files = visibleFiles;
|
||||
} else {
|
||||
|
@ -39,7 +38,7 @@ const StorageFileListView = Backbone.View.extend({
|
|||
files,
|
||||
density,
|
||||
showHiddenFiles: this.showHiddenFiles,
|
||||
hasHiddenFiles: hasHiddenFiles
|
||||
canShowHiddenFiles: canShowHiddenFiles
|
||||
});
|
||||
return this;
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{#if hasHiddenFiles}}
|
||||
{{#if canShowHiddenFiles}}
|
||||
<div class="open-list__check-wrap">
|
||||
<input type="checkbox" id="open-list__check" {{#if showHiddenFiles}}checked{{/if}}
|
||||
/><label class="open-list__check-label" for="open-list__check">{{res 'openShowAllFiles'}}</label>
|
||||
|
|
Loading…
Reference in New Issue