Browse Source

Change new Resolutions xl+ and xxl. Remove xxl+

customisations
alemart 11 months ago
parent
commit
f6ec33d146
2 changed files with 7 additions and 11 deletions
  1. 4
    4
      docs/api/resolution.md
  2. 3
    7
      src/utils/resolution.ts

+ 4
- 4
docs/api/resolution.md View File

@@ -15,7 +15,7 @@ The table below shows examples of how resolution strings are converted to pixels
15 15
 | `"480p"` | `"lg"` | 854x480 | 768x480 | 640x480 | SD |
16 16
 | `"600p"` | `"lg+"` | 1066x600 | 960x600 | 800x600 | |
17 17
 | `"720p"` | `"xl"` | 1280x720 | 1152x720 | 960x720 | HD |
18
-| `"768p"` | `"xl+"` | 1366x768 | 1228x768 | 1024x768 | |
19
-| `"900p"` | `"xxl"` | 1600x900 | 1440x900 | 1200x900 | |
20
-| `"960p"` | `"xxl+"` | 1706x960 | 1536x960 | 1280x960 | |
21
-| `"1080p"` | | 1920x1080 | 1728x1080 | 1440x1080 | Full HD |
18
+| `"768p"` | | 1366x768 | 1228x768 | 1024x768 | |
19
+| `"900p"` | `"xl+"` | 1600x900 | 1440x900 | 1200x900 | |
20
+| `"960p"` | | 1706x960 | 1536x960 | 1280x960 | |
21
+| `"1080p"` | `"xxl"` | 1920x1080 | 1728x1080 | 1440x1080 | Full HD |

+ 3
- 7
src/utils/resolution.ts View File

@@ -29,7 +29,7 @@ type EvenDigit = '0' | '2' | '4' | '6' | '8';
29 29
 type PositiveDigit = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
30 30
 type OptionalDigit = Digit | '';
31 31
 type CustomResolution = `${PositiveDigit}${OptionalDigit}${Digit}${EvenDigit}p`;
32
-type ResolutionAlias = 'xs' | 'xs+' | 'sm' | 'sm+' | 'md' | 'md+' | 'lg' | 'lg+' | 'xl' | 'xl+' | 'xxl' | 'xxl+';
32
+type ResolutionAlias = 'xs' | 'xs+' | 'sm' | 'sm+' | 'md' | 'md+' | 'lg' | 'lg+' | 'xl' | 'xl+' | 'xxl';
33 33
 
34 34
 /** Resolution type */
35 35
 export type Resolution = ResolutionAlias | CustomResolution;
@@ -48,12 +48,8 @@ const ALIAS_TO_HEIGHT: { readonly [R in ResolutionAlias]: number } = {
48 48
     'lg' : 480,
49 49
     'lg+': 600,
50 50
     'xl' : 720,
51
-    'xl+': 768,
52
-    'xxl': 900,
53
-    'xxl+':960,
54
-    //'ul-': 1024,
55
-    //'ul': 1080, // what should we call this? xxxl? ul? (ultra large?)
56
-    //'ul+': 1200,
51
+    'xl+': 900,
52
+    'xxl': 1080,
57 53
 };
58 54
 
59 55
 /**

Loading…
Cancel
Save