This commit is contained in:
syuilo 2019-02-18 04:52:40 +09:00
parent f8058fa390
commit 0955a0e1b5
11 changed files with 10 additions and 17 deletions

View file

@ -2,7 +2,6 @@
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "10.87.1",
"clientVersion": "2.0.14358",
"codename": "nighthike",
"repository": {
"type": "git",

View file

@ -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の新しいバージョンがあります。ページを再度読み込みします。' +

View file

@ -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');

View file

@ -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'

View file

@ -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_;

View file

@ -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({

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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,

View file

@ -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)