mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
Resolve #4305
This commit is contained in:
parent
f8058fa390
commit
0955a0e1b5
11 changed files with 10 additions and 17 deletions
|
@ -2,7 +2,6 @@
|
|||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "10.87.1",
|
||||
"clientVersion": "2.0.14358",
|
||||
"codename": "nighthike",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -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の新しいバージョンがあります。ページを再度読み込みします。' +
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue