浏览代码

merge AriaNg commit (https://github.com/mayswind/AriaNg/commit/5a45203e9fa02dfa35c9f163b28bf5793e442bfc)

MaysWind 3 年之前
父节点
当前提交
f61552289f

+ 0 - 1
app/langs/zh_Hans.txt

@@ -231,7 +231,6 @@ Downloading Count=正在下载数量
 Waiting Count=正在等待数量
 Stopped Count=已停止数量
 You have disabled notification in your browser. You should change your browser's settings before you enable this function.=您已经在浏览器中禁用通知功能. 如需使用此功能, 请修改您浏览器的设置.
-Application cache has been updated, please reload the page for the changes to take effect.=应用缓存已经更新, 请重新加载页面使其生效.
 Language resource has been updated, please reload the page for the changes to take effect.=语言资源已经更新, 请重新加载页面使其生效.
 Configuration has been modified, please reload the page for the changes to take effect.=配置已经修改, 请重新加载页面使其生效.
 Reload AriaNg=重新加载 AriaNg

+ 0 - 1
app/langs/zh_Hant.txt

@@ -231,7 +231,6 @@ Downloading Count=正在下載數量
 Waiting Count=正在等待數量
 Stopped Count=已停止數量
 You have disabled notification in your browser. You should change your browser's settings before you enable this function.=您已經在瀏覽器中停用通知功能. 如需使用此功能, 請修改您瀏覽器的設定.
-Application cache has been updated, please reload the page for the changes to take effect.=應用快取已經更新, 請重新載入頁面使其生效.
 Language resource has been updated, please reload the page for the changes to take effect.=語言資源已經更新, 請重新載入頁面使其生效.
 Configuration has been modified, please reload the page for the changes to take effect.=配置已經修改, 請重新載入頁面使其生效.
 Reload AriaNg=重新載入 AriaNg

+ 0 - 1
app/scripts/config/defaultLanguage.js

@@ -235,7 +235,6 @@
             'Waiting Count': 'Waiting Count',
             'Stopped Count': 'Stopped Count',
             'You have disabled notification in your browser. You should change your browser\'s settings before you enable this function.': 'You have disabled notification in your browser. You should change your browser\'s settings before you enable this function.',
-            'Application cache has been updated, please reload the page for the changes to take effect.': 'Application cache has been updated, please reload the page for the changes to take effect.',
             'Language resource has been updated, please reload the page for the changes to take effect.': 'Language resource has been updated, please reload the page for the changes to take effect.',
             'Configuration has been modified, please reload the page for the changes to take effect.': 'Configuration has been modified, please reload the page for the changes to take effect.',
             'Reload AriaNg': 'Reload AriaNg',

+ 0 - 8
app/scripts/core/root.js

@@ -559,14 +559,6 @@
 
         ariaNgSettingService.setDebugMode(ariaNgNativeElectronService.isDevMode());
 
-        ariaNgSettingService.onApplicationCacheUpdated(function () {
-            ariaNgNotificationService.notifyInPage('', 'Application cache has been updated, please reload the page for the changes to take effect.', {
-                delay: false,
-                type: 'info',
-                templateUrl: 'views/notification-reloadable.html'
-            });
-        });
-
         ariaNgSettingService.onFirstAccess(function () {
             ariaNgNotificationService.notifyInPage('', 'Tap to configure and get started with AriaNg.', {
                 delay: false,

+ 0 - 22
app/scripts/services/ariaNgSettingService.js

@@ -12,30 +12,18 @@
             };
         })();
         var browserSupportStorage = browserFeatures.localStroage || browserFeatures.cookies;
-        var browserSupportAppCache = !!$window.applicationCache;
         var browserSupportMatchMedia = !!$window.matchMedia;
         var browserSupportDarkMode = browserSupportMatchMedia
             && $window.matchMedia('(prefers-color-scheme: dark)')
             && $window.matchMedia('(prefers-color-scheme: dark)').media !== 'not all'
             && angular.isFunction($window.matchMedia('(prefers-color-scheme: dark)').addEventListener);
 
-        var onAppCacheUpdatedCallbacks = [];
         var onFirstVisitCallbacks = [];
         var firstVisitCallbackFired = false;
         var sessionSettings = {
             debugMode: false
         };
 
-        if (browserSupportAppCache) {
-            var appCache = $window.applicationCache;
-            appCache.addEventListener('updateready', function (e) {
-                for (var i = 0; i < onAppCacheUpdatedCallbacks.length; i++) {
-                    var callback = onAppCacheUpdatedCallbacks[i];
-                    callback();
-                }
-            }, false);
-        }
-
         var fireFirstVisitEvent = function () {
             if (!browserSupportStorage) {
                 return;
@@ -237,9 +225,6 @@
             isBrowserSupportStorage: function () {
                 return browserSupportStorage;
             },
-            isBrowserSupportApplicationCache: function () {
-                return browserSupportAppCache;
-            },
             isBrowserSupportDarkMode: function () {
                 return browserSupportDarkMode;
             },
@@ -689,13 +674,6 @@
             resetSettings: function () {
                 clearAll();
             },
-            onApplicationCacheUpdated: function (callback) {
-                if (!callback) {
-                    return;
-                }
-
-                onAppCacheUpdatedCallbacks.push(callback);
-            },
             onFirstAccess: function (callback) {
                 if (!callback) {
                     return;