@social-mail/social-mail-client 1.2.330 → 1.2.332
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/public/store/Store.pack.js +9 -11
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/public/store/Store.pack.min.js +3 -2
- package/dist/public/store/Store.pack.min.js.map +1 -1
- package/dist/public/store/StoreItemDetailView.d.ts +1 -1
- package/dist/public/store/StoreItemDetailView.d.ts.map +1 -1
- package/dist/public/store/StoreItemDetailView.js +9 -11
- package/dist/public/store/StoreItemDetailView.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/public/store/StoreItemDetailView.tsx +8 -12
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ import ToggleButtonBar from "@web-atoms/web-controls/dist/basic/ToggleButtonBar"
|
|
|
17
17
|
const url = (window as any).pageUrl as URL;
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
let {1: storeID = "4", 2: itemID = "
|
|
20
|
+
let {1: storeID = "4", 2: itemID = "23" } = /^\/store\/([^\/]+)\/([^\/]+)\//.exec(url?.pathname) ?? {} as any;
|
|
21
21
|
|
|
22
22
|
storeID = parseInt(storeID, 36);
|
|
23
23
|
itemID = parseInt(itemID, 36);
|
|
@@ -53,6 +53,7 @@ const css = styled.css `
|
|
|
53
53
|
display: flex;
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
overflow: auto;
|
|
56
|
+
max-height: 500px;
|
|
56
57
|
& > img {
|
|
57
58
|
cursor: pointer;
|
|
58
59
|
margin: 5px;
|
|
@@ -100,13 +101,11 @@ export default class StoreItemDetailView extends AtomControl {
|
|
|
100
101
|
this.runAfterInit(() => this.app.runAsync(() => this.init()));
|
|
101
102
|
}
|
|
102
103
|
|
|
103
|
-
getFiles(
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
files.push(... iterator.mediaFiles);
|
|
104
|
+
getFiles(item: IStoreItem, varient: IStoreItem, size: IStoreItem) {
|
|
105
|
+
const varientFiles = varient?.mediaFiles?.filter((x) => x.isPreview);
|
|
106
|
+
const files = varientFiles ?? item.mediaFiles.filter((x) => x.isPreview);
|
|
107
|
+
if (size?.mediaFiles) {
|
|
108
|
+
files.push(... size.mediaFiles.filter((x) => x.isPreview));
|
|
110
109
|
}
|
|
111
110
|
this.selectedFile = files[0];
|
|
112
111
|
return files;
|
|
@@ -120,9 +119,6 @@ export default class StoreItemDetailView extends AtomControl {
|
|
|
120
119
|
|
|
121
120
|
this.model = await this.getItem();
|
|
122
121
|
|
|
123
|
-
const images = this.model.mediaFiles.where((x) => x.isPreview);
|
|
124
|
-
this.selectedFile = images[0];
|
|
125
|
-
|
|
126
122
|
const offer = this.model.mediaFiles.find((x) => x.title === "offer.html");
|
|
127
123
|
const specifications = this.model.mediaFiles.find((x) => x.title === "specs.html");
|
|
128
124
|
|
|
@@ -139,7 +135,7 @@ export default class StoreItemDetailView extends AtomControl {
|
|
|
139
135
|
|
|
140
136
|
this.renderer = <div
|
|
141
137
|
class={css}
|
|
142
|
-
images={Bind.oneWay(() => this.getFiles(this.model, this.
|
|
138
|
+
images={Bind.oneWay(() => this.getFiles(this.model, this.selectedVarient, this.selectedSize))}>
|
|
143
139
|
<h2>{this.model.name}</h2>
|
|
144
140
|
|
|
145
141
|
<section class="photos">
|