From 0aaecdcddc11783e6f3db70c8620edd6718d4c7d Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 7 Dec 2022 00:05:49 +0100 Subject: [PATCH] fix!: remove deprecated windows platform (#340) --- README.md | 75 +------------------------------- package-lock.json | 3 +- package.json | 5 +-- plugin.xml | 16 ------- src/windows/SplashScreenProxy.js | 35 --------------- 5 files changed, 5 insertions(+), 129 deletions(-) delete mode 100644 src/windows/SplashScreenProxy.js diff --git a/README.md b/README.md index 54d6b10..81a9700 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,9 @@ This plugin displays and hides a splash screen while your web application is lau - [Supported Platforms](#supported-platforms) - [Platform Splash Screen Image Configuration](#platform-splash-screen-image-configuration) - [Example Configuration](#example-configuration) - - [Windows-specific Information](#windows-specific-information) - [Preferences](#preferences) - [config.xml](#configxml) - [Quirks](#quirks) - - [Browser Quirks](#browser-quirks) - - [Windows Quirks](#windows-quirks) - [Methods](#methods) - [splashscreen.hide](#splashscreenhide) - [splashscreen.show](#splashscreenshow) @@ -52,8 +49,6 @@ This plugin displays and hides a splash screen while your web application is lau ## Supported Platforms -- Windows (`cordova-windows` version >= 4.4.0 is required) - __Note__: Extended splashscreen does not require the plugin on Windows in case you don't use the plugin API, i.e. programmatic hide/show. - Browser ## Platform Splash Screen Image Configuration @@ -77,50 +72,12 @@ projectRoot js res screen - windows ``` ```xml - - - - - - - - - ``` -### Windows-specific Information - -Splash screen images can be defined using the [MRT](https://cordova.apache.org/docs/en/dev/config_ref/images.html#windows) concept. -If you specify `src="res/windows/splashscreen.png"` the following files will be copied into the application's images folder: -`res/windows/splashscreen.png` | `res/windows/splashscreen.scale-100.png`, `res/windows/splashscreen.scale-125.png`, etc. - -The following are supported: - -| Scale, % | Project | Width | Height | Filename | -|:------------:|:-------------------:|:-----------:|:------------:|:---------------------------------:| -| 100 | Windows 10/8.1 | 620 | 300 | `splashscreen.png` \| `splashscreen.scale-100.png` | -| 125 | Windows 10 | 775 | 375 | `splashscreen.scale-125.png` | -| 150 | Windows 10 | 930 | 450 | `splashscreen.scale-150.png` | -| 200 | Windows 10 | 1240 | 600 | `splashscreen.scale-200.png` | -| 400 | Windows 10 | 2480 | 1200 | `splashscreen.scale-400.png` | -| 140 | Windows 8.1 | 868 | 420 | `splashscreen.scale-140.png` | -| 180 | Windows 8.1 | 1116 | 540 | `splashscreen.scale-180.png` | -| 100 | Windows Phone 8.1 | 480 | 800 | `splashscreenphone.png` \| `splashscreenphone.scale-100.png` | -| 140 | Windows Phone 8.1 | 672 | 1120 | `splashscreenphone.scale-140.png` | -| 240 | Windows Phone 8.1 | 1152 | 1920 | `splashscreenphone.scale-240.png` | - -__Note__: SplashScreens size for Windows 10 project should not exceed 200 KBytes. -__Note__: Supported formats are `.png`, `.jpg`, `.jpeg`. Mixing of the extensions within a target is not supported. I.e. you can have `splashscreen.jpg` and `splashscreenphone.png` but not `splashscreen.scale-100.png`, `splashscreen.scale-400.jpg`. -__Note__: You may need to reopen Visual Studio solution after changing the images and doing a `cordova prepare` for the changes to take effect. - ## Preferences ### config.xml @@ -144,9 +101,6 @@ __Note__: You may need to reopen Visual Studio solution after changing the image ``` - **Windows Quirk**: You should disable the splashscreen in case you are updating the entire document body dynamically (f.e. with a SPA router) to avoid affecting UI/controls. - Note that you should also directly reference `WinJS/base.js` in the page HTML in this case to avoid the issues with activation context ([CB-11658](https://issues.apache.org/jira/browse/CB-11658)). - - `FadeSplashScreen` (boolean, defaults to `true`): Set to `false` to prevent the splash screen from fading in and out when its display state changes. @@ -179,19 +133,8 @@ __Note__: You may need to reopen Visual Studio solution after changing the image }, splashDuration - fadeDuration); ``` -- `ShowSplashScreenSpinner` (boolean, defaults to `true`): Set to `false` - to hide the splash screen spinner. - - ```xml - - ``` - - _Note_: Does not work on Browser or Windows platforms. - ### Quirks -#### Browser Quirks - You can use the following preferences in your `config.xml`: ```xml @@ -206,23 +149,7 @@ You can use the following preferences in your `config.xml`: ``` -__Note__: `SplashScreen` value should be absolute in order to work in a sub-page. The `SplashScreen` value is used only for the browser platform. The value will be ignored for other platforms. - -#### Windows Quirks - -- `SplashScreenSpinnerColor` (string, defaults to system accent color): hash, rgb notation or CSS color name. - - ```xml - - - - ``` - -- `SplashScreenBackgroundColor` (string, defaults to #464646): hex notation. - - ```xml - - ``` +__Note__: `SplashScreen` value should be absolute in order to work in a sub-page. ## Methods diff --git a/package-lock.json b/package-lock.json index 59c6b2e..b6c90fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,8 @@ "cordova-ios": "<6.0.0" }, "<7.0.0": { - "cordova-android": ">=3.6.0 <11.0.0" + "cordova-android": ">=3.6.0 <11.0.0", + "cordova-windows": ">=4.4.0" }, ">=4.0.0": { "cordova-android": ">=3.6.0", diff --git a/package.json b/package.json index c107e2d..82b4f25 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "cordova": { "id": "cordova-plugin-splashscreen", "platforms": [ - "windows", "browser" ] }, @@ -16,7 +15,6 @@ "cordova", "splashscreen", "ecosystem:cordova", - "cordova-windows", "cordova-browser" ], "scripts": { @@ -40,7 +38,8 @@ "cordova-windows": ">=4.4.0" }, "<7.0.0": { - "cordova-android": ">=3.6.0 <11.0.0" + "cordova-android": ">=3.6.0 <11.0.0", + "cordova-windows": ">=4.4.0" }, "8.0.0": { "cordova": ">100" diff --git a/plugin.xml b/plugin.xml index 6dc202d..c401e50 100644 --- a/plugin.xml +++ b/plugin.xml @@ -27,22 +27,6 @@ cordova,splashscreen https://github.com/apache/cordova-plugin-splashscreen.git https://github.com/apache/cordova-plugin-splashscreen/issues - - - - - - - - - - - - - - - - diff --git a/src/windows/SplashScreenProxy.js b/src/windows/SplashScreenProxy.js deleted file mode 100644 index b359df6..0000000 --- a/src/windows/SplashScreenProxy.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var splash = require('cordova/splashscreen'); - -var SplashScreen = { - show: function () { - splash.show(); - }, - hide: function () { - splash.hide(); - } -}; - -module.exports = SplashScreen; - -require('cordova/exec/proxy').add('SplashScreen', SplashScreen);