mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-08 22:23:08 +02:00
nanka iroior
This commit is contained in:
parent
25c25233e2
commit
41c9426929
9 changed files with 41 additions and 19 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -9,4 +9,3 @@ run.bat
|
||||||
api-docs.json
|
api-docs.json
|
||||||
package-lock.json
|
package-lock.json
|
||||||
version.json
|
version.json
|
||||||
/.cache-loader
|
|
||||||
|
|
|
@ -85,7 +85,6 @@
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"body-parser": "1.18.2",
|
"body-parser": "1.18.2",
|
||||||
"bootstrap-vue": "^2.0.0-rc.1",
|
"bootstrap-vue": "^2.0.0-rc.1",
|
||||||
"cache-loader": "1.2.0",
|
|
||||||
"cafy": "3.2.1",
|
"cafy": "3.2.1",
|
||||||
"chai": "4.1.2",
|
"chai": "4.1.2",
|
||||||
"chai-http": "3.0.0",
|
"chai-http": "3.0.0",
|
||||||
|
@ -180,6 +179,7 @@
|
||||||
"typescript-eslint-parser": "13.0.0",
|
"typescript-eslint-parser": "13.0.0",
|
||||||
"uglify-es": "3.3.9",
|
"uglify-es": "3.3.9",
|
||||||
"uglifyjs-webpack-plugin": "1.2.0",
|
"uglifyjs-webpack-plugin": "1.2.0",
|
||||||
|
"url-loader": "^0.6.2",
|
||||||
"uuid": "3.2.1",
|
"uuid": "3.2.1",
|
||||||
"vhost": "3.0.2",
|
"vhost": "3.0.2",
|
||||||
"vue": "2.5.13",
|
"vue": "2.5.13",
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
// Note: The default language is English
|
// Note: The default language is English
|
||||||
let lang = navigator.language.split('-')[0];
|
let lang = navigator.language.split('-')[0];
|
||||||
if (!/^(en|ja)$/.test(lang)) lang = 'en';
|
if (!/^(en|ja)$/.test(lang)) lang = 'en';
|
||||||
|
if (localStorage.getItem('lang')) lang = localStorage.getItem('lang');
|
||||||
|
|
||||||
// Detect the user agent
|
// Detect the user agent
|
||||||
const ua = navigator.userAgent.toLowerCase();
|
const ua = navigator.userAgent.toLowerCase();
|
||||||
|
|
|
@ -157,6 +157,7 @@ export default Vue.extend({
|
||||||
> .label
|
> .label
|
||||||
margin-left 8px
|
margin-left 8px
|
||||||
display block
|
display block
|
||||||
|
font-size 15px
|
||||||
cursor pointer
|
cursor pointer
|
||||||
transition inherit
|
transition inherit
|
||||||
|
|
||||||
|
@ -168,7 +169,7 @@ export default Vue.extend({
|
||||||
|
|
||||||
> p
|
> p
|
||||||
margin 0
|
margin 0
|
||||||
font-size 90%
|
//font-size 90%
|
||||||
color #9daab3
|
color #9daab3
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="info">
|
<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>Machine: {{ meta.machine }}</p>
|
||||||
<p>Node: {{ meta.node }}</p>
|
<p>Node: {{ meta.node }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,7 +23,20 @@
|
||||||
<div class="div">
|
<div class="div">
|
||||||
<button class="ui button" @click="customizeHome">ホームをカスタマイズ</button>
|
<button class="ui button" @click="customizeHome">ホームをカスタマイズ</button>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<section class="web" v-show="page == 'web'">
|
<section class="web" v-show="page == 'web'">
|
||||||
|
@ -74,6 +87,11 @@
|
||||||
<x-api/>
|
<x-api/>
|
||||||
</section>
|
</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'">
|
<section class="other" v-show="page == 'other'">
|
||||||
<h1>Misskey Update</h1>
|
<h1>Misskey Update</h1>
|
||||||
<p>
|
<p>
|
||||||
|
@ -134,12 +152,15 @@ export default Vue.extend({
|
||||||
version,
|
version,
|
||||||
latestVersion: undefined,
|
latestVersion: undefined,
|
||||||
checkingForUpdate: false,
|
checkingForUpdate: false,
|
||||||
showPostFormOnTopOfTl: false,
|
lang: localStorage.getItem('lang') || '',
|
||||||
debug: localStorage.getItem('debug') == 'true',
|
debug: localStorage.getItem('debug') == 'true',
|
||||||
enableExperimental: localStorage.getItem('enableExperimental') == 'true'
|
enableExperimental: localStorage.getItem('enableExperimental') == 'true'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
lang() {
|
||||||
|
localStorage.setItem('lang', this.lang);
|
||||||
|
},
|
||||||
debug() {
|
debug() {
|
||||||
localStorage.setItem('debug', this.debug ? 'true' : 'false');
|
localStorage.setItem('debug', this.debug ? 'true' : 'false');
|
||||||
},
|
},
|
||||||
|
@ -153,18 +174,19 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.meta = (this as any).os.getMeta();
|
(this as any).os.getMeta().then(meta => {
|
||||||
this.showPostFormOnTopOfTl = (this as any).os.i.client_settings.showPostFormOnTopOfTl;
|
this.meta = meta;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
customizeHome() {
|
customizeHome() {
|
||||||
this.$router.push('/i/customize-home');
|
this.$router.push('/i/customize-home');
|
||||||
this.$emit('done');
|
this.$emit('done');
|
||||||
},
|
},
|
||||||
onChangeShowPostFormOnTopOfTl() {
|
onChangeShowPostFormOnTopOfTl(v) {
|
||||||
(this as any).api('i/update_client_setting', {
|
(this as any).api('i/update_client_setting', {
|
||||||
name: 'showPostFormOnTopOfTl',
|
name: 'showPostFormOnTopOfTl',
|
||||||
value: this.showPostFormOnTopOfTl
|
value: v
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkForUpdate() {
|
checkForUpdate() {
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default Vue.extend({
|
||||||
position -webkit-sticky
|
position -webkit-sticky
|
||||||
position sticky
|
position sticky
|
||||||
top 0
|
top 0
|
||||||
z-index 1024
|
z-index 1000
|
||||||
width 100%
|
width 100%
|
||||||
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
|
box-shadow 0 1px 1px rgba(0, 0, 0, 0.075)
|
||||||
|
|
||||||
|
@ -109,14 +109,13 @@ export default Vue.extend({
|
||||||
> .backdrop
|
> .backdrop
|
||||||
position absolute
|
position absolute
|
||||||
top 0
|
top 0
|
||||||
z-index 1023
|
z-index 1000
|
||||||
width 100%
|
width 100%
|
||||||
height 48px
|
height 48px
|
||||||
backdrop-filter blur(12px)
|
|
||||||
background #f7f7f7
|
background #f7f7f7
|
||||||
|
|
||||||
> .main
|
> .main
|
||||||
z-index 1024
|
z-index 1001
|
||||||
margin 0
|
margin 0
|
||||||
padding 0
|
padding 0
|
||||||
background-clip content-box
|
background-clip content-box
|
||||||
|
|
|
@ -431,7 +431,7 @@ export default Vue.extend({
|
||||||
> .bg
|
> .bg
|
||||||
display block
|
display block
|
||||||
position fixed
|
position fixed
|
||||||
z-index 2048
|
z-index 2000
|
||||||
top 0
|
top 0
|
||||||
left 0
|
left 0
|
||||||
width 100%
|
width 100%
|
||||||
|
@ -443,7 +443,7 @@ export default Vue.extend({
|
||||||
> .main
|
> .main
|
||||||
display block
|
display block
|
||||||
position fixed
|
position fixed
|
||||||
z-index 2048
|
z-index 2000
|
||||||
top 15%
|
top 15%
|
||||||
left 0
|
left 0
|
||||||
margin 0
|
margin 0
|
||||||
|
@ -526,7 +526,7 @@ export default Vue.extend({
|
||||||
> header
|
> header
|
||||||
$header-height = 40px
|
$header-height = 40px
|
||||||
|
|
||||||
z-index 128
|
z-index 1001
|
||||||
height $header-height
|
height $header-height
|
||||||
overflow hidden
|
overflow hidden
|
||||||
white-space nowrap
|
white-space nowrap
|
||||||
|
|
|
@ -60,7 +60,7 @@ module.exports = Object.keys(langs).map(lang => {
|
||||||
rules: [{
|
rules: [{
|
||||||
test: /\.vue$/,
|
test: /\.vue$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: ['cache-loader', {
|
use: [{
|
||||||
loader: 'vue-loader',
|
loader: 'vue-loader',
|
||||||
options: {
|
options: {
|
||||||
cssSourceMap: false,
|
cssSourceMap: false,
|
||||||
|
@ -134,7 +134,7 @@ module.exports = Object.keys(langs).map(lang => {
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
test: /\.(eot|woff|woff2|svg|ttf)([\?]?.*)$/,
|
test: /\.(eot|woff|woff2|svg|ttf)([\?]?.*)$/,
|
||||||
loader: 'file-loader'
|
loader: 'url-loader'
|
||||||
}, {
|
}, {
|
||||||
test: /\.ts$/,
|
test: /\.ts$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
|
|
Loading…
Reference in a new issue