1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 06:18:40 +09:00

nanka iroior

This commit is contained in:
syuilo 2018-03-03 09:49:47 +09:00
parent 25c25233e2
commit 41c9426929
9 changed files with 41 additions and 19 deletions

1
.gitignore vendored
View File

@ -9,4 +9,3 @@ run.bat
api-docs.json
package-lock.json
version.json
/.cache-loader

View File

@ -85,7 +85,6 @@
"bcryptjs": "2.4.3",
"body-parser": "1.18.2",
"bootstrap-vue": "^2.0.0-rc.1",
"cache-loader": "1.2.0",
"cafy": "3.2.1",
"chai": "4.1.2",
"chai-http": "3.0.0",
@ -180,6 +179,7 @@
"typescript-eslint-parser": "13.0.0",
"uglify-es": "3.3.9",
"uglifyjs-webpack-plugin": "1.2.0",
"url-loader": "^0.6.2",
"uuid": "3.2.1",
"vhost": "3.0.2",
"vue": "2.5.13",

View File

@ -35,6 +35,7 @@
// Note: The default language is English
let lang = navigator.language.split('-')[0];
if (!/^(en|ja)$/.test(lang)) lang = 'en';
if (localStorage.getItem('lang')) lang = localStorage.getItem('lang');
// Detect the user agent
const ua = navigator.userAgent.toLowerCase();

View File

@ -157,6 +157,7 @@ export default Vue.extend({
> .label
margin-left 8px
display block
font-size 15px
cursor pointer
transition inherit
@ -168,7 +169,7 @@ export default Vue.extend({
> p
margin 0
font-size 90%
//font-size 90%
color #9daab3
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="info">
<p>Maintainer: <b>{{ meta.maintainer }}</b></p>
<p>Maintainer: <b><a :href="meta.maintainer.url" target="_blank">{{ meta.maintainer.name }}</a></b></p>
<p>Machine: {{ meta.machine }}</p>
<p>Node: {{ meta.node }}</p>
</div>

View File

@ -23,7 +23,20 @@
<div class="div">
<button class="ui button" @click="customizeHome">ホームをカスタマイズ</button>
</div>
<mk-switch v-model="showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
<mk-switch v-model="os.i.client_settings.showPostFormOnTopOfTl" @change="onChangeShowPostFormOnTopOfTl" text="タイムライン上部に投稿フォームを表示する"/>
</section>
<section class="web" v-show="page == 'web'">
<h1>言語</h1>
<el-select v-model="lang" placeholder="言語を選択">
<el-option-group label="推奨">
<el-option label="自動" value=""/>
</el-option-group>
<el-option-group label="言語を指定">
<el-option label="ja-JP" value="ja"/>
<el-option label="en-US" value="en"/>
</el-option-group>
</el-select>
</section>
<section class="web" v-show="page == 'web'">
@ -74,6 +87,11 @@
<x-api/>
</section>
<section class="other" v-show="page == 'other'">
<h1>Misskeyについて</h1>
<p v-if="meta">このサーバーの運営者: <i><a :href="meta.maintainer.url" target="_blank">{{ meta.maintainer.name }}</a></i></p>
</section>
<section class="other" v-show="page == 'other'">
<h1>Misskey Update</h1>
<p>
@ -134,12 +152,15 @@ export default Vue.extend({
version,
latestVersion: undefined,
checkingForUpdate: false,
showPostFormOnTopOfTl: false,
lang: localStorage.getItem('lang') || '',
debug: localStorage.getItem('debug') == 'true',
enableExperimental: localStorage.getItem('enableExperimental') == 'true'
};
},
watch: {
lang() {
localStorage.setItem('lang', this.lang);
},
debug() {
localStorage.setItem('debug', this.debug ? 'true' : 'false');
},
@ -153,18 +174,19 @@ export default Vue.extend({
}
},
created() {
this.meta = (this as any).os.getMeta();
this.showPostFormOnTopOfTl = (this as any).os.i.client_settings.showPostFormOnTopOfTl;
(this as any).os.getMeta().then(meta => {
this.meta = meta;
});
},
methods: {
customizeHome() {
this.$router.push('/i/customize-home');
this.$emit('done');
},
onChangeShowPostFormOnTopOfTl() {
onChangeShowPostFormOnTopOfTl(v) {
(this as any).api('i/update_client_setting', {
name: 'showPostFormOnTopOfTl',
value: this.showPostFormOnTopOfTl
value: v
});
},
checkForUpdate() {

View File

@ -99,7 +99,7 @@ export default Vue.extend({
position -webkit-sticky
position sticky
top 0
z-index 1024
z-index 1000
width 100%
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
@ -109,14 +109,13 @@ export default Vue.extend({
> .backdrop
position absolute
top 0
z-index 1023
z-index 1000
width 100%
height 48px
backdrop-filter blur(12px)
background #f7f7f7
> .main
z-index 1024
z-index 1001
margin 0
padding 0
background-clip content-box

View File

@ -431,7 +431,7 @@ export default Vue.extend({
> .bg
display block
position fixed
z-index 2048
z-index 2000
top 0
left 0
width 100%
@ -443,7 +443,7 @@ export default Vue.extend({
> .main
display block
position fixed
z-index 2048
z-index 2000
top 15%
left 0
margin 0
@ -526,7 +526,7 @@ export default Vue.extend({
> header
$header-height = 40px
z-index 128
z-index 1001
height $header-height
overflow hidden
white-space nowrap

View File

@ -60,7 +60,7 @@ module.exports = Object.keys(langs).map(lang => {
rules: [{
test: /\.vue$/,
exclude: /node_modules/,
use: ['cache-loader', {
use: [{
loader: 'vue-loader',
options: {
cssSourceMap: false,
@ -134,7 +134,7 @@ module.exports = Object.keys(langs).map(lang => {
]
}, {
test: /\.(eot|woff|woff2|svg|ttf)([\?]?.*)$/,
loader: 'file-loader'
loader: 'url-loader'
}, {
test: /\.ts$/,
exclude: /node_modules/,