mirror of
https://example.com
synced 2024-11-22 12:56:39 +09:00
chore: minor refactor on version comparison
This commit is contained in:
parent
be83fa27ac
commit
797218b863
3 changed files with 7 additions and 28 deletions
|
@ -43,7 +43,6 @@
|
|||
"chartjs-plugin-gradient": "0.6.1",
|
||||
"chartjs-plugin-zoom": "2.0.1",
|
||||
"city-timezones": "^1.2.1",
|
||||
"compare-versions": "6.1.0",
|
||||
"cropperjs": "2.0.0-beta.4",
|
||||
"cross-env": "7.0.3",
|
||||
"date-fns": "2.30.0",
|
||||
|
|
|
@ -31,7 +31,6 @@ import {
|
|||
version as vueVersion,
|
||||
watch,
|
||||
} from "vue";
|
||||
import { compareVersions } from "compare-versions";
|
||||
|
||||
import widgets from "@/widgets";
|
||||
import directives from "@/directives";
|
||||
|
@ -250,25 +249,13 @@ function checkForSplash() {
|
|||
// テーマリビルドするため
|
||||
localStorage.removeItem("theme");
|
||||
|
||||
try {
|
||||
// 変なバージョン文字列来るとcompareVersionsでエラーになるため
|
||||
if (
|
||||
lastVersion != null &&
|
||||
version !== lastVersion &&
|
||||
defaultStore.state.showUpdates
|
||||
) {
|
||||
// ログインしてる場合だけ
|
||||
if ($i) {
|
||||
popup(
|
||||
defineAsyncComponent(() => import("@/components/MkUpdated.vue")),
|
||||
{},
|
||||
{},
|
||||
"closed",
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
if ($i && defaultStore.state.showUpdates) {
|
||||
popup(
|
||||
defineAsyncComponent(() => import("@/components/MkUpdated.vue")),
|
||||
{},
|
||||
{},
|
||||
"closed",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -713,9 +713,6 @@ importers:
|
|||
city-timezones:
|
||||
specifier: ^1.2.1
|
||||
version: 1.2.1
|
||||
compare-versions:
|
||||
specifier: 6.1.0
|
||||
version: 6.1.0
|
||||
cropperjs:
|
||||
specifier: 2.0.0-beta.4
|
||||
version: 2.0.0-beta.4
|
||||
|
@ -6423,10 +6420,6 @@ packages:
|
|||
resolution: {integrity: sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==}
|
||||
dev: true
|
||||
|
||||
/compare-versions@6.1.0:
|
||||
resolution: {integrity: sha512-LNZQXhqUvqUTotpZ00qLSaify3b4VFD588aRr8MKFw4CMUr98ytzCW5wDH5qx/DEY5kCDXcbcRuCqL0szEf2tg==}
|
||||
dev: true
|
||||
|
||||
/component-emitter@1.3.0:
|
||||
resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==}
|
||||
dev: true
|
||||
|
|
Loading…
Reference in a new issue