mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 08:53:09 +02:00
Resolve #4305
This commit is contained in:
parent
a766a57af9
commit
efd0368e56
11 changed files with 10 additions and 17 deletions
|
@ -2,7 +2,6 @@
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"author": "syuilo <i@syuilo.com>",
|
"author": "syuilo <i@syuilo.com>",
|
||||||
"version": "10.87.1",
|
"version": "10.87.1",
|
||||||
"clientVersion": "2.0.14358",
|
|
||||||
"codename": "nighthike",
|
"codename": "nighthike",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -138,8 +138,8 @@
|
||||||
const meta = await res.json();
|
const meta = await res.json();
|
||||||
|
|
||||||
// Compare versions
|
// Compare versions
|
||||||
if (meta.clientVersion != ver) {
|
if (meta.version != ver) {
|
||||||
localStorage.setItem('v', meta.clientVersion);
|
localStorage.setItem('v', meta.version);
|
||||||
|
|
||||||
alert(
|
alert(
|
||||||
'Misskeyの新しいバージョンがあります。ページを再度読み込みします。' +
|
'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) {
|
export default async function($root: any, force = false, silent = false) {
|
||||||
const meta = await $root.getMeta(force);
|
const meta = await $root.getMeta(force);
|
||||||
const newer = meta.clientVersion;
|
const newer = meta.version;
|
||||||
|
|
||||||
if (newer != current) {
|
if (newer != current) {
|
||||||
localStorage.setItem('should-refresh', 'true');
|
localStorage.setItem('should-refresh', 'true');
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { clientVersion as version, codename } from '../../../config';
|
import { version, codename } from '../../../config';
|
||||||
import define from '../../../common/define-widget';
|
import define from '../../../common/define-widget';
|
||||||
export default define({
|
export default define({
|
||||||
name: 'version'
|
name: 'version'
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
declare const _LANGS_: string[];
|
declare const _LANGS_: string[];
|
||||||
declare const _COPYRIGHT_: string;
|
declare const _COPYRIGHT_: string;
|
||||||
declare const _VERSION_: string;
|
declare const _VERSION_: string;
|
||||||
declare const _CLIENT_VERSION_: string;
|
|
||||||
declare const _CODENAME_: string;
|
declare const _CODENAME_: string;
|
||||||
declare const _ENV_: string;
|
declare const _ENV_: string;
|
||||||
|
|
||||||
|
@ -17,6 +16,5 @@ export const langs = _LANGS_;
|
||||||
export const locale = JSON.parse(localStorage.getItem('locale'));
|
export const locale = JSON.parse(localStorage.getItem('locale'));
|
||||||
export const copyright = _COPYRIGHT_;
|
export const copyright = _COPYRIGHT_;
|
||||||
export const version = _VERSION_;
|
export const version = _VERSION_;
|
||||||
export const clientVersion = _CLIENT_VERSION_;
|
|
||||||
export const codename = _CODENAME_;
|
export const codename = _CODENAME_;
|
||||||
export const env = _ENV_;
|
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 XLanguageSettings from '../../../common/views/components/language-settings.vue';
|
||||||
import XNotificationSettings from '../../../common/views/components/notification-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';
|
import checkForUpdate from '../../../common/scripts/check-for-update';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
|
|
|
@ -15,7 +15,7 @@ import VueSize from './common/size';
|
||||||
import App from './app.vue';
|
import App from './app.vue';
|
||||||
import checkForUpdate from './common/scripts/check-for-update';
|
import checkForUpdate from './common/scripts/check-for-update';
|
||||||
import MiOS from './mios';
|
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 { builtinThemes, lightTheme, applyTheme } from './theme';
|
||||||
import Dialog from './common/views/components/dialog.vue';
|
import Dialog from './common/views/components/dialog.vue';
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { EventEmitter } from 'eventemitter3';
|
||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
|
|
||||||
import initStore from './store';
|
import initStore from './store';
|
||||||
import { apiUrl, clientVersion as version } from './config';
|
import { apiUrl, version } from './config';
|
||||||
import Progress from './common/scripts/loading';
|
import Progress from './common/scripts/loading';
|
||||||
|
|
||||||
import Err from './common/views/components/connect-failed.vue';
|
import Err from './common/views/components/connect-failed.vue';
|
||||||
|
|
|
@ -152,7 +152,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import i18n from '../../../i18n';
|
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 checkForUpdate from '../../../common/scripts/check-for-update';
|
||||||
import XTheme from '../../../common/views/components/theme.vue';
|
import XTheme from '../../../common/views/components/theme.vue';
|
||||||
import XDriveSettings from '../../../common/views/components/drive-settings.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 fetchMeta from '../../../misc/fetch-meta';
|
||||||
import * as pkg from '../../../../package.json';
|
import * as pkg from '../../../../package.json';
|
||||||
|
|
||||||
import * as client from '../../../../built/client/meta.json';
|
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
stability: 'stable',
|
stability: 'stable',
|
||||||
|
|
||||||
|
@ -39,7 +37,6 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => {
|
||||||
maintainer: instance.maintainer,
|
maintainer: instance.maintainer,
|
||||||
|
|
||||||
version: pkg.version,
|
version: pkg.version,
|
||||||
clientVersion: client.version,
|
|
||||||
|
|
||||||
name: instance.name,
|
name: instance.name,
|
||||||
uri: config.url,
|
uri: config.url,
|
||||||
|
|
|
@ -18,7 +18,7 @@ const constants = require('./src/const.json');
|
||||||
|
|
||||||
const locales = require('./locales');
|
const locales = require('./locales');
|
||||||
const meta = require('./package.json');
|
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 codename = meta.codename;
|
||||||
|
|
||||||
const postcss = {
|
const postcss = {
|
||||||
|
@ -116,7 +116,6 @@ module.exports = {
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
_COPYRIGHT_: JSON.stringify(constants.copyright),
|
_COPYRIGHT_: JSON.stringify(constants.copyright),
|
||||||
_VERSION_: JSON.stringify(meta.version),
|
_VERSION_: JSON.stringify(meta.version),
|
||||||
_CLIENT_VERSION_: JSON.stringify(version),
|
|
||||||
_CODENAME_: JSON.stringify(codename),
|
_CODENAME_: JSON.stringify(codename),
|
||||||
_LANGS_: JSON.stringify(Object.keys(locales).map(l => [l, locales[l].meta.lang])),
|
_LANGS_: JSON.stringify(Object.keys(locales).map(l => [l, locales[l].meta.lang])),
|
||||||
_ENV_: JSON.stringify(process.env.NODE_ENV)
|
_ENV_: JSON.stringify(process.env.NODE_ENV)
|
||||||
|
|
Loading…
Reference in a new issue