@mixd-id/web-scaffold 0.1.240411005 → 0.1.240411007
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="flex-1 flex flex-col gap-3">
|
|
4
4
|
<div class="flex flex-row gap-4 justify-end items-center p-3 pr-6">
|
|
5
5
|
<slot name="moreButtons"></slot>
|
|
6
|
-
<a v-if="
|
|
6
|
+
<a v-if="canDownload" :href="imageUrl" target="_blank" download>
|
|
7
7
|
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" class="fill-text" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M480 352h-133.5l-45.25 45.25C289.2 409.3 273.1 416 256 416s-33.16-6.656-45.25-18.75L165.5 352H32c-17.67 0-32 14.33-32 32v96c0 17.67 14.33 32 32 32h448c17.67 0 32-14.33 32-32v-96C512 366.3 497.7 352 480 352zM432 456c-13.2 0-24-10.8-24-24c0-13.2 10.8-24 24-24s24 10.8 24 24C456 445.2 445.2 456 432 456zM233.4 374.6C239.6 380.9 247.8 384 256 384s16.38-3.125 22.62-9.375l128-128c12.49-12.5 12.49-32.75 0-45.25c-12.5-12.5-32.76-12.5-45.25 0L288 274.8V32c0-17.67-14.33-32-32-32C238.3 0 224 14.33 224 32v242.8L150.6 201.4c-12.49-12.5-32.75-12.5-45.25 0c-12.49 12.5-12.49 32.75 0 45.25L233.4 374.6z"/></svg>
|
|
8
8
|
</a>
|
|
9
9
|
<button @click="close">
|
|
@@ -32,8 +32,17 @@ export default{
|
|
|
32
32
|
|
|
33
33
|
},
|
|
34
34
|
|
|
35
|
+
computed: {
|
|
36
|
+
|
|
37
|
+
canDownload(){
|
|
38
|
+
return this.download || this.downloadable
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
},
|
|
42
|
+
|
|
35
43
|
data(){
|
|
36
44
|
return {
|
|
45
|
+
downloadable: false,
|
|
37
46
|
isOpen: false,
|
|
38
47
|
imageUrl: null
|
|
39
48
|
}
|
|
@@ -41,9 +50,10 @@ export default{
|
|
|
41
50
|
|
|
42
51
|
methods: {
|
|
43
52
|
|
|
44
|
-
open(imageUrl){
|
|
53
|
+
open(imageUrl, opt = {}){
|
|
45
54
|
this.imageUrl = imageUrl
|
|
46
55
|
this.isOpen = true
|
|
56
|
+
this.downloadable = opt.download || this.downloadable
|
|
47
57
|
window.addEventListener('keyup', this.onKeyUp)
|
|
48
58
|
},
|
|
49
59
|
|
package/src/components/List.vue
CHANGED
|
@@ -427,10 +427,12 @@ export default{
|
|
|
427
427
|
if(this.presetKey){
|
|
428
428
|
return this.socket.send(this.presetSrc, { key:this.presetKey })
|
|
429
429
|
.then(config => {
|
|
430
|
-
|
|
430
|
+
if(config){
|
|
431
|
+
Object.assign(this.cConfig, config)
|
|
431
432
|
|
|
432
|
-
|
|
433
|
-
|
|
433
|
+
if(this.$route.query?.search)
|
|
434
|
+
this.preset.search = this.$route.query.search
|
|
435
|
+
}
|
|
434
436
|
})
|
|
435
437
|
}
|
|
436
438
|
return new Promise(resolve => resolve())
|
|
@@ -1675,10 +1675,12 @@ export default {
|
|
|
1675
1675
|
async loadPreset(){
|
|
1676
1676
|
return this.socket.send(this.presetSrc, { key:this.presetKey })
|
|
1677
1677
|
.then(async (config) => {
|
|
1678
|
-
|
|
1678
|
+
if(config){
|
|
1679
|
+
Object.assign(this.config, config ?? {})
|
|
1679
1680
|
|
|
1680
|
-
|
|
1681
|
-
|
|
1681
|
+
/*if(this.$route.query?.search)
|
|
1682
|
+
this.preset.search = this.$route.query.search*/
|
|
1683
|
+
}
|
|
1682
1684
|
})
|
|
1683
1685
|
.catch(() => {})
|
|
1684
1686
|
},
|
|
@@ -1453,10 +1453,12 @@ export default{
|
|
|
1453
1453
|
if(this.presetKey){
|
|
1454
1454
|
return this.socket.send(this.presetSrc, { key:this.presetKey })
|
|
1455
1455
|
.then(config => {
|
|
1456
|
-
|
|
1456
|
+
if(config){
|
|
1457
|
+
Object.assign(this.config.params, config.params)
|
|
1457
1458
|
|
|
1458
|
-
|
|
1459
|
-
|
|
1459
|
+
if(this.$route.query?.search)
|
|
1460
|
+
this.preset.search = this.$route.query.search
|
|
1461
|
+
}
|
|
1460
1462
|
})
|
|
1461
1463
|
}
|
|
1462
1464
|
return new Promise(resolve => resolve())
|