Merge pull request #2349 from syuilo/configress-build
設定ファイルなしでビルドできるように
This commit is contained in:
commit
208dec25d9
@ -12,13 +12,13 @@
|
|||||||
</ui-input>
|
</ui-input>
|
||||||
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
|
<ui-input v-if="user && user.twoFactorEnabled" v-model="token" type="number" required/>
|
||||||
<ui-button type="submit" :disabled="signing">{{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }}</ui-button>
|
<ui-button type="submit" :disabled="signing">{{ signing ? '%i18n:@signing-in%' : '%i18n:@signin%' }}</ui-button>
|
||||||
<p style="margin: 8px 0;" v-if="twitterIntegration">%i18n:@or% <a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
|
<p style="margin: 8px 0;">%i18n:@or% <a :href="`${apiUrl}/signin/twitter`">%i18n:@signin-with-twitter%</a></p>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { apiUrl, host, twitterIntegration } from '../../../config';
|
import { apiUrl, host } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
<p slot="text" v-if="passwordRetypeState == 'not-match'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@password-not-matched%</p>
|
<p slot="text" v-if="passwordRetypeState == 'not-match'" style="color:#FF1161">%fa:exclamation-triangle .fw% %i18n:@password-not-matched%</p>
|
||||||
</div>
|
</div>
|
||||||
</ui-input>
|
</ui-input>
|
||||||
<div v-if="recaptchaSitekey != null" class="g-recaptcha" :data-sitekey="recaptchaSitekey" style="margin: 16px 0;"></div>
|
<div v-if="meta && meta.recaptchaSitekey != null" class="g-recaptcha" :data-sitekey="meta.recaptchaSitekey" style="margin: 16px 0;"></div>
|
||||||
<ui-button type="submit">%i18n:@create%</ui-button>
|
<ui-button type="submit">%i18n:@create%</ui-button>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
const getPasswordStrength = require('syuilo-password-strength');
|
const getPasswordStrength = require('syuilo-password-strength');
|
||||||
import { host, url, recaptchaSitekey } from '../../../config';
|
import { host, url } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -53,7 +53,6 @@ export default Vue.extend({
|
|||||||
retypedPassword: '',
|
retypedPassword: '',
|
||||||
invitationCode: '',
|
invitationCode: '',
|
||||||
url,
|
url,
|
||||||
recaptchaSitekey,
|
|
||||||
usernameState: null,
|
usernameState: null,
|
||||||
passwordStrength: '',
|
passwordStrength: '',
|
||||||
passwordRetypeState: null,
|
passwordRetypeState: null,
|
||||||
@ -73,6 +72,12 @@ export default Vue.extend({
|
|||||||
this.meta = meta;
|
this.meta = meta;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
const head = document.getElementsByTagName('head')[0];
|
||||||
|
const script = document.createElement('script');
|
||||||
|
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
|
||||||
|
head.appendChild(script);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onChangeUsername() {
|
onChangeUsername() {
|
||||||
if (this.username == '') {
|
if (this.username == '') {
|
||||||
@ -123,7 +128,7 @@ export default Vue.extend({
|
|||||||
username: this.username,
|
username: this.username,
|
||||||
password: this.password,
|
password: this.password,
|
||||||
invitationCode: this.invitationCode,
|
invitationCode: this.invitationCode,
|
||||||
'g-recaptcha-response': recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null
|
'g-recaptcha-response': this.meta.recaptchaSitekey != null ? (window as any).grecaptcha.getResponse() : null
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
(this as any).api('signin', {
|
(this as any).api('signin', {
|
||||||
username: this.username,
|
username: this.username,
|
||||||
@ -134,19 +139,11 @@ export default Vue.extend({
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
alert('%i18n:@some-error%');
|
alert('%i18n:@some-error%');
|
||||||
|
|
||||||
if (recaptchaSitekey != null) {
|
if (this.meta.recaptchaSitekey != null) {
|
||||||
(window as any).grecaptcha.reset();
|
(window as any).grecaptcha.reset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
if (recaptchaSitekey != null) {
|
|
||||||
const head = document.getElementsByTagName('head')[0];
|
|
||||||
const script = document.createElement('script');
|
|
||||||
script.setAttribute('src', 'https://www.google.com/recaptcha/api.js');
|
|
||||||
head.appendChild(script);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,51 +1,22 @@
|
|||||||
declare const _HOST_: string;
|
|
||||||
declare const _HOSTNAME_: string;
|
|
||||||
declare const _URL_: string;
|
|
||||||
declare const _NAME_: string;
|
|
||||||
declare const _DESCRIPTION_: string;
|
|
||||||
declare const _API_URL_: string;
|
|
||||||
declare const _WS_URL_: string;
|
|
||||||
declare const _DOCS_URL_: string;
|
|
||||||
declare const _STATS_URL_: string;
|
|
||||||
declare const _STATUS_URL_: string;
|
|
||||||
declare const _DEV_URL_: string;
|
|
||||||
declare const _REPOSITORY_URL_: string;
|
|
||||||
declare const _FEEDBACK_URL_: string;
|
|
||||||
declare const _LANG_: string;
|
declare const _LANG_: string;
|
||||||
declare const _LANGS_: string;
|
declare const _LANGS_: string;
|
||||||
declare const _RECAPTCHA_SITEKEY_: string;
|
|
||||||
declare const _SW_PUBLICKEY_: string;
|
|
||||||
declare const _THEME_COLOR_: string;
|
declare const _THEME_COLOR_: string;
|
||||||
declare const _COPYRIGHT_: string;
|
declare const _COPYRIGHT_: string;
|
||||||
declare const _VERSION_: string;
|
declare const _VERSION_: string;
|
||||||
declare const _CODENAME_: string;
|
declare const _CODENAME_: string;
|
||||||
declare const _LICENSE_: string;
|
declare const _LICENSE_: string;
|
||||||
declare const _GOOGLE_MAPS_API_KEY_: string;
|
|
||||||
declare const _WELCOME_BG_URL_: string;
|
|
||||||
declare const _TWITTER_INTEGRATION_: boolean;
|
|
||||||
|
|
||||||
export const host = _HOST_;
|
const address = new URL(location.href);
|
||||||
export const hostname = _HOSTNAME_;
|
|
||||||
export const url = _URL_;
|
export const host = address.host;
|
||||||
export const name = _NAME_;
|
export const hostname = address.hostname;
|
||||||
export const description = _DESCRIPTION_;
|
export const url = address.origin;
|
||||||
export const apiUrl = _API_URL_;
|
export const apiUrl = url + '/api';
|
||||||
export const wsUrl = _WS_URL_;
|
export const wsUrl = url.replace('http://', 'ws://').replace('https://', 'wss://');
|
||||||
export const docsUrl = _DOCS_URL_;
|
|
||||||
export const statsUrl = _STATS_URL_;
|
|
||||||
export const statusUrl = _STATUS_URL_;
|
|
||||||
export const devUrl = _DEV_URL_;
|
|
||||||
export const repositoryUrl = _REPOSITORY_URL_;
|
|
||||||
export const feedbackUrl = _FEEDBACK_URL_;
|
|
||||||
export const lang = _LANG_;
|
export const lang = _LANG_;
|
||||||
export const langs = _LANGS_;
|
export const langs = _LANGS_;
|
||||||
export const recaptchaSitekey = _RECAPTCHA_SITEKEY_;
|
|
||||||
export const swPublickey = _SW_PUBLICKEY_;
|
|
||||||
export const themeColor = _THEME_COLOR_;
|
export const themeColor = _THEME_COLOR_;
|
||||||
export const copyright = _COPYRIGHT_;
|
export const copyright = _COPYRIGHT_;
|
||||||
export const version = _VERSION_;
|
export const version = _VERSION_;
|
||||||
export const codename = _CODENAME_;
|
export const codename = _CODENAME_;
|
||||||
export const license = _LICENSE_;
|
export const license = _LICENSE_;
|
||||||
export const googleMapsApiKey = _GOOGLE_MAPS_API_KEY_;
|
|
||||||
export const welcomeBgUrl = _WELCOME_BG_URL_;
|
|
||||||
export const twitterIntegration = _TWITTER_INTEGRATION_;
|
|
||||||
|
@ -193,7 +193,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
clearNotification() {
|
clearNotification() {
|
||||||
this.unreadCount = 0;
|
this.unreadCount = 0;
|
||||||
document.title = config.name;
|
document.title = (this as any).os.instanceName;
|
||||||
},
|
},
|
||||||
|
|
||||||
onVisibilitychange() {
|
onVisibilitychange() {
|
||||||
|
@ -4,11 +4,10 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `${config.name} - %i18n:@title%`;
|
document.title = `${(this as any).os.instanceName} - %i18n:@title%`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
@ -17,7 +16,7 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = config.name;
|
document.title = (this as any).os.instanceName;
|
||||||
|
|
||||||
Progress.start();
|
Progress.start();
|
||||||
},
|
},
|
||||||
|
@ -12,12 +12,11 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: config.name,
|
name: (this as any).os.instanceName,
|
||||||
posted: false,
|
posted: false,
|
||||||
text: new URLSearchParams(location.search).get('text')
|
text: new URLSearchParams(location.search).get('text')
|
||||||
};
|
};
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<template v-if="$store.state.device.darkmode">%fa:moon%</template>
|
<template v-if="$store.state.device.darkmode">%fa:moon%</template>
|
||||||
<template v-else>%fa:R moon%</template>
|
<template v-else>%fa:R moon%</template>
|
||||||
</button>
|
</button>
|
||||||
<div class="body" :style="{ backgroundImage: `url('${ welcomeBgUrl }')` }">
|
<div class="body">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span><b>{{ host }}</b></span>
|
<span><b>{{ host }}</b></span>
|
||||||
@ -46,22 +46,26 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { host, name, description, copyright, welcomeBgUrl } from '../../../config';
|
import { host, copyright } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
stats: null,
|
stats: null,
|
||||||
copyright,
|
copyright,
|
||||||
welcomeBgUrl,
|
|
||||||
host,
|
host,
|
||||||
name,
|
name: 'Misskey',
|
||||||
description,
|
description: '',
|
||||||
pointerInterval: null,
|
pointerInterval: null,
|
||||||
tags: []
|
tags: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
(this as any).os.getMeta().then(meta => {
|
||||||
|
this.name = meta.name;
|
||||||
|
this.description = meta.description;
|
||||||
|
});
|
||||||
|
|
||||||
(this as any).api('stats').then(stats => {
|
(this as any).api('stats').then(stats => {
|
||||||
this.stats = stats;
|
this.stats = stats;
|
||||||
});
|
});
|
||||||
|
@ -70,6 +70,10 @@ export default class MiOS extends EventEmitter {
|
|||||||
chachedAt: Date;
|
chachedAt: Date;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public get instanceName() {
|
||||||
|
return this.meta ? this.meta.data.name : 'Misskey';
|
||||||
|
}
|
||||||
|
|
||||||
private isMetaFetching = false;
|
private isMetaFetching = false;
|
||||||
|
|
||||||
public app: Vue;
|
public app: Vue;
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import getNoteSummary from '../../../../../misc/get-note-summary';
|
import getNoteSummary from '../../../../../misc/get-note-summary';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
const displayLimit = 30;
|
const displayLimit = 30;
|
||||||
|
|
||||||
@ -190,7 +189,7 @@ export default Vue.extend({
|
|||||||
|
|
||||||
clearNotification() {
|
clearNotification() {
|
||||||
this.unreadCount = 0;
|
this.unreadCount = 0;
|
||||||
document.title = config.name;
|
document.title = (this as any).os.instanceName;
|
||||||
},
|
},
|
||||||
|
|
||||||
onVisibilitychange() {
|
onVisibilitychange() {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<button class="nav" @click="$parent.isDrawerOpening = true">%fa:bars%</button>
|
<button class="nav" @click="$parent.isDrawerOpening = true">%fa:bars%</button>
|
||||||
<template v-if="hasUnreadNotification || hasUnreadMessagingMessage || hasGameInvitation">%fa:circle%</template>
|
<template v-if="hasUnreadNotification || hasUnreadMessagingMessage || hasGameInvitation">%fa:circle%</template>
|
||||||
<h1>
|
<h1>
|
||||||
<slot>config.name</slot>
|
<slot>{{ os.instanceName }}</slot>
|
||||||
</h1>
|
</h1>
|
||||||
<slot name="func"></slot>
|
<slot name="func"></slot>
|
||||||
</div>
|
</div>
|
||||||
@ -20,13 +20,11 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as anime from 'animejs';
|
import * as anime from 'animejs';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['func'],
|
props: ['func'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
config,
|
|
||||||
hasGameInvitation: false,
|
hasGameInvitation: false,
|
||||||
connection: null,
|
connection: null,
|
||||||
connectionId: null
|
connectionId: null
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -44,7 +43,7 @@ export default Vue.extend({
|
|||||||
window.addEventListener('popstate', this.onPopState);
|
window.addEventListener('popstate', this.onPopState);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `${config.name} Drive`;
|
document.title = `${(this as any).os.instanceName} Drive`;
|
||||||
document.documentElement.style.background = '#fff';
|
document.documentElement.style.background = '#fff';
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -64,7 +63,7 @@ export default Vue.extend({
|
|||||||
(this.$refs as any).browser.openContextMenu();
|
(this.$refs as any).browser.openContextMenu();
|
||||||
},
|
},
|
||||||
onMoveRoot(silent) {
|
onMoveRoot(silent) {
|
||||||
const title = `${config.name} Drive`;
|
const title = `${(this as any).os.instanceName} Drive`;
|
||||||
|
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
// Rewrite URL
|
// Rewrite URL
|
||||||
@ -77,7 +76,7 @@ export default Vue.extend({
|
|||||||
this.folder = null;
|
this.folder = null;
|
||||||
},
|
},
|
||||||
onOpenFolder(folder, silent) {
|
onOpenFolder(folder, silent) {
|
||||||
const title = `${folder.name} | ${config.name} Drive`;
|
const title = `${folder.name} | ${(this as any).os.instanceName} Drive`;
|
||||||
|
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
// Rewrite URL
|
// Rewrite URL
|
||||||
@ -90,7 +89,7 @@ export default Vue.extend({
|
|||||||
this.folder = folder;
|
this.folder = folder;
|
||||||
},
|
},
|
||||||
onOpenFile(file, silent) {
|
onOpenFile(file, silent) {
|
||||||
const title = `${file.name} | ${config.name} Drive`;
|
const title = `${file.name} | ${(this as any).os.instanceName} Drive`;
|
||||||
|
|
||||||
if (!silent) {
|
if (!silent) {
|
||||||
// Rewrite URL
|
// Rewrite URL
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -29,7 +28,7 @@ export default Vue.extend({
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `${config.name} | %i18n:@notifications%`;
|
document.title = `${(this as any).os.instanceName} | %i18n:@notifications%`;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetch() {
|
fetch() {
|
||||||
|
@ -21,7 +21,6 @@ import Vue from 'vue';
|
|||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import parseAcct from '../../../../../misc/acct/parse';
|
import parseAcct from '../../../../../misc/acct/parse';
|
||||||
import getUserName from '../../../../../misc/get-user-name';
|
import getUserName from '../../../../../misc/get-user-name';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -50,7 +49,7 @@ export default Vue.extend({
|
|||||||
this.user = user;
|
this.user = user;
|
||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
|
|
||||||
document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + config.name;
|
document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + (this as any).os.instanceName;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoaded() {
|
onLoaded() {
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import parseAcct from '../../../../../misc/acct/parse';
|
import parseAcct from '../../../../../misc/acct/parse';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -49,7 +48,7 @@ export default Vue.extend({
|
|||||||
this.user = user;
|
this.user = user;
|
||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
|
|
||||||
document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + config.name;
|
document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + (this as any).os.instanceName;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoaded() {
|
onLoaded() {
|
||||||
|
@ -7,11 +7,10 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as config from '../../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `${config.name} %i18n:@reversi%`;
|
document.title = `${(this as any).os.instanceName} %i18n:@reversi%`;
|
||||||
document.documentElement.style.background = '#fff';
|
document.documentElement.style.background = '#fff';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import XTl from './home.timeline.vue';
|
import XTl from './home.timeline.vue';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
@ -97,7 +96,7 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = config.name;
|
document.title = (this as any).os.instanceName;
|
||||||
|
|
||||||
Progress.start();
|
Progress.start();
|
||||||
|
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import parseAcct from '../../../../../misc/acct/parse';
|
import parseAcct from '../../../../../misc/acct/parse';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -48,7 +47,7 @@ export default Vue.extend({
|
|||||||
this.user = user;
|
this.user = user;
|
||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
|
|
||||||
document.title = `%i18n:@messaging%: ${Vue.filter('userName')(this.user)} | ${config.name}`;
|
document.title = `%i18n:@messaging%: ${Vue.filter('userName')(this.user)} | ${(this as any).os.instanceName}`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,10 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import getAcct from '../../../../../misc/acct/render';
|
import getAcct from '../../../../../misc/acct/render';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `${config.name} %i18n:@messaging%`;
|
document.title = `${(this as any).os.instanceName} %i18n:@messaging%`;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
navigate(user) {
|
navigate(user) {
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -32,7 +31,7 @@ export default Vue.extend({
|
|||||||
this.fetch();
|
this.fetch();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = config.name;
|
document.title = (this as any).os.instanceName;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetch() {
|
fetch() {
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
const limit = 20;
|
const limit = 20;
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ export default Vue.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = `%i18n:@search%: ${this.q} | ${config.name}`;
|
document.title = `%i18n:@search%: ${this.q} | ${(this as any).os.instanceName}`;
|
||||||
|
|
||||||
this.fetch();
|
this.fetch();
|
||||||
},
|
},
|
||||||
|
@ -12,12 +12,11 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name: config.name,
|
name: (this as any).os.instanceName,
|
||||||
posted: false,
|
posted: false,
|
||||||
text: new URLSearchParams(location.search).get('text')
|
text: new URLSearchParams(location.search).get('text')
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,6 @@ import * as age from 's-age';
|
|||||||
import parseAcct from '../../../../../misc/acct/parse';
|
import parseAcct from '../../../../../misc/acct/parse';
|
||||||
import Progress from '../../../common/scripts/loading';
|
import Progress from '../../../common/scripts/loading';
|
||||||
import XHome from './user/home.vue';
|
import XHome from './user/home.vue';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
@ -107,7 +106,7 @@ export default Vue.extend({
|
|||||||
this.fetching = false;
|
this.fetching = false;
|
||||||
|
|
||||||
Progress.done();
|
Progress.done();
|
||||||
document.title = Vue.filter('userName')(this.user) + ' | ' + config.name;
|
document.title = Vue.filter('userName')(this.user) + ' | ' + (this as any).os.instanceName;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { apiUrl, copyright, host, name, description } from '../../../config';
|
import { apiUrl, copyright, host } from '../../../config';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
data() {
|
data() {
|
||||||
@ -39,12 +39,17 @@ export default Vue.extend({
|
|||||||
copyright,
|
copyright,
|
||||||
stats: null,
|
stats: null,
|
||||||
host,
|
host,
|
||||||
name,
|
name: 'Misskey',
|
||||||
description,
|
description: '',
|
||||||
tags: []
|
tags: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
(this as any).os.getMeta().then(meta => {
|
||||||
|
this.name = meta.name;
|
||||||
|
this.description = meta.description;
|
||||||
|
});
|
||||||
|
|
||||||
(this as any).api('stats').then(stats => {
|
(this as any).api('stats').then(stats => {
|
||||||
this.stats = stats;
|
this.stats = stats;
|
||||||
});
|
});
|
||||||
|
@ -53,7 +53,6 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import * as XDraggable from 'vuedraggable';
|
import * as XDraggable from 'vuedraggable';
|
||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
import * as config from '../../../config';
|
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
components: {
|
components: {
|
||||||
@ -103,7 +102,7 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
document.title = config.name;
|
document.title = (this as any).os.instanceName;
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -20,6 +20,9 @@ export default () => new Promise(async (res, rej) => {
|
|||||||
version: pkg.version,
|
version: pkg.version,
|
||||||
clientVersion: client.version,
|
clientVersion: client.version,
|
||||||
|
|
||||||
|
name: config.name || 'Misskey',
|
||||||
|
description: config.description,
|
||||||
|
|
||||||
secure: config.https != null,
|
secure: config.https != null,
|
||||||
machine: os.hostname(),
|
machine: os.hostname(),
|
||||||
os: os.platform(),
|
os: os.platform(),
|
||||||
@ -29,6 +32,8 @@ export default () => new Promise(async (res, rej) => {
|
|||||||
cores: os.cpus().length
|
cores: os.cpus().length
|
||||||
},
|
},
|
||||||
broadcasts: meta.broadcasts,
|
broadcasts: meta.broadcasts,
|
||||||
disableRegistration: meta.disableRegistration
|
disableRegistration: meta.disableRegistration,
|
||||||
|
recaptchaSitekey: config.recaptcha ? config.recaptcha.site_key : null,
|
||||||
|
swPublickey: config.sw ? config.sw.public_key : null
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -16,7 +16,6 @@ import I18nReplacer from './src/misc/i18n';
|
|||||||
import { pattern as i18nPattern, replacement as i18nReplacement } from './webpack/i18n';
|
import { pattern as i18nPattern, replacement as i18nReplacement } from './webpack/i18n';
|
||||||
import { pattern as faPattern, replacement as faReplacement } from './src/misc/fa';
|
import { pattern as faPattern, replacement as faReplacement } from './src/misc/fa';
|
||||||
const constants = require('./src/const.json');
|
const constants = require('./src/const.json');
|
||||||
import config from './src/config';
|
|
||||||
import { licenseHtml } from './src/misc/license';
|
import { licenseHtml } from './src/misc/license';
|
||||||
|
|
||||||
const locales = require('./locales');
|
const locales = require('./locales');
|
||||||
@ -58,8 +57,6 @@ const isProduction = process.env.NODE_ENV == 'production';
|
|||||||
const entry = {
|
const entry = {
|
||||||
desktop: './src/client/app/desktop/script.ts',
|
desktop: './src/client/app/desktop/script.ts',
|
||||||
mobile: './src/client/app/mobile/script.ts',
|
mobile: './src/client/app/mobile/script.ts',
|
||||||
//stats: './src/client/app/stats/script.ts',
|
|
||||||
//status: './src/client/app/status/script.ts',
|
|
||||||
dev: './src/client/app/dev/script.ts',
|
dev: './src/client/app/dev/script.ts',
|
||||||
auth: './src/client/app/auth/script.ts',
|
auth: './src/client/app/auth/script.ts',
|
||||||
sw: './src/client/app/sw.js'
|
sw: './src/client/app/sw.js'
|
||||||
@ -72,31 +69,13 @@ const output = {
|
|||||||
|
|
||||||
//#region Define consts
|
//#region Define consts
|
||||||
const consts = {
|
const consts = {
|
||||||
_RECAPTCHA_SITEKEY_: config.recaptcha ? config.recaptcha.site_key : null,
|
|
||||||
_SW_PUBLICKEY_: config.sw ? config.sw.public_key : null,
|
|
||||||
_THEME_COLOR_: constants.themeColor,
|
_THEME_COLOR_: constants.themeColor,
|
||||||
_COPYRIGHT_: constants.copyright,
|
_COPYRIGHT_: constants.copyright,
|
||||||
_VERSION_: version,
|
_VERSION_: version,
|
||||||
_CODENAME_: codename,
|
_CODENAME_: codename,
|
||||||
_STATUS_URL_: config.status_url,
|
|
||||||
_STATS_URL_: config.stats_url,
|
|
||||||
_DOCS_URL_: config.docs_url,
|
|
||||||
_API_URL_: config.api_url,
|
|
||||||
_WS_URL_: config.ws_url,
|
|
||||||
_DEV_URL_: config.dev_url,
|
|
||||||
_REPOSITORY_URL_: config.maintainer.repository_url,
|
|
||||||
_FEEDBACK_URL_: config.maintainer.feedback_url,
|
|
||||||
_LANG_: '%lang%',
|
_LANG_: '%lang%',
|
||||||
_LANGS_: Object.keys(locales).map(l => [l, locales[l].meta.lang]),
|
_LANGS_: Object.keys(locales).map(l => [l, locales[l].meta.lang]),
|
||||||
_NAME_: config.name,
|
_LICENSE_: licenseHtml
|
||||||
_DESCRIPTION_: config.description,
|
|
||||||
_HOST_: config.host,
|
|
||||||
_HOSTNAME_: config.hostname,
|
|
||||||
_URL_: config.url,
|
|
||||||
_LICENSE_: licenseHtml,
|
|
||||||
_GOOGLE_MAPS_API_KEY_: config.google_maps_api_key,
|
|
||||||
_WELCOME_BG_URL_: config.welcome_bg_url,
|
|
||||||
_TWITTER_INTEGRATION_: config.twitter != null
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const _consts: { [ key: string ]: any } = {};
|
const _consts: { [ key: string ]: any } = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user