@cloudron/pankow 4.1.3 → 4.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -304,7 +304,7 @@ export default {
304
304
  },
305
305
  refreshHandler: {
306
306
  type: Function,
307
- default() { console.warn('Missing refreshHandler for DirectoryView'); }
307
+ default: null
308
308
  }
309
309
  },
310
310
  computed: {
@@ -378,13 +378,15 @@ export default {
378
378
  action: this.onSelectAll
379
379
  }, {
380
380
  separator:true,
381
- visible: () => { return this.showNewFile || this.showNewFolder; },
381
+ visible: () => { return typeof this.refreshHandler === 'function'; },
382
382
  }, {
383
383
  label: this.tr('filemanager.toolbar.refresh'),
384
384
  icon:'fa-solid fa-arrow-rotate-right',
385
+ visible: () => { return typeof this.refreshHandler === 'function'; },
385
386
  action: this.refreshHandler,
386
387
  }, {
387
388
  separator:true,
389
+ visible: () => { return this.showNewFile || this.showNewFolder; },
388
390
  }, {
389
391
  label: this.tr('filemanager.toolbar.newFile'),
390
392
  icon:'fa-solid fa-file-circle-plus',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "4.1.3",
4
+ "version": "4.1.4",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",
package/utils.js CHANGED
@@ -357,6 +357,7 @@ const fallbackTranslations = {
357
357
  "uploadFolder": "Upload Folder",
358
358
  "uploadFile": "Upload File",
359
359
  "restartApp": "Restart App",
360
+ "refresh": "Refresh",
360
361
  "openTerminal": "Open Terminal",
361
362
  "openLogs": "Open Logs"
362
363
  },
@@ -11,7 +11,7 @@
11
11
  <div class="file-name">{{ entry ? entry.fileName : '' }}</div>
12
12
  </template>
13
13
  <template #right>
14
- <Button :icon="busySave ? null : 'fa-regular fa-floppy-disk'" success @click="onSave" :disabled="busySave || !isChanged" style="margin-right: 5px;"><Spinner v-show="busySave" style="stroke: white;"/> {{ tr('filemanager.textEditor.save') }}</Button>
14
+ <Button v-if="!readonly" :icon="busySave ? null : 'fa-regular fa-floppy-disk'" success @click="onSave" :disabled="busySave || !isChanged" style="margin-right: 5px;"><Spinner v-show="busySave" style="stroke: white;"/> {{ tr('filemanager.textEditor.save') }}</Button>
15
15
  <Button icon="fa-solid fa-xmark" @click="onClose">{{ tr('main.dialog.close') }}</Button>
16
16
  </template>
17
17
  </TopBar>
@@ -68,6 +68,10 @@ export default {
68
68
  tr: {
69
69
  type: Function,
70
70
  default(id) { console.warn('Missing tr for TextViewer'); return utils.translation(id); }
71
+ },
72
+ readonly: {
73
+ type: Boolean,
74
+ default: false
71
75
  }
72
76
  },
73
77
  components: {