1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-21 14:19:43 +02:00

improved manifest.json and API 401 redirect logic

This commit is contained in:
Harvey Kandola 2017-12-21 11:40:20 +00:00
parent cafa410d16
commit 0b0cae4a8d
14 changed files with 705 additions and 708 deletions

File diff suppressed because one or more lines are too long

View file

@ -10,7 +10,6 @@
// https://documize.com
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
import AuthProvider from '../../../mixins/auth';

View file

@ -10,7 +10,6 @@
// https://documize.com
import { Promise as EmberPromise } from 'rsvp';
import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
import constants from '../../../utils/constants';

View file

@ -10,7 +10,6 @@
// https://documize.com
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
import netUtil from '../utils/net';

View file

@ -38,7 +38,7 @@ export default AjaxService.extend({
let appVersion = headers['x-documize-version'];
// when unauthorized on local API AJAX calls, redirect to app root
if (status === 401 && is.not.undefined(appVersion)) {
if (status === 401 && is.not.undefined(appVersion) && is.not.includes(window.location.href, '/auth')) {
window.location.href = 'auth/login';
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -2,24 +2,24 @@
"name": "Documize",
"short_name": "Documize",
"display": "standalone",
"background_color": "#2667af",
"theme_color": "#2667af",
"background_color": "#375061",
"theme_color": "#375061",
"description": "Organized documents",
"start_url": "/?utm_source=homescreen",
"icons": [{
"src": "assets/img/icon-white-64x64.png",
"src": "assets/img/icon-blue-64x64.png",
"sizes": "64x64",
"type": "image/png"
}, {
"src": "assets/img/icon-white-128x128.png",
"src": "assets/img/icon-blue-128x128.png",
"sizes": "128x128",
"type": "image/png"
}, {
"src": "assets/img/icon-white-256x256.png",
"src": "assets/img/icon-blue-256x256.png",
"sizes": "256x256",
"type": "image/png"
}, {
"src": "assets/img/icon-white-1024x1024.png",
"src": "assets/img/icon-blue-1024x1024.png",
"sizes": "1024x1024",
"type": "image/png"
}]