Resolve #2698
This commit is contained in:
@ -14,6 +14,14 @@
|
||||
</div>
|
||||
|
||||
<div class="form">
|
||||
<div>
|
||||
<label>
|
||||
<p>%i18n:@banner-url%</p>
|
||||
<input v-model="bannerUrl">
|
||||
</label>
|
||||
<button class="ui" @click="updateMeta">%i18n:@save%</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label>
|
||||
<input type="checkbox" v-model="disableRegistration" @change="updateMeta">
|
||||
@ -46,6 +54,7 @@ export default Vue.extend({
|
||||
stats: null,
|
||||
disableRegistration: false,
|
||||
disableLocalTimeline: false,
|
||||
bannerUrl: null,
|
||||
inviteCode: null,
|
||||
connection: null,
|
||||
connectionId: null
|
||||
@ -58,6 +67,7 @@ export default Vue.extend({
|
||||
(this as any).os.getMeta().then(meta => {
|
||||
this.disableRegistration = meta.disableRegistration;
|
||||
this.disableLocalTimeline = meta.disableLocalTimeline;
|
||||
this.bannerUrl = meta.bannerUrl;
|
||||
});
|
||||
|
||||
(this as any).api('stats').then(stats => {
|
||||
@ -76,7 +86,8 @@ export default Vue.extend({
|
||||
updateMeta() {
|
||||
(this as any).api('admin/update-meta', {
|
||||
disableRegistration: this.disableRegistration,
|
||||
disableLocalTimeline: this.disableLocalTimeline
|
||||
disableLocalTimeline: this.disableLocalTimeline,
|
||||
bannerUrl: this.bannerUrl
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -114,6 +125,7 @@ export default Vue.extend({
|
||||
|
||||
> .form
|
||||
> div
|
||||
padding 16px
|
||||
border-bottom solid 1px #eee
|
||||
|
||||
</style>
|
||||
|
@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div class="mk-welcome">
|
||||
<div class="banner" :style="{ backgroundImage: banner ? `url(${banner})` : null }"></div>
|
||||
|
||||
<button @click="dark">
|
||||
<template v-if="$store.state.device.darkmode">%fa:moon%</template>
|
||||
<template v-else>%fa:R moon%</template>
|
||||
@ -154,6 +156,7 @@ export default Vue.extend({
|
||||
return {
|
||||
meta: null,
|
||||
stats: null,
|
||||
banner: null,
|
||||
copyright,
|
||||
host,
|
||||
name: 'Misskey',
|
||||
@ -169,6 +172,7 @@ export default Vue.extend({
|
||||
this.name = meta.name;
|
||||
this.description = meta.description;
|
||||
this.announcements = meta.broadcasts;
|
||||
this.banner = meta.bannerUrl;
|
||||
});
|
||||
|
||||
(this as any).api('stats').then(stats => {
|
||||
@ -308,6 +312,26 @@ root(isDark)
|
||||
//background-position center
|
||||
//background-size cover
|
||||
|
||||
> .banner
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
width 100%
|
||||
height 400px
|
||||
background-position center
|
||||
background-size cover
|
||||
opacity 0.7
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
position absolute
|
||||
bottom 0
|
||||
left 0
|
||||
width 100%
|
||||
height 100px
|
||||
background linear-gradient(transparent, isDark ? #191b22 : #f7f7f7)
|
||||
|
||||
> .forkit
|
||||
position absolute
|
||||
top 0
|
||||
|
@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<div class="wgwfgvvimdjvhjfwxropcwksnzftjqes">
|
||||
<div class="banner" :style="{ backgroundImage: banner ? `url(${banner})` : null }"></div>
|
||||
|
||||
<div>
|
||||
<img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name">
|
||||
<p class="host">{{ host }}</p>
|
||||
@ -80,6 +82,7 @@ export default Vue.extend({
|
||||
meta: null,
|
||||
copyright,
|
||||
stats: null,
|
||||
banner: null,
|
||||
host,
|
||||
name: 'Misskey',
|
||||
description: '',
|
||||
@ -93,6 +96,7 @@ export default Vue.extend({
|
||||
this.name = meta.name;
|
||||
this.description = meta.description;
|
||||
this.announcements = meta.broadcasts;
|
||||
this.banner = meta.bannerUrl;
|
||||
});
|
||||
|
||||
(this as any).api('stats').then(stats => {
|
||||
@ -121,7 +125,27 @@ root(isDark)
|
||||
text-align center
|
||||
//background #fff
|
||||
|
||||
> div
|
||||
> .banner
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
width 100%
|
||||
height 300px
|
||||
background-position center
|
||||
background-size cover
|
||||
opacity 0.7
|
||||
|
||||
&:after
|
||||
content ""
|
||||
display block
|
||||
position absolute
|
||||
bottom 0
|
||||
left 0
|
||||
width 100%
|
||||
height 100px
|
||||
background linear-gradient(transparent, isDark ? #191b22 : #f7f7f7)
|
||||
|
||||
> div:not(.banner)
|
||||
padding 32px
|
||||
margin 0 auto
|
||||
max-width 500px
|
||||
|
Reference in New Issue
Block a user