ts-glitter 21.8.3 → 21.8.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.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/backend-manager/bg-dialog.js +342 -100
- package/lowcode/backend-manager/bg-dialog.ts +432 -145
- package/lowcode/backend-manager/bg-widget.js +4 -4
- package/lowcode/backend-manager/bg-widget.ts +5 -5
- package/lowcode/cms-plugin/shopping-discount-setting.js +148 -92
- package/lowcode/cms-plugin/shopping-discount-setting.ts +162 -111
- package/lowcode/cms-plugin/shopping-product-stock.js +58 -45
- package/lowcode/cms-plugin/shopping-product-stock.ts +66 -49
- package/lowcode/css/editor.css +8 -9
- package/lowcode/editor/basic-component.js +0 -10
- package/lowcode/editor/basic-component.ts +1 -11
- package/lowcode/glitter-base/route/article.js +50 -51
- package/lowcode/glitter-base/route/article.ts +102 -103
- package/lowcode/glitter-base/route/recommend.js +1 -0
- package/lowcode/glitter-base/route/recommend.ts +141 -123
- package/lowcode/glitterBundle/plugins/html-render.js +2 -0
- package/lowcode/glitterBundle/plugins/html-render.ts +1 -0
- package/lowcode/jspage/function-page/tool-setting.js +0 -1
- package/lowcode/jspage/function-page/tool-setting.ts +0 -1
- package/lowcode/jspage/main.js +6 -1
- package/lowcode/jspage/main.ts +6 -1
- package/lowcode/modules/image-library-clone.ts +2 -0
- package/lowcode/modules/image-library.js +118 -155
- package/lowcode/modules/image-library.ts +134 -197
- package/lowcode/official_view_component/official/component.js +1 -1
- package/lowcode/official_view_component/official/component.ts +1 -1
- package/lowcode/public-components/banner/first-banner.js +85 -50
- package/lowcode/public-components/banner/first-banner.ts +96 -59
- package/lowcode/public-components/layout-plugin/social-links-01.js +23 -44
- package/lowcode/public-components/layout-plugin/social-links-01.ts +23 -48
- package/package.json +1 -1
- package/src/api-public/controllers/article.js +11 -0
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/article.ts +13 -0
- package/src/api-public/controllers/recommend.js +1 -0
- package/src/api-public/controllers/recommend.js.map +1 -1
- package/src/api-public/controllers/recommend.ts +99 -89
- package/src/api-public/services/checkout-event.js +4 -3
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/checkout-event.ts +11 -7
- package/src/api-public/services/post.js +7 -17
- package/src/api-public/services/post.js.map +1 -1
- package/src/api-public/services/recommend.d.ts +1 -0
- package/src/api-public/services/recommend.js +12 -2
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/recommend.ts +375 -354
- package/src/api-public/services/shopping.d.ts +1 -0
- package/src/api-public/services/shopping.js +4 -2
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +7 -2
|
@@ -77,7 +77,6 @@ export class imageLibrary {
|
|
|
77
77
|
selectBarID: gvc.glitter.getUUID(),
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
|
|
81
80
|
if (cf.key == 'folderEdit') {
|
|
82
81
|
vm.tag = cf.tag;
|
|
83
82
|
vm.type = 'folderEdit';
|
|
@@ -118,8 +117,23 @@ export class imageLibrary {
|
|
|
118
117
|
function getPublicConfig(callback: () => void) {
|
|
119
118
|
ApiUser.getPublicConfig('image-manager', 'manager').then((data: any) => {
|
|
120
119
|
if (data.response.value) {
|
|
121
|
-
|
|
120
|
+
const tagDiv = window.parent.document.querySelector('.tag-title');
|
|
122
121
|
|
|
122
|
+
vm.link = data.response.value;
|
|
123
|
+
if (tagDiv) {
|
|
124
|
+
const tag = tagDiv.getAttribute('data-tag');
|
|
125
|
+
if (tag) {
|
|
126
|
+
console.log(
|
|
127
|
+
'vm.link.filter(item => item.tag.includes(tag)) -- ',
|
|
128
|
+
vm.link.filter(item => item.tag.includes(tag))
|
|
129
|
+
);
|
|
130
|
+
vm.link
|
|
131
|
+
.filter(item => item.tag.includes(tag))
|
|
132
|
+
.forEach(item => {
|
|
133
|
+
item.selected = true;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
123
137
|
function loop(array: FileItem[]) {
|
|
124
138
|
array.map(dd => {
|
|
125
139
|
if (dd.type === 'folder') {
|
|
@@ -315,7 +329,7 @@ export class imageLibrary {
|
|
|
315
329
|
});
|
|
316
330
|
}
|
|
317
331
|
(fileItem as any).selected = !defaultSelect;
|
|
318
|
-
gvc.notifyDataChange(
|
|
332
|
+
gvc.notifyDataChange([viewID, ids.selectBarID]);
|
|
319
333
|
event.stopPropagation();
|
|
320
334
|
})}"
|
|
321
335
|
${!gvc.glitter.isTouchDevice()
|
|
@@ -491,6 +505,7 @@ export class imageLibrary {
|
|
|
491
505
|
}
|
|
492
506
|
|
|
493
507
|
getPublicConfig(() => {
|
|
508
|
+
const tagDiv = document.querySelector('.tag-title');
|
|
494
509
|
gvc.notifyDataChange(vm.id);
|
|
495
510
|
});
|
|
496
511
|
|
|
@@ -510,6 +525,7 @@ export class imageLibrary {
|
|
|
510
525
|
onclick="${gvc.event(() => {
|
|
511
526
|
closeFolderView();
|
|
512
527
|
vm.type = 'file';
|
|
528
|
+
cf.key = 'file';
|
|
513
529
|
gvc.notifyDataChange(vm.id);
|
|
514
530
|
})}"
|
|
515
531
|
>
|
|
@@ -572,83 +588,44 @@ export class imageLibrary {
|
|
|
572
588
|
})
|
|
573
589
|
.join('');
|
|
574
590
|
}
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
bind: ids.selectBarID,
|
|
579
|
-
view: () => {
|
|
580
|
-
return html`
|
|
581
|
-
<div
|
|
582
|
-
class="${selectCount ? `` : `d-none`} ${gClass('select-bar-text')}"
|
|
583
|
-
>
|
|
584
|
-
已選取${selectCount}項
|
|
585
|
-
</div>
|
|
586
|
-
<div class="ms-auto ${gClass('search-raw')}">上傳時間舊>新</div>
|
|
587
|
-
`;
|
|
588
|
-
},
|
|
589
|
-
divCreate: {
|
|
590
|
-
class: `w-100 ${gClass('select-bar')} `,
|
|
591
|
-
},
|
|
591
|
+
function pushFolder(folder: FileItem, imageArray: FileItem[]) {
|
|
592
|
+
imageArray.forEach(image => {
|
|
593
|
+
image.selected = false;
|
|
592
594
|
});
|
|
595
|
+
folder.data.push(
|
|
596
|
+
...imageArray.filter(
|
|
597
|
+
image => !folder.data.some((existingImage: any) => existingImage.id === image.id)
|
|
598
|
+
)
|
|
599
|
+
);
|
|
600
|
+
return folder.data;
|
|
593
601
|
}
|
|
602
|
+
function pushDataToFolder(selectData: FileItem[]) {
|
|
603
|
+
selectData.map(data => {
|
|
604
|
+
let matchingElement = vm.link.find(item2 => item2.id === data.id);
|
|
605
|
+
if (matchingElement) {
|
|
606
|
+
if (!matchingElement.tag) {
|
|
607
|
+
matchingElement.tag = [];
|
|
608
|
+
}
|
|
594
609
|
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
// `<div class="d-flex flex-column" style="border-radius: 10px 10px 0px 0px;background: #F2F2F2;">${vm.tag}</div>`,
|
|
604
|
-
// {
|
|
605
|
-
// key: 'folderEdit',
|
|
606
|
-
// mul: true,
|
|
607
|
-
// tag: vm.tag,
|
|
608
|
-
// }
|
|
609
|
-
// );
|
|
610
|
-
// }
|
|
611
|
-
// 空白資料夾新增的頁面
|
|
612
|
-
if (vm.type == 'folderADD') {
|
|
613
|
-
function pushFolder(folder: FileItem, imageArray: FileItem[]) {
|
|
614
|
-
imageArray.forEach(image => {
|
|
615
|
-
image.selected = false;
|
|
616
|
-
});
|
|
617
|
-
return folder.data.push(...imageArray);
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
vm.newFolder = {
|
|
621
|
-
selected: false,
|
|
622
|
-
title: '',
|
|
623
|
-
data: [],
|
|
624
|
-
items: [],
|
|
625
|
-
type: 'folder',
|
|
626
|
-
tag: [],
|
|
627
|
-
id: gvc.glitter.getUUID(),
|
|
628
|
-
};
|
|
610
|
+
if (!matchingElement.tag.includes(vm.tag as string)) {
|
|
611
|
+
matchingElement!.tag.push(vm.tag as string);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
(data as any).selected = false;
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
function drawAlbumInsertImage(callback: (selectData: FileItem[]) => void) {
|
|
629
618
|
return html`
|
|
630
|
-
<div class="d-flex flex-column ${gClass('new-album-title-bar')}">
|
|
631
|
-
相簿名稱
|
|
632
|
-
<input
|
|
633
|
-
class="w-100"
|
|
634
|
-
value="${vm.tag ?? ''}"
|
|
635
|
-
placeholder="請輸入相簿名稱"
|
|
636
|
-
onchange="${gvc.event(e => {
|
|
637
|
-
vm.tag = e.value;
|
|
638
|
-
})}"
|
|
639
|
-
/>
|
|
640
|
-
</div>
|
|
641
619
|
<div class="w-100 ${gClass('new-album-add-block')}">
|
|
642
620
|
<div
|
|
643
621
|
class="btn1"
|
|
644
622
|
onclick="${gvc.event(() => {
|
|
645
|
-
|
|
623
|
+
that.selectImageLibrary(
|
|
646
624
|
gvc,
|
|
647
625
|
selectData => {
|
|
648
|
-
|
|
649
|
-
gvc.notifyDataChange('folderItemGroup');
|
|
626
|
+
callback(selectData);
|
|
650
627
|
},
|
|
651
|
-
`<div class="d-flex flex-column" style="border-radius: 10px 10px
|
|
628
|
+
`<div class="d-flex flex-column tag-title" data-tag="${vm.tag}" style="border-radius: 10px 10px 0 0;background: #F2F2F2;">${vm.tag}</div>`,
|
|
652
629
|
{
|
|
653
630
|
key: 'album',
|
|
654
631
|
mul: true,
|
|
@@ -664,9 +641,10 @@ export class imageLibrary {
|
|
|
664
641
|
cf.plus(
|
|
665
642
|
gvc,
|
|
666
643
|
fileArray => {
|
|
667
|
-
|
|
644
|
+
vm.link.push(...fileArray);
|
|
645
|
+
callback(fileArray);
|
|
668
646
|
save(() => {
|
|
669
|
-
gvc.notifyDataChange(
|
|
647
|
+
gvc.notifyDataChange(vm.id);
|
|
670
648
|
});
|
|
671
649
|
},
|
|
672
650
|
'file'
|
|
@@ -676,6 +654,48 @@ export class imageLibrary {
|
|
|
676
654
|
上傳新圖片
|
|
677
655
|
</div>
|
|
678
656
|
</div>
|
|
657
|
+
`;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
function drawSelectBar(data: FileItem[]) {
|
|
661
|
+
return gvc.bindView({
|
|
662
|
+
bind: ids.selectBarID,
|
|
663
|
+
view: () => {
|
|
664
|
+
const selectCount = getSelectCount(data);
|
|
665
|
+
return html`
|
|
666
|
+
<div class="${selectCount ? `` : `d-none`} ${gClass('select-bar-text')}">
|
|
667
|
+
已選取${selectCount}項
|
|
668
|
+
</div>
|
|
669
|
+
<div class="ms-auto ${gClass('search-raw')}">上傳時間舊>新</div>
|
|
670
|
+
`;
|
|
671
|
+
},
|
|
672
|
+
divCreate: {
|
|
673
|
+
class: `w-100 ${gClass('select-bar')} `,
|
|
674
|
+
},
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
// 空白資料夾新增的頁面
|
|
678
|
+
if (vm.type == 'folderADD') {
|
|
679
|
+
const copyLink = structuredClone(vm.link);
|
|
680
|
+
return html`
|
|
681
|
+
<div class="d-flex flex-column ${gClass('new-album-title-bar')}">
|
|
682
|
+
相簿名稱
|
|
683
|
+
<input
|
|
684
|
+
class="w-100"
|
|
685
|
+
value="${vm.tag ?? ''}"
|
|
686
|
+
placeholder="請輸入相簿名稱"
|
|
687
|
+
onchange="${gvc.event(e => {
|
|
688
|
+
vm.tag = e.value;
|
|
689
|
+
})}"
|
|
690
|
+
/>
|
|
691
|
+
</div>
|
|
692
|
+
${drawAlbumInsertImage((selectData: FileItem[]) => {
|
|
693
|
+
pushFolder(vm.newFolder, selectData);
|
|
694
|
+
// vm.newFolder.data = [];
|
|
695
|
+
vm.link.push(vm.newFolder);
|
|
696
|
+
|
|
697
|
+
gvc.notifyDataChange('folderItemGroup');
|
|
698
|
+
})}
|
|
679
699
|
${gvc.bindView({
|
|
680
700
|
bind: `folderItemGroup`,
|
|
681
701
|
view: () => {
|
|
@@ -713,7 +733,7 @@ export class imageLibrary {
|
|
|
713
733
|
options: FilterOptions.imageLibraryOrderBy,
|
|
714
734
|
})}
|
|
715
735
|
</div>
|
|
716
|
-
${drawSelectBar(
|
|
736
|
+
${drawSelectBar(group)}
|
|
717
737
|
${gvc.bindView({
|
|
718
738
|
bind: `folderItemGroup`,
|
|
719
739
|
view: () => {
|
|
@@ -741,119 +761,14 @@ export class imageLibrary {
|
|
|
741
761
|
})}"
|
|
742
762
|
/>
|
|
743
763
|
</div>
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
vm.query || '',
|
|
751
|
-
'搜尋圖片'
|
|
752
|
-
)}
|
|
753
|
-
${BgWidget.updownFilter({
|
|
754
|
-
gvc,
|
|
755
|
-
callback: (value: any) => {
|
|
756
|
-
vm.orderString = value;
|
|
757
|
-
gvc.notifyDataChange(vm.id);
|
|
758
|
-
},
|
|
759
|
-
default: vm.orderString || 'default',
|
|
760
|
-
options: FilterOptions.imageLibraryOrderBy,
|
|
761
|
-
})}
|
|
762
|
-
</div>
|
|
764
|
+
${drawAlbumInsertImage((selectData: FileItem[]) => {
|
|
765
|
+
pushDataToFolder(selectData);
|
|
766
|
+
save(() => {
|
|
767
|
+
gvc.notifyDataChange('folderItemGroup');
|
|
768
|
+
});
|
|
769
|
+
})}
|
|
763
770
|
<div class="d-flex w-100 justify-content-end" style="gap:12px;margin-top: 18px;">
|
|
764
|
-
${drawSelectBar(
|
|
765
|
-
|
|
766
|
-
${BgWidget.grayButton(
|
|
767
|
-
'新增圖片',
|
|
768
|
-
gvc.event(() => {
|
|
769
|
-
const thatGVC = gvc;
|
|
770
|
-
gvc.glitter.innerDialog((gvc: GVC) => {
|
|
771
|
-
return html`
|
|
772
|
-
<div style="width: 445px;height: 255px;border-radius: 10px;background: #FFF;">
|
|
773
|
-
<div
|
|
774
|
-
class="d-flex"
|
|
775
|
-
style="color:#393939;display: flex;padding: 12px 20px;align-items: center;gap: 10px;"
|
|
776
|
-
>
|
|
777
|
-
新增圖片
|
|
778
|
-
<span
|
|
779
|
-
class="d-flex align-items-center justify-content-center"
|
|
780
|
-
style="margin-left: auto;cursor: pointer;"
|
|
781
|
-
onclick="${gvc.event(() => {
|
|
782
|
-
gvc.glitter.closeDiaLog('add');
|
|
783
|
-
})}"
|
|
784
|
-
>
|
|
785
|
-
<svg
|
|
786
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
787
|
-
width="14"
|
|
788
|
-
height="14"
|
|
789
|
-
viewBox="0 0 14 14"
|
|
790
|
-
fill="none"
|
|
791
|
-
>
|
|
792
|
-
<path d="M1 1L13 13" stroke="#393939" stroke-linecap="round" />
|
|
793
|
-
<path d="M13 1L1 13" stroke="#393939" stroke-linecap="round" />
|
|
794
|
-
</svg>
|
|
795
|
-
</span>
|
|
796
|
-
</div>
|
|
797
|
-
<div class="d-flex justify-content-center" style="padding-top:61px;gap:14px;">
|
|
798
|
-
<div
|
|
799
|
-
style="padding: 10px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.10);cursor: pointer;"
|
|
800
|
-
onclick="${gvc.event(() => {
|
|
801
|
-
this.selectImageLibrary(
|
|
802
|
-
gvc,
|
|
803
|
-
selectData => {
|
|
804
|
-
selectData.map(data => {
|
|
805
|
-
let matchingElement = vm.link.find(item2 => item2.id === data.id);
|
|
806
|
-
if (matchingElement) {
|
|
807
|
-
if (!matchingElement.tag) {
|
|
808
|
-
matchingElement.tag = [];
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
if (!matchingElement.tag.includes(vm.tag as string)) {
|
|
812
|
-
matchingElement!.tag.push(vm.tag as string);
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
(data as any).selected = false;
|
|
816
|
-
});
|
|
817
|
-
|
|
818
|
-
gvc.glitter.closeDiaLog('add');
|
|
819
|
-
thatGVC.notifyDataChange(vm.id);
|
|
820
|
-
},
|
|
821
|
-
`<div class="d-flex flex-column" style="border-radius: 10px 10px 0px 0px;background: #F2F2F2;">${vm.tag}</div>`,
|
|
822
|
-
{
|
|
823
|
-
key: 'album',
|
|
824
|
-
mul: true,
|
|
825
|
-
}
|
|
826
|
-
);
|
|
827
|
-
})}"
|
|
828
|
-
>
|
|
829
|
-
從圖庫中選擇
|
|
830
|
-
</div>
|
|
831
|
-
<div
|
|
832
|
-
style="padding: 10px 18px;border-radius: 10px;border: 1px solid #DDD;background: #FFF;box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.10);cursor: pointer;"
|
|
833
|
-
onclick="${gvc.event(() => {
|
|
834
|
-
cf.plus(
|
|
835
|
-
gvc,
|
|
836
|
-
fileArray => {
|
|
837
|
-
fileArray.forEach(item => {
|
|
838
|
-
item.tag = [];
|
|
839
|
-
item.tag.push(vm.tag as string);
|
|
840
|
-
vm.link.push(item);
|
|
841
|
-
});
|
|
842
|
-
gvc.glitter.closeDiaLog('add');
|
|
843
|
-
thatGVC.notifyDataChange(vm.id);
|
|
844
|
-
},
|
|
845
|
-
'file'
|
|
846
|
-
);
|
|
847
|
-
})}"
|
|
848
|
-
>
|
|
849
|
-
上傳新圖片
|
|
850
|
-
</div>
|
|
851
|
-
</div>
|
|
852
|
-
</div>
|
|
853
|
-
`;
|
|
854
|
-
}, 'add');
|
|
855
|
-
})
|
|
856
|
-
)}
|
|
771
|
+
${drawSelectBar(vm.link)}
|
|
857
772
|
</div>
|
|
858
773
|
<div>
|
|
859
774
|
${gvc.bindView({
|
|
@@ -914,19 +829,19 @@ export class imageLibrary {
|
|
|
914
829
|
margin-top: 18px;
|
|
915
830
|
margin-bottom: 8px;
|
|
916
831
|
}
|
|
917
|
-
.${ids.classPrefix}-select-bar-text{
|
|
832
|
+
.${ids.classPrefix}-select-bar-text {
|
|
918
833
|
flex: 1 1 0;
|
|
919
834
|
color: #393939;
|
|
920
835
|
font-size: 14px;
|
|
921
836
|
font-weight: 700;
|
|
922
|
-
word-wrap: break-word
|
|
837
|
+
word-wrap: break-word;
|
|
923
838
|
}
|
|
924
839
|
|
|
925
840
|
.${ids.classPrefix}-new-album-title-bar {
|
|
926
841
|
font-size: 16px;
|
|
927
842
|
font-style: normal;
|
|
928
843
|
font-weight: 400;
|
|
929
|
-
gap:
|
|
844
|
+
gap: 12px;
|
|
930
845
|
}
|
|
931
846
|
|
|
932
847
|
.${ids.classPrefix}-new-album-title-bar input {
|
|
@@ -937,7 +852,7 @@ export class imageLibrary {
|
|
|
937
852
|
}
|
|
938
853
|
|
|
939
854
|
.${ids.classPrefix}-new-album-add-block {
|
|
940
|
-
margin-top:
|
|
855
|
+
margin-top: 12px;
|
|
941
856
|
padding: 39px 0;
|
|
942
857
|
display: flex;
|
|
943
858
|
justify-content: center;
|
|
@@ -945,7 +860,7 @@ export class imageLibrary {
|
|
|
945
860
|
border-radius: 10px;
|
|
946
861
|
border: 1px solid #ddd;
|
|
947
862
|
background: #fff;
|
|
948
|
-
gap:
|
|
863
|
+
gap: 12px;
|
|
949
864
|
}
|
|
950
865
|
|
|
951
866
|
.${ids.classPrefix}-new-album-add-block .btn1 {
|
|
@@ -983,7 +898,7 @@ export class imageLibrary {
|
|
|
983
898
|
class="w-100 d-inline-flex flex-column justify-content-start align-items-start ${gClass('content')}"
|
|
984
899
|
>
|
|
985
900
|
<div class="fixed-top-section">
|
|
986
|
-
<div class=" ${cf.key
|
|
901
|
+
<div class=" ${cf.key != 'album' ? `d-flex` : `d-none`}" style="gap:14px;">${pageBTN()}</div>
|
|
987
902
|
<div class="d-flex w-100" style="gap:14px;">
|
|
988
903
|
${BgWidget.searchFilter(
|
|
989
904
|
gvc.event(e => {
|
|
@@ -1003,9 +918,9 @@ export class imageLibrary {
|
|
|
1003
918
|
options: FilterOptions.imageLibraryOrderBy,
|
|
1004
919
|
})}
|
|
1005
920
|
</div>
|
|
921
|
+
${drawSelectBar(vm.link)}
|
|
1006
922
|
</div>
|
|
1007
923
|
<div class="scrollable-bottom-section d-flex flex-column">
|
|
1008
|
-
${drawSelectBar(getSelectCount(vm.link))}
|
|
1009
924
|
<div
|
|
1010
925
|
style="align-self: stretch; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: flex"
|
|
1011
926
|
>
|
|
@@ -1066,6 +981,15 @@ export class imageLibrary {
|
|
|
1066
981
|
} else {
|
|
1067
982
|
vm.tag = '';
|
|
1068
983
|
vm.type = 'folderADD';
|
|
984
|
+
vm.newFolder = {
|
|
985
|
+
selected: false,
|
|
986
|
+
title: '',
|
|
987
|
+
data: [],
|
|
988
|
+
items: [],
|
|
989
|
+
type: 'folder',
|
|
990
|
+
tag: [],
|
|
991
|
+
id: gvc.glitter.getUUID(),
|
|
992
|
+
};
|
|
1069
993
|
gvc.notifyDataChange(vm.id);
|
|
1070
994
|
}
|
|
1071
995
|
})}"
|
|
@@ -1077,9 +1001,9 @@ export class imageLibrary {
|
|
|
1077
1001
|
}
|
|
1078
1002
|
return html`
|
|
1079
1003
|
<div
|
|
1080
|
-
class="w-100 ${
|
|
1081
|
-
? `d-
|
|
1082
|
-
: `d-
|
|
1004
|
+
class="w-100 ${vm.type == 'file' || vm.type == 'folder'
|
|
1005
|
+
? `d-flex`
|
|
1006
|
+
: `d-none`} align-items-center justify-content-center"
|
|
1083
1007
|
style="padding: 39px 0;border-radius: 10px;border: 1px solid #DDD;background: #FFF;"
|
|
1084
1008
|
>
|
|
1085
1009
|
<div
|
|
@@ -1099,6 +1023,15 @@ export class imageLibrary {
|
|
|
1099
1023
|
} else {
|
|
1100
1024
|
vm.tag = '';
|
|
1101
1025
|
vm.type = 'folderADD';
|
|
1026
|
+
vm.newFolder = {
|
|
1027
|
+
selected: false,
|
|
1028
|
+
title: '',
|
|
1029
|
+
data: [],
|
|
1030
|
+
items: [],
|
|
1031
|
+
type: 'folder',
|
|
1032
|
+
tag: [],
|
|
1033
|
+
id: gvc.glitter.getUUID(),
|
|
1034
|
+
};
|
|
1102
1035
|
gvc.notifyDataChange(vm.id);
|
|
1103
1036
|
}
|
|
1104
1037
|
})}"
|
|
@@ -1233,6 +1166,7 @@ export class imageLibrary {
|
|
|
1233
1166
|
type: 'cancel',
|
|
1234
1167
|
label: cancelLabel,
|
|
1235
1168
|
onClick: () => {
|
|
1169
|
+
cf.key = 'file';
|
|
1236
1170
|
if (cf.cancelEvent) cf.cancelEvent();
|
|
1237
1171
|
if (vm.type === 'folderView' || vm.type === 'folderADD') {
|
|
1238
1172
|
closeFolderView();
|
|
@@ -1242,7 +1176,7 @@ export class imageLibrary {
|
|
|
1242
1176
|
closeFolderView();
|
|
1243
1177
|
vm.type = 'folderView';
|
|
1244
1178
|
gvc.notifyDataChange(vm.id);
|
|
1245
|
-
}else {
|
|
1179
|
+
} else {
|
|
1246
1180
|
gvc.closeDialog();
|
|
1247
1181
|
}
|
|
1248
1182
|
},
|
|
@@ -1252,7 +1186,7 @@ export class imageLibrary {
|
|
|
1252
1186
|
label: '編輯',
|
|
1253
1187
|
onClick: () => {
|
|
1254
1188
|
vm.type = 'folderEdit';
|
|
1255
|
-
cf.key =
|
|
1189
|
+
cf.key = 'album';
|
|
1256
1190
|
gvc.notifyDataChange(vm.id);
|
|
1257
1191
|
},
|
|
1258
1192
|
},
|
|
@@ -1670,7 +1604,10 @@ export class imageLibrary {
|
|
|
1670
1604
|
const dialog = new ShareDialog(gvc.glitter);
|
|
1671
1605
|
|
|
1672
1606
|
function deleteImage() {
|
|
1673
|
-
const text =
|
|
1607
|
+
const text =
|
|
1608
|
+
item.type == 'folder'
|
|
1609
|
+
? `此操作不可復原。確定要刪除相簿${item.title}嗎?`
|
|
1610
|
+
: '刪除此圖片後,所有使用它的頁面與商品將無法顯示。<br>是否確定?';
|
|
1674
1611
|
dialog.checkYesOrNotWithCustomWidth({
|
|
1675
1612
|
width: '432',
|
|
1676
1613
|
text: text,
|
|
@@ -1178,7 +1178,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter, editM
|
|
|
1178
1178
|
</div>`,
|
|
1179
1179
|
` <div class="mx-n3" style="background: #DDD;height: 1px;"></div>`,
|
|
1180
1180
|
].join(`<div style="height:18px;"></div>`);
|
|
1181
|
-
if (app_editor ||
|
|
1181
|
+
if (app_editor || glitter.share.editorViewModel.selectItem.is_customer_header) {
|
|
1182
1182
|
global_setting_view = ``;
|
|
1183
1183
|
}
|
|
1184
1184
|
if (vm.page === 'editor') {
|
|
@@ -1355,7 +1355,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
1355
1355
|
</div>`,
|
|
1356
1356
|
` <div class="mx-n3" style="background: #DDD;height: 1px;"></div>`,
|
|
1357
1357
|
].join(`<div style="height:18px;"></div>`);
|
|
1358
|
-
if (app_editor ||
|
|
1358
|
+
if (app_editor || glitter.share.editorViewModel.selectItem.is_customer_header) {
|
|
1359
1359
|
global_setting_view = ``;
|
|
1360
1360
|
}
|
|
1361
1361
|
if (vm.page === 'editor') {
|