@hostlink/nuxt-light 1.55.2 → 1.57.0
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/dist/module.json
CHANGED
|
@@ -3,7 +3,7 @@ import { useI18n } from "vue-i18n";
|
|
|
3
3
|
import { ref, watch, computed } from "vue";
|
|
4
4
|
import { useQuasar, format } from "quasar";
|
|
5
5
|
import { q, m, useLight } from "#imports";
|
|
6
|
-
import { getApiClient } from "@hostlink/light";
|
|
6
|
+
import { getApiClient, getGrantedRights } from "@hostlink/light";
|
|
7
7
|
const api = getApiClient();
|
|
8
8
|
import { getDrive, listDrives } from "@hostlink/light";
|
|
9
9
|
const { humanStorageSize } = format;
|
|
@@ -387,7 +387,7 @@ const reloadStorage = async () => {
|
|
|
387
387
|
label.value = null;
|
|
388
388
|
await loadItems();
|
|
389
389
|
};
|
|
390
|
-
const permission = await
|
|
390
|
+
const permission = await getGrantedRights([
|
|
391
391
|
"fs.folder.create",
|
|
392
392
|
"fs.folder.delete",
|
|
393
393
|
"fs.folder.rename",
|
|
@@ -33,6 +33,7 @@ export type LTableProps = QTableProps & {
|
|
|
33
33
|
rows?: Array<any>;
|
|
34
34
|
name?: string;
|
|
35
35
|
searchStyle?: string;
|
|
36
|
+
canExpandRow?: (row: any) => boolean;
|
|
36
37
|
};
|
|
37
38
|
export interface LTableRequest {
|
|
38
39
|
sort: string;
|
|
@@ -44,7 +45,8 @@ export interface LTableRequest {
|
|
|
44
45
|
};
|
|
45
46
|
data: {
|
|
46
47
|
__args: {
|
|
47
|
-
limit
|
|
48
|
+
limit?: number;
|
|
49
|
+
offset?: number;
|
|
48
50
|
};
|
|
49
51
|
[key: string]: any;
|
|
50
52
|
};
|
|
@@ -105,7 +105,8 @@ const props = defineProps({
|
|
|
105
105
|
addComponent: { type: Object, required: false },
|
|
106
106
|
addComponentProps: { type: null, required: false },
|
|
107
107
|
name: { type: String, required: false },
|
|
108
|
-
searchStyle: { type: String, required: false }
|
|
108
|
+
searchStyle: { type: String, required: false },
|
|
109
|
+
canExpandRow: { type: Function, required: false, default: () => true }
|
|
109
110
|
});
|
|
110
111
|
const isServerSide = props.rows == void 0;
|
|
111
112
|
const simpleRouteName = computed(() => {
|
|
@@ -552,7 +553,7 @@ const hasFilters = computed(() => {
|
|
|
552
553
|
</q-td>
|
|
553
554
|
<q-td v-if="hasRowExpand" auto-width>
|
|
554
555
|
<q-btn flat round size="sm" :icon="props.expand ? 'sym_o_expand_more' : 'sym_o_expand_less'"
|
|
555
|
-
@click="props.expand = !props.expand"></q-btn>
|
|
556
|
+
@click="props.expand = !props.expand" v-if="canExpandRow(props.row)"></q-btn>
|
|
556
557
|
</q-td>
|
|
557
558
|
|
|
558
559
|
<q-td v-if="hasActions" auto-width>
|
|
@@ -33,6 +33,7 @@ export type LTableProps = QTableProps & {
|
|
|
33
33
|
rows?: Array<any>;
|
|
34
34
|
name?: string;
|
|
35
35
|
searchStyle?: string;
|
|
36
|
+
canExpandRow?: (row: any) => boolean;
|
|
36
37
|
};
|
|
37
38
|
export interface LTableRequest {
|
|
38
39
|
sort: string;
|
|
@@ -44,7 +45,8 @@ export interface LTableRequest {
|
|
|
44
45
|
};
|
|
45
46
|
data: {
|
|
46
47
|
__args: {
|
|
47
|
-
limit
|
|
48
|
+
limit?: number;
|
|
49
|
+
offset?: number;
|
|
48
50
|
};
|
|
49
51
|
[key: string]: any;
|
|
50
52
|
};
|