From 52779b6da8431f0aa82948e2cf895448f816caae Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Thu, 7 Jan 2021 05:07:12 +0800 Subject: [PATCH 1/8] improvement(frostnova): add frostnova :D --- src/components/global/RandomBackground.vue | 3 ++- src/utils/environment.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/global/RandomBackground.vue b/src/components/global/RandomBackground.vue index af19be07..30fe7152 100644 --- a/src/components/global/RandomBackground.vue +++ b/src/components/global/RandomBackground.vue @@ -19,6 +19,7 @@ import {mapGetters} from "vuex"; import randomUtils from "@/utils/randomUtils"; import {externalService} from "@/utils/service"; + import environment from "@/utils/environment"; export default { name: "RandomBackground", @@ -103,7 +104,7 @@ this.webpSupport = await this.testWebp(); } // P(🔪) = 0.2% - if (Math.random() < 0.002) { + if (environment.debug.frostnova || Math.random() < 0.002) { return this.getImageUrl("frstar") } return this.getImageUrl(randomUtils.cachedRandom.get()) diff --git a/src/utils/environment.js b/src/utils/environment.js index 6b02188b..1b9081ca 100644 --- a/src/utils/environment.js +++ b/src/utils/environment.js @@ -31,6 +31,7 @@ export default { get devtools() {return boolean("devtools", true)}, get colorfulConsole() {return boolean("colorfulConsole", true)}, get fullConsole() {return boolean("fullConsole")}, + get frostnova() {return boolean("frostnova")} }, // native: { From 9daea23291291e4c79482b66947bd8bc69746669 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Thu, 7 Jan 2021 17:56:52 +0800 Subject: [PATCH 2/8] fix(compatibility): fix for deprecated browser compatibility --- package.json | 7 +++---- vue.config.js | 4 +++- yarn.lock | 5 ----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 8f9c38a9..531d3dc9 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,6 @@ "katex": "^0.12.0", "lodash": "^4.17.20", "marked": "^1.0.0", - "minisearch": "^3.0.2", "qs": "^6.9.4", "regenerator-runtime": "^0.13.5", "semver": "^7.3.2", @@ -100,10 +99,10 @@ } }, "browserslist": [ - "> 0.1% in my stats", - "> 1% in CN", + "> 0.05% in my stats", + "> 0.5% in CN", "last 5 versions", - "since 2010", + "since 2013", "defaults" ], "bugs": { diff --git a/vue.config.js b/vue.config.js index d2880931..23494251 100644 --- a/vue.config.js +++ b/vue.config.js @@ -38,7 +38,9 @@ module.exports = { integrity: false, runtimeCompiler: true, transpileDependencies: [ - "vuetify" + "vuetify", + "fuse.js", + "semver", ], configureWebpack: { plugins: [ diff --git a/yarn.lock b/yarn.lock index a6ef818e..4e176348 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6668,11 +6668,6 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" -minisearch@^3.0.2: - version "3.0.2" - resolved "https://registry.npm.taobao.org/minisearch/download/minisearch-3.0.2.tgz#fa470114ffc7c4bcc0786b2adb7010d4b773bc32" - integrity sha1-+kcBFP/HxLzAeGsq23AQ1LdzvDI= - mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" From 287696844fdf4e65e5f383783ea75c15d1bb9c64 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Thu, 7 Jan 2021 17:57:37 +0800 Subject: [PATCH 3/8] improvement(build): improve failsafe --- vue.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vue.config.js b/vue.config.js index 23494251..593fde69 100644 --- a/vue.config.js +++ b/vue.config.js @@ -15,7 +15,7 @@ try { function envvar(name, fallback) { let content = process.env[name] if (content) content = content.trim() - return JSON.stringify(content) || fallback + return JSON.stringify(content || fallback) || `"null"` } module.exports = { From 1ec1346fa655ec7f87e3e41d26443418918b2f0b Mon Sep 17 00:00:00 2001 From: Eru Date: Thu, 14 Jan 2021 23:32:53 +0900 Subject: [PATCH 4/8] improvement(i18n): fix and improve translation Fix one mis-translation of "comprehensive" for JP. And propose more natural expression. --- src/views/About/Intro.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/About/Intro.vue b/src/views/About/Intro.vue index 15d25e7b..c35f2bb8 100644 --- a/src/views/About/Intro.vue +++ b/src/views/About/Intro.vue @@ -11,7 +11,7 @@ "intro": { "intro_0": "ペンギン急便データ統計処理部門へようこそ!", "intro_1": "Penguin Statisticsはペンギン急便のデータ処理部門であり(嘘)、各作戦での素材ドロップの統計分析を行っています。", - "intro_2": "現在ほとんどのデータはユーザーの手によって手動でアップロードされており、誤った情報や誤った情報による影響を最小限に抑えるためにペンギンデータアナライズチームはドロップアイテムについて様々な確度から審査しています。" + "intro_2": "現在ほとんどのデータはユーザーの手によって手動でアップロードされており、誤った情報による影響を最小限に抑えるため、アップロードされた情報について多角的に審査しています。" } }, "ko": { From 257ddc3a5ef70ca2cb468700997ad065cb1caaa9 Mon Sep 17 00:00:00 2001 From: GalvinGao Date: Fri, 15 Jan 2021 06:25:10 +0800 Subject: [PATCH 5/8] improvement(probe): add probe and twitter card image --- ios/App/App/AppDelegate.swift | 2 +- package.json | 1 + public/index.html | 6 +- src/components/advancedQuery/QueryBuilder.vue | 7 +- src/components/search/GlobalSearch.vue | 4 +- src/components/search/SearchResultNormal.vue | 23 + src/components/search/SearchResultStages.vue | 2 +- src/config/index.js | 15 +- src/main.js | 27 +- src/mixins/hooks/GlobalEntry.js | 2 + src/mixins/hooks/Probe.js | 11 + src/models/probe/probeevents.js | 1937 +++++++++++++++++ src/store/modules/auth.js | 13 +- src/utils/ReconnectingWebSocket.js | 80 + src/utils/environment.js | 11 + src/utils/probe.js | 168 ++ vue.config.js | 6 + yarn.lock | 93 +- 18 files changed, 2387 insertions(+), 21 deletions(-) create mode 100644 src/mixins/hooks/Probe.js create mode 100644 src/models/probe/probeevents.js create mode 100644 src/utils/ReconnectingWebSocket.js create mode 100644 src/utils/probe.js diff --git a/ios/App/App/AppDelegate.swift b/ios/App/App/AppDelegate.swift index be7906f9..505580fd 100644 --- a/ios/App/App/AppDelegate.swift +++ b/ios/App/App/AppDelegate.swift @@ -75,6 +75,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } } + // MARK: save shortcut to process if let shortcutItem = launchOptions?[UIApplication.LaunchOptionsKey.shortcutItem] as? UIApplicationShortcutItem { shortcutItemToProcess = shortcutItem @@ -113,7 +114,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let monitor = NWPathMonitor() monitor.pathUpdateHandler = { path in - print("new network path:", path) var isConstrained = false if #available(iOS 13.0, *) { diff --git a/package.json b/package.json index 531d3dc9..0e8ee8c5 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "katex": "^0.12.0", "lodash": "^4.17.20", "marked": "^1.0.0", + "protobufjs": "^6.10.2", "qs": "^6.9.4", "regenerator-runtime": "^0.13.5", "semver": "^7.3.2", diff --git a/public/index.html b/public/index.html index 7eddf2f2..d5c8cd28 100644 --- a/public/index.html +++ b/public/index.html @@ -43,7 +43,9 @@ - + + + @@ -54,7 +56,7 @@ - +
{ data = data["advanced_results"] @@ -232,7 +234,7 @@ // if the user hasn't see the loading screen up to 3.5sec setTimeout(() => { // then we let them see that for just a little longer time - // to reduce the "flashy" feeling when netowrk condition is pretty ideal + // to reduce the "flashy" feeling when network condition is pretty ideal this.$emit("result", data) this.result.busy = false }, Math.random() * 500 + 2000) @@ -246,6 +248,7 @@ snackbar.networkError() this.result.busy = false }) + probe.reportExecutedAdvancedQuery(marshalled) }, cancel () { this.result.busy = false diff --git a/src/components/search/GlobalSearch.vue b/src/components/search/GlobalSearch.vue index 321dd4db..09eceba8 100644 --- a/src/components/search/GlobalSearch.vue +++ b/src/components/search/GlobalSearch.vue @@ -51,11 +51,13 @@ class="search-results" :class="{'search-results--dense': pure}" > -