@cloudron/pankow 4.0.1 → 4.1.1
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.
- package/components/DateTimeInput.vue +5 -1
- package/components/DirectoryView.vue +10 -0
- package/package.json +1 -1
- package/utils.js +7 -7
|
@@ -6,12 +6,16 @@ const props = defineProps({
|
|
|
6
6
|
type: Boolean,
|
|
7
7
|
default: false
|
|
8
8
|
},
|
|
9
|
+
dateOnly: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false
|
|
12
|
+
},
|
|
9
13
|
});
|
|
10
14
|
|
|
11
15
|
</script>
|
|
12
16
|
|
|
13
17
|
<template>
|
|
14
|
-
<input class="pankow-text-input" type="datetime-local" :readonly="readonly" v-model="model"/>
|
|
18
|
+
<input class="pankow-text-input" :type="dateOnly ? 'date' : 'datetime-local'" :readonly="readonly" v-model="model"/>
|
|
15
19
|
</template>
|
|
16
20
|
|
|
17
21
|
<style>
|
|
@@ -251,6 +251,10 @@ export default {
|
|
|
251
251
|
extractHandler: {
|
|
252
252
|
type: Function,
|
|
253
253
|
default() { console.warn('Missing extractHandler for DirectoryView'); }
|
|
254
|
+
},
|
|
255
|
+
refreshHandler: {
|
|
256
|
+
type: Function,
|
|
257
|
+
default() { console.warn('Missing refreshHandler for DirectoryView'); }
|
|
254
258
|
}
|
|
255
259
|
},
|
|
256
260
|
computed: {
|
|
@@ -325,6 +329,12 @@ export default {
|
|
|
325
329
|
}, {
|
|
326
330
|
separator:true,
|
|
327
331
|
visible: () => { return this.showNewFile || this.showNewFolder; },
|
|
332
|
+
}, {
|
|
333
|
+
label: this.tr('filemanager.toolbar.refresh'),
|
|
334
|
+
icon:'fa-solid fa-arrow-rotate-right',
|
|
335
|
+
action: this.refreshHandler,
|
|
336
|
+
}, {
|
|
337
|
+
separator:true,
|
|
328
338
|
}, {
|
|
329
339
|
label: this.tr('filemanager.toolbar.newFile'),
|
|
330
340
|
icon:'fa-solid fa-file-circle-plus',
|
package/package.json
CHANGED
package/utils.js
CHANGED
|
@@ -4,19 +4,19 @@ import { customRef } from 'vue';
|
|
|
4
4
|
|
|
5
5
|
// https://vuejs.org/api/reactivity-advanced.html#customref
|
|
6
6
|
function useDebouncedRef(value, delay = 300) {
|
|
7
|
-
let timeout
|
|
7
|
+
let timeout;
|
|
8
8
|
return customRef((track, trigger) => {
|
|
9
9
|
return {
|
|
10
10
|
get() {
|
|
11
|
-
track()
|
|
12
|
-
return value
|
|
11
|
+
track();
|
|
12
|
+
return value;
|
|
13
13
|
},
|
|
14
14
|
set(newValue) {
|
|
15
|
-
clearTimeout(timeout)
|
|
15
|
+
clearTimeout(timeout);
|
|
16
16
|
timeout = setTimeout(() => {
|
|
17
|
-
value = newValue
|
|
18
|
-
trigger()
|
|
19
|
-
}, delay)
|
|
17
|
+
value = newValue;
|
|
18
|
+
trigger();
|
|
19
|
+
}, delay);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
})
|