iOS PWA improvements

This commit is contained in:
antelle 2019-03-28 22:02:04 +01:00
parent b434d69fd1
commit cf6fca86f3
13 changed files with 31 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1000 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 KiB

View File

@ -7,15 +7,25 @@
<meta name="kw-signature" content="">
<meta name="kw-config" content="(no-config)">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--<link rel="manifest" href="manifest.json">-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="KeeWeb">
<meta name="theme-color" content="#6386ec">
<meta name="msapplication-config" content="browserconfig.xml">
<meta name="msapplication-TileColor" content="#6386ec">
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="mask-icon" href="icons/safari-pinned-tab.svg" color="#6386ec">
<meta name="msapplication-config" content="browserconfig.xml">
<meta name="msapplication-TileColor" content="#6386ec">
<meta name="theme-color" content="#6386ec">
<link rel="apple-touch-startup-image" href="icons/splash-640x1136.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/splash-750x1294.png" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/splash-1242x2148.png" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/splash-1125x2436.png" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/splash-1536x2048.png" media="(min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/splash-1668x2224.png" media="(min-device-width: 834px) and (max-device-width: 834px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="apple-touch-startup-image" href="icons/splash-2048x2732.png" media="(min-device-width: 1024px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait)">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="css/main.css?__inline=true" />
<script src="js/vendor.js?__inline=true"></script>
<script src="js/app.js?__inline=true"></script>

View File

@ -27,7 +27,7 @@ const Locale = require('./util/locale');
const ready = Launcher && Launcher.ready || $;
ready(() => {
if (FeatureDetector.isPopup && AuthReceiver.receive() || FeatureDetector.isFrame) {
if (AuthReceiver.receive() || FeatureDetector.isFrame) {
return;
}
loadMixins();

View File

@ -3,6 +3,9 @@ const Storage = require('../storage');
const AuthReceiver = {
receive: function() {
if (!FeatureDetector.isPopup && !FeatureDetector.isStandalone) {
return false;
}
const opener = window.opener || window.parent;
const message = this.urlArgsToMessage(window.location.href);
const hasKeys = Object.keys(message).filter(key => key !== 'config').length > 0;
@ -10,7 +13,9 @@ const AuthReceiver = {
return false;
}
if (FeatureDetector.isStandalone) {
Storage[sessionStorage.authStorage].handleOAuthReturnMessage(message);
if (sessionStorage.authStorage) {
Storage[sessionStorage.authStorage].handleOAuthReturnMessage(message);
}
return false;
} else {
opener.postMessage(message, window.location.origin);

View File

@ -38,6 +38,12 @@ _.extend(StorageBase.prototype, {
this._oauthProcessReturn(this._oauthReturnMessage);
delete this._oauthReturnMessage;
delete sessionStorage.authStorage;
if (FeatureDetector.isStandalone) {
const [url, urlParams] = location.href.split(/[?#]/);
if (urlParams) {
location.href = url;
}
}
}
return this;
},

View File

@ -15,6 +15,7 @@ const Comparators = require('../util/comparators');
const Storage = require('../storage');
const Launcher = require('../comp/launcher');
const FocusDetector = require('../comp/focus-detector');
const FeatureDetector = require('../util/feature-detector');
const logger = new Logger('open-view');
@ -111,7 +112,7 @@ const OpenView = Backbone.View.extend({
},
focusInput: function() {
if (FocusDetector.hasFocus()) {
if (FocusDetector.hasFocus() && !FeatureDetector.isMobile) {
this.inputEl.focus();
}
},

View File

@ -1,7 +1,8 @@
Release notes
-------------
##### v1.8.0 (TBD)
`*` website icons are be downloaded using favicon.keeweb.info
`+` iOS PWA improvements
`*` website icons are be downloaded using favicon.keeweb.info
##### v1.7.8 (2019-03-02)
`-` fix #1124: keyboard navigation issues