@mixd-id/web-scaffold 0.1.230406053 → 0.1.230406054
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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Modal :state="isOpen" width="400" height="400" :class="$style.previewModal">
|
|
3
|
-
<div class="flex-1">
|
|
3
|
+
<div class="flex-1 flex flex-col">
|
|
4
4
|
<div class="flex flex-row justify-end items-center p-3">
|
|
5
|
-
<a :href="imageUrl" download>
|
|
5
|
+
<a v-if="download" :href="imageUrl" download>
|
|
6
6
|
<svg xmlns="http://www.w3.org/2000/svg" width="42" height="42" viewBox="0 0 24 24" class="fill-text"><path class="primary" d="M15 15v-3a3 3 0 0 0-6 0v3H6a4 4 0 0 1-.99-7.88 5.5 5.5 0 0 1 10.86-.82A4.49 4.49 0 0 1 22 10.5a4.5 4.5 0 0 1-4.5 4.5H15z"/><path class="secondary" d="M11 18.59V12a1 1 0 0 1 2 0v6.59l1.3-1.3a1 1 0 0 1 1.4 1.42l-3 3a1 1 0 0 1-1.4 0l-3-3a1 1 0 0 1 1.4-1.42l1.3 1.3z"/></svg>
|
|
7
7
|
</a>
|
|
8
8
|
<button class="ml-3" @click="close">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</button>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="flex items-center justify-center">
|
|
13
|
-
<img :src="imageUrl" class="max-h-[
|
|
13
|
+
<img :src="imageUrl" class="max-h-[75vh]"/>
|
|
14
14
|
</div>
|
|
15
15
|
</div>
|
|
16
16
|
</Modal>
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
|
|
21
21
|
export default{
|
|
22
22
|
|
|
23
|
+
props: {
|
|
24
|
+
|
|
25
|
+
download: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
},
|
|
31
|
+
|
|
23
32
|
data(){
|
|
24
33
|
return {
|
|
25
34
|
isOpen: false,
|
|
@@ -68,4 +77,4 @@ export default{
|
|
|
68
77
|
max-height: unset !important;
|
|
69
78
|
}
|
|
70
79
|
|
|
71
|
-
</style>
|
|
80
|
+
</style>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div :class="$style.comp" v-if="configLoaded">
|
|
3
3
|
|
|
4
4
|
<slot v-if="$slots.head" name="head"></slot>
|
|
5
|
-
<div v-else class="flex flex-row items-center gap-4 px-6 md:px-0 py-4 md:py-0">
|
|
5
|
+
<div v-else class="flex flex-row items-center gap-4 px-6 md:px-0 py-4 md:py-0 bg-base-400 dark:bg-base-300 md:bg-transparent">
|
|
6
6
|
<div class="flex-1 flex flex-row gap-4">
|
|
7
7
|
<button type="button" ref="presetSelectorBtn"
|
|
8
8
|
class="flex-1 md:flex-none flex flex-row gap-1 items-center text-left md:ml-2"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</Textbox>
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
|
-
<div v-if="mediaPrefix === 'sm'" class="px-6 py-4 border-b-[1px] border-text-50">
|
|
63
|
+
<div v-if="mediaPrefix === 'sm'" class="px-6 py-4 border-b-[1px] border-text-50 bg-base-400 dark:bg-base-300">
|
|
64
64
|
<Textbox :placeholder="$t('Search...')" :clearable="true" @clear="clearSearch" v-model="preset.search"
|
|
65
65
|
@keyup.enter="load" :class="$style.searchBox">
|
|
66
66
|
<template #start>
|
|
@@ -72,7 +72,8 @@
|
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
74
|
<div class="flex-1 flex" v-if="mediaPrefix">
|
|
75
|
-
<VirtualTable v-if="mediaPrefix !== 'sm'" ref="table1" :columns="presetColumns" :items="items"
|
|
75
|
+
<VirtualTable v-if="mediaPrefix !== 'sm'" ref="table1" :columns="presetColumns" :items="items"
|
|
76
|
+
class="flex-1 bg-base-400 dark:bg-base-300"
|
|
76
77
|
@scroll-end="loadNext">
|
|
77
78
|
<template v-for="column in presetColumns" #[colOf(column.key)]="{}">
|
|
78
79
|
<div :class="getHeader(column)" @click="openColumnOptions(column.key, $event.target.closest('.' + $style.header))">
|
|
@@ -106,7 +107,7 @@
|
|
|
106
107
|
<slot :name="slot" :item="item" :index="index"></slot>
|
|
107
108
|
</template>
|
|
108
109
|
</VirtualTable>
|
|
109
|
-
<VirtualScroll v-else :items="items" class="flex-1" @scroll-end="loadNext">
|
|
110
|
+
<VirtualScroll v-else :items="items" class="flex-1 bg-base-400 dark:bg-base-300" @scroll-end="loadNext">
|
|
110
111
|
<template #item="{ item }">
|
|
111
112
|
<slot name="mobileItem" :item="item"></slot>
|
|
112
113
|
</template>
|
|
@@ -136,7 +137,7 @@
|
|
|
136
137
|
</div>
|
|
137
138
|
<div v-if="presetCurrentFilters.length > 0">
|
|
138
139
|
<ListPage1Filter v-if="preset.filters" v-for="filter in presetCurrentFilters"
|
|
139
|
-
:filter="filter" :column="config.columns[filter.key]"
|
|
140
|
+
:filter="filter" :column="config.columns[config.columns.findIndex((_) => _.key === filter.key)]"
|
|
140
141
|
@remove="removeFilter(filter)" @change="load" />
|
|
141
142
|
</div>
|
|
142
143
|
<div v-else>
|
|
@@ -289,7 +290,10 @@ export default{
|
|
|
289
290
|
},
|
|
290
291
|
|
|
291
292
|
async loadConfig(){
|
|
292
|
-
|
|
293
|
+
if(!this.configStoreObj || 'reset' in ((this.$route ?? {}).query ?? {})){
|
|
294
|
+
this.configLoaded = true
|
|
295
|
+
return
|
|
296
|
+
}
|
|
293
297
|
|
|
294
298
|
switch(this.configStoreObj.type){
|
|
295
299
|
case 'socket':
|
|
@@ -568,6 +572,10 @@ export default{
|
|
|
568
572
|
@apply flex-1 flex flex-col md:gap-4;
|
|
569
573
|
}
|
|
570
574
|
|
|
575
|
+
.searchBox{
|
|
576
|
+
@apply !bg-base-300 dark:!bg-base-400;
|
|
577
|
+
}
|
|
578
|
+
|
|
571
579
|
.header{
|
|
572
580
|
@apply p-2 cursor-pointer border-b-[2px] border-transparent overflow-hidden;
|
|
573
581
|
}
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
<div class="flex flex-col" v-else-if="config.presetTab === 'filter'">
|
|
76
76
|
<div v-if="filterableColumns.length > 0">
|
|
77
77
|
<ListPage1Filter v-if="preset.filters" v-for="filter in preset.filters"
|
|
78
|
-
:filter="filter" :column="config.columns[filter.key]"
|
|
78
|
+
:filter="filter" :column="config.columns[config.columns.findIndex((_) => _.key === filter.key)]"
|
|
79
79
|
@remove="removeFilter(filter)" @change="$emit('change')"/>
|
|
80
80
|
<div class="py-8">
|
|
81
81
|
<Dropdown @change="addFilter" v-model="presetFilterSelector">
|