codeplay-common 4.8.1 → 4.8.2
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/files/take-screen-image.js +30 -11
- package/package.json +1 -1
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
//node take-screen-image.js --profiles vivo-store //only taking screenshot for vivo-store - Not only vivo, we can do this to all of our store images.
|
|
4
4
|
//node take-screen-image.js --vivo-existing //Used if we already took the screenshot and those vivo screenshots are not there then execute this to resize the screenshot for vivo store.
|
|
5
5
|
//node take-screen-image.js --oppo-existing //Used if we already took the screenshot and those oppo screenshots are not there then execute this to resize the screenshot for Oppo store.
|
|
6
|
+
//node take-screen-image.js --profiles iphone,iphone-duo,ipad //Capture current App Store sizes; iPhone-Duo uses the 2007x2853 inner display.
|
|
7
|
+
//Apple also accepts 1398x2034 for the Duo outer display. This profile captures the inner display only.
|
|
8
|
+
//New captures create iPhone-Duo folders automatically. Reframing existing files does not recapture responsive UI at the new viewport sizes.
|
|
6
9
|
|
|
7
10
|
|
|
8
11
|
/*
|
|
@@ -158,14 +161,28 @@ const deviceProfiles = [
|
|
|
158
161
|
},
|
|
159
162
|
{
|
|
160
163
|
name: 'iphone',
|
|
161
|
-
label: 'iPhone
|
|
164
|
+
label: 'iPhone Dynamic Island medium-display App Store viewport',
|
|
162
165
|
outputDirectory: 'iPhone',
|
|
163
166
|
frameType: 'iphone',
|
|
164
|
-
width:
|
|
165
|
-
height:
|
|
167
|
+
width: 402,
|
|
168
|
+
height: 874,
|
|
166
169
|
deviceScaleFactor: 3,
|
|
167
|
-
framedWidth:
|
|
168
|
-
framedHeight:
|
|
170
|
+
framedWidth: 1206,
|
|
171
|
+
framedHeight: 2622,
|
|
172
|
+
orientationSensitive: true,
|
|
173
|
+
mobile: true,
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'iphone-duo',
|
|
177
|
+
label: 'iPhone Duo inner-display App Store viewport (generic frame)',
|
|
178
|
+
outputDirectory: 'iPhone-Duo',
|
|
179
|
+
frameType: 'iphone',
|
|
180
|
+
showDynamicIsland: false,
|
|
181
|
+
width: 669,
|
|
182
|
+
height: 951,
|
|
183
|
+
deviceScaleFactor: 3,
|
|
184
|
+
framedWidth: 2007,
|
|
185
|
+
framedHeight: 2853,
|
|
169
186
|
orientationSensitive: true,
|
|
170
187
|
mobile: true,
|
|
171
188
|
},
|
|
@@ -195,12 +212,13 @@ const deviceProfiles = [
|
|
|
195
212
|
},
|
|
196
213
|
{
|
|
197
214
|
name: 'iphone-store',
|
|
198
|
-
label: 'iPhone App Store screenshot set',
|
|
215
|
+
label: 'iPhone Dynamic Island medium-display App Store screenshot set',
|
|
199
216
|
outputDirectory: 'iPhone-Store',
|
|
200
217
|
frameType: 'iphone',
|
|
201
|
-
width:
|
|
202
|
-
height:
|
|
218
|
+
width: 402,
|
|
219
|
+
height: 874,
|
|
203
220
|
deviceScaleFactor: 3,
|
|
221
|
+
orientationSensitive: true,
|
|
204
222
|
mobile: true,
|
|
205
223
|
screenshotOnly: true,
|
|
206
224
|
},
|
|
@@ -586,6 +604,7 @@ function printHelp() {
|
|
|
586
604
|
console.log('Usage:');
|
|
587
605
|
console.log(' node take-screen-image.js');
|
|
588
606
|
console.log(' node take-screen-image.js --profiles iphone,ipad');
|
|
607
|
+
console.log(' node take-screen-image.js --profiles iphone,iphone-duo,ipad');
|
|
589
608
|
console.log(' node take-screen-image.js --android-frame graphite --ios-frame titanium');
|
|
590
609
|
console.log(' node take-screen-image.js --prefix home --profiles android-phone,ipad');
|
|
591
610
|
console.log(' node take-screen-image.js --frame-existing');
|
|
@@ -2004,13 +2023,13 @@ function createStoreDeviceFrameHtml(
|
|
|
2004
2023
|
</html>`;
|
|
2005
2024
|
}
|
|
2006
2025
|
|
|
2007
|
-
function getPhoneStatusBar(platform, time, batteryPercentage = null) {
|
|
2026
|
+
function getPhoneStatusBar(platform, time, batteryPercentage = null, showDynamicIsland = true) {
|
|
2008
2027
|
const batteryLevel = Number.isInteger(batteryPercentage) ? batteryPercentage : 75;
|
|
2009
2028
|
|
|
2010
2029
|
if (platform === 'ios') {
|
|
2011
2030
|
return `<div class="phone-statusbar ios-statusbar">
|
|
2012
2031
|
<span class="status-time">${time}</span>
|
|
2013
|
-
<div class="dynamic-island"></div>
|
|
2032
|
+
${showDynamicIsland ? '<div class="dynamic-island"></div>' : ''}
|
|
2014
2033
|
<svg viewBox="0 0 90 28" aria-hidden="true">
|
|
2015
2034
|
<circle cx="5" cy="14" r="2" fill="currentColor" opacity="0.35"></circle><circle cx="13" cy="14" r="2" fill="currentColor" opacity="0.35"></circle>
|
|
2016
2035
|
<circle cx="21" cy="14" r="2" fill="currentColor" opacity="0.35"></circle><circle cx="29" cy="14" r="2" fill="currentColor" opacity="0.35"></circle>
|
|
@@ -2091,7 +2110,7 @@ function createDeviceFrameHtml(
|
|
|
2091
2110
|
const statusBarPlatform = profile.frameType === 'ipad' ? 'ipad' : phonePlatform;
|
|
2092
2111
|
const phoneStyle = phonePlatform && frameStyles[phonePlatform][selectedFrameStyles[phonePlatform]];
|
|
2093
2112
|
const phoneStatusBar = statusBarPlatform
|
|
2094
|
-
? getPhoneStatusBar(statusBarPlatform, displayTime, batteryPercentage)
|
|
2113
|
+
? getPhoneStatusBar(statusBarPlatform, displayTime, batteryPercentage, profile.showDynamicIsland !== false)
|
|
2095
2114
|
: '';
|
|
2096
2115
|
const phoneNavigation = phonePlatform === 'android'
|
|
2097
2116
|
? '<div class="android-navigation"><div class="gesture-pill"></div></div>'
|