diff --git a/package.json b/package.json index 6514cc60577523d2cd93c04eb5f2094fef4c5d45..d876274c73384db75cfb9bc1bee03ebcd8998f0f 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "name": "misskey", "author": "syuilo <i@syuilo.com>", "version": "10.87.1", - "clientVersion": "2.0.14358", "codename": "nighthike", "repository": { "type": "git", diff --git a/src/client/app/boot.js b/src/client/app/boot.js index 28ba1be099a922493be980ba16d3b8f08ce1d1e0..f93cb407e8abcb763825cc3fe534dfa00df64c1c 100644 --- a/src/client/app/boot.js +++ b/src/client/app/boot.js @@ -138,8 +138,8 @@ const meta = await res.json(); // Compare versions - if (meta.clientVersion != ver) { - localStorage.setItem('v', meta.clientVersion); + if (meta.version != ver) { + localStorage.setItem('v', meta.version); alert( 'Misskeyã®æ–°ã—ã„ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã‚ã‚Šã¾ã™ã€‚ページをå†åº¦èªã¿è¾¼ã¿ã—ã¾ã™ã€‚' + diff --git a/src/client/app/common/scripts/check-for-update.ts b/src/client/app/common/scripts/check-for-update.ts index 20da83a0c2e998850d725278ab46ff127f309184..d487915766ee07c5f823a1bc9cdfa29e3c16e896 100644 --- a/src/client/app/common/scripts/check-for-update.ts +++ b/src/client/app/common/scripts/check-for-update.ts @@ -1,8 +1,8 @@ -import { clientVersion as current } from '../../config'; +import { version as current } from '../../config'; export default async function($root: any, force = false, silent = false) { const meta = await $root.getMeta(force); - const newer = meta.clientVersion; + const newer = meta.version; if (newer != current) { localStorage.setItem('should-refresh', 'true'); diff --git a/src/client/app/common/views/widgets/version.vue b/src/client/app/common/views/widgets/version.vue index 470eb1a84e2e56dacd94e0bce8591603ed1f82ce..e8f6c08f343ffca5cc1153c629bf84189c2f4e1e 100644 --- a/src/client/app/common/views/widgets/version.vue +++ b/src/client/app/common/views/widgets/version.vue @@ -3,7 +3,7 @@ </template> <script lang="ts"> -import { clientVersion as version, codename } from '../../../config'; +import { version, codename } from '../../../config'; import define from '../../../common/define-widget'; export default define({ name: 'version' diff --git a/src/client/app/config.ts b/src/client/app/config.ts index 6813c01273e1b7a26f48a8f26125a27a1a8259a2..55c0c6b3a53c0040c835896241249e20574f32b5 100644 --- a/src/client/app/config.ts +++ b/src/client/app/config.ts @@ -1,7 +1,6 @@ declare const _LANGS_: string[]; declare const _COPYRIGHT_: string; declare const _VERSION_: string; -declare const _CLIENT_VERSION_: string; declare const _CODENAME_: string; declare const _ENV_: string; @@ -17,6 +16,5 @@ export const langs = _LANGS_; export const locale = JSON.parse(localStorage.getItem('locale')); export const copyright = _COPYRIGHT_; export const version = _VERSION_; -export const clientVersion = _CLIENT_VERSION_; export const codename = _CODENAME_; export const env = _ENV_; diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index e4e7830a16f137833c67cccd0c28d6de88827d48..25e254f2285fb2cab126381e0d326a3a034e832d 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -275,7 +275,7 @@ import XApiSettings from '../../../common/views/components/api-settings.vue'; import XLanguageSettings from '../../../common/views/components/language-settings.vue'; import XNotificationSettings from '../../../common/views/components/notification-settings.vue'; -import { url, clientVersion as version } from '../../../config'; +import { url, version } from '../../../config'; import checkForUpdate from '../../../common/scripts/check-for-update'; export default Vue.extend({ diff --git a/src/client/app/init.ts b/src/client/app/init.ts index 22285aa9928a45ed3a209899a4d0c36ace02a2ac..83ec30952bfbff31311a686c28ef5f10647972b8 100644 --- a/src/client/app/init.ts +++ b/src/client/app/init.ts @@ -15,7 +15,7 @@ import VueSize from './common/size'; import App from './app.vue'; import checkForUpdate from './common/scripts/check-for-update'; import MiOS from './mios'; -import { clientVersion as version, codename, lang, locale } from './config'; +import { version, codename, lang, locale } from './config'; import { builtinThemes, lightTheme, applyTheme } from './theme'; import Dialog from './common/views/components/dialog.vue'; diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts index 83f62a502abeb001bb37d51bdd795298fbe6685a..4d6f8a82465c3a7e26b6a0203474c5cfe805c67a 100644 --- a/src/client/app/mios.ts +++ b/src/client/app/mios.ts @@ -4,7 +4,7 @@ import { EventEmitter } from 'eventemitter3'; import * as uuid from 'uuid'; import initStore from './store'; -import { apiUrl, clientVersion as version } from './config'; +import { apiUrl, version } from './config'; import Progress from './common/scripts/loading'; import Err from './common/views/components/connect-failed.vue'; diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index e8b51d1271518a501ef7282a9475ee2f92859489..f26b9af6f4b393f94d7259d5c48b309ae796d43c 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -152,7 +152,7 @@ <script lang="ts"> import Vue from 'vue'; import i18n from '../../../i18n'; -import { apiUrl, clientVersion as version, codename } from '../../../config'; +import { apiUrl, version, codename } from '../../../config'; import checkForUpdate from '../../../common/scripts/check-for-update'; import XTheme from '../../../common/views/components/theme.vue'; import XDriveSettings from '../../../common/views/components/drive-settings.vue'; diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index ebbaabc24e7f6964304c8e099ab259894292f16a..b9f458e9a675d1ef4a7af1d80618f65c63159d6b 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -6,8 +6,6 @@ import define from '../define'; import fetchMeta from '../../../misc/fetch-meta'; import * as pkg from '../../../../package.json'; -import * as client from '../../../../built/client/meta.json'; - export const meta = { stability: 'stable', @@ -39,7 +37,6 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => { maintainer: instance.maintainer, version: pkg.version, - clientVersion: client.version, name: instance.name, uri: config.url, diff --git a/webpack.config.ts b/webpack.config.ts index 3c7a112a8047434a8cf0090aa1d7cc36fd5300c1..07a54ec8313b6a5070fe15db9c45415876b72735 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -18,7 +18,7 @@ const constants = require('./src/const.json'); const locales = require('./locales'); const meta = require('./package.json'); -const version = isProduction ? meta.clientVersion : meta.clientVersion + '-' + rndstr({ length: 8, chars: '0-9a-z' }); +const version = isProduction ? meta.version : meta.version + '-' + rndstr({ length: 8, chars: '0-9a-z' }); const codename = meta.codename; const postcss = { @@ -116,7 +116,6 @@ module.exports = { new webpack.DefinePlugin({ _COPYRIGHT_: JSON.stringify(constants.copyright), _VERSION_: JSON.stringify(meta.version), - _CLIENT_VERSION_: JSON.stringify(version), _CODENAME_: JSON.stringify(codename), _LANGS_: JSON.stringify(Object.keys(locales).map(l => [l, locales[l].meta.lang])), _ENV_: JSON.stringify(process.env.NODE_ENV)