mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-11-24 23:26:07 +09:00
[Client] Improve error screen rendering
This commit is contained in:
parent
f47e9d7978
commit
bbb2650032
@ -52,7 +52,7 @@ common:
|
|||||||
no-apps: "No apps"
|
no-apps: "No apps"
|
||||||
|
|
||||||
mk-error:
|
mk-error:
|
||||||
title: "Cannot connect to the server"
|
title: "Unable to connect to the server"
|
||||||
description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから再度お試しください。"
|
description: "インターネット回線に問題があるか、サーバーがダウンまたはメンテナンスしている可能性があります。しばらくしてから再度お試しください。"
|
||||||
thanks: "Thank you for using Misskey."
|
thanks: "Thank you for using Misskey."
|
||||||
|
|
||||||
|
@ -1,36 +1,25 @@
|
|||||||
<mk-error>
|
<mk-error>
|
||||||
<!--i: i.fa.fa-times-circle-->
|
|
||||||
<img src="/assets/error.jpg" alt=""/>
|
<img src="/assets/error.jpg" alt=""/>
|
||||||
<h1>%i18n:common.tags.mk-error.title%</h1>
|
<h1>%i18n:common.tags.mk-error.title%</h1>
|
||||||
<p class="text">%i18n:common.tags.mk-error.description%</p>
|
<p class="text">%i18n:common.tags.mk-error.description%</p>
|
||||||
<p class="thanks">%i18n:common.tags.mk-error.thanks%</p>
|
<p class="thanks">%i18n:common.tags.mk-error.thanks%</p>
|
||||||
<style>
|
<style>
|
||||||
:scope
|
:scope
|
||||||
position fixed
|
display block
|
||||||
z-index 100000
|
|
||||||
top 0
|
|
||||||
left 0
|
|
||||||
width 100%
|
width 100%
|
||||||
height 100%
|
padding 32px 18px
|
||||||
text-align center
|
text-align center
|
||||||
background #f8f8f8
|
|
||||||
|
|
||||||
> i
|
|
||||||
display block
|
|
||||||
margin-top 64px
|
|
||||||
font-size 5em
|
|
||||||
color #6998a0
|
|
||||||
|
|
||||||
> img
|
> img
|
||||||
display block
|
display block
|
||||||
height 200px
|
height 200px
|
||||||
margin 64px auto 0 auto
|
margin 0 auto
|
||||||
pointer-events none
|
pointer-events none
|
||||||
user-select none
|
user-select none
|
||||||
|
|
||||||
> h1
|
> h1
|
||||||
display block
|
display block
|
||||||
margin 32px auto 16px auto
|
margin 1.25em auto 0.65em auto
|
||||||
font-size 1.5em
|
font-size 1.5em
|
||||||
color #555
|
color #555
|
||||||
|
|
||||||
@ -43,13 +32,25 @@
|
|||||||
|
|
||||||
> .thanks
|
> .thanks
|
||||||
display block
|
display block
|
||||||
margin 32px auto 0 auto
|
margin 2em auto 0 auto
|
||||||
padding 32px 0 32px 0
|
padding 2em 0 0 0
|
||||||
max-width 600px
|
max-width 600px
|
||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
font-style oblique
|
font-style oblique
|
||||||
color #aaa
|
color #aaa
|
||||||
border-top solid 1px #eee
|
border-top solid 1px #eee
|
||||||
|
|
||||||
|
@media (max-width 500px)
|
||||||
|
padding 24px 18px
|
||||||
|
font-size 80%
|
||||||
|
|
||||||
|
> img
|
||||||
|
height 150px
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
<script>
|
||||||
|
this.on('mount', () => {
|
||||||
|
document.documentElement.style.background = '#f8f8f8';
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</mk-error>
|
</mk-error>
|
||||||
|
@ -9,6 +9,7 @@ import api from './common/scripts/api';
|
|||||||
import signout from './common/scripts/signout';
|
import signout from './common/scripts/signout';
|
||||||
import checkForUpdate from './common/scripts/check-for-update';
|
import checkForUpdate from './common/scripts/check-for-update';
|
||||||
import Connection from './common/scripts/home-stream';
|
import Connection from './common/scripts/home-stream';
|
||||||
|
import Progress from './common/scripts/loading';
|
||||||
import mixin from './common/mixins';
|
import mixin from './common/mixins';
|
||||||
import generateDefaultUserdata from './common/scripts/generate-default-userdata';
|
import generateDefaultUserdata from './common/scripts/generate-default-userdata';
|
||||||
import CONFIG from './common/scripts/config';
|
import CONFIG from './common/scripts/config';
|
||||||
@ -147,9 +148,10 @@ function fetchme(token, cb) {
|
|||||||
me.data ? done() : init();
|
me.data ? done() : init();
|
||||||
});
|
});
|
||||||
}, () => { // When failure
|
}, () => { // When failure
|
||||||
// Display error screen
|
// Render the error screen
|
||||||
riot.mount(document.body.appendChild(
|
document.body.innerHTML = '<mk-error />';
|
||||||
document.createElement('mk-error')));
|
riot.mount('*');
|
||||||
|
Progress.done();
|
||||||
});
|
});
|
||||||
|
|
||||||
function done() {
|
function done() {
|
||||||
|
Loading…
Reference in New Issue
Block a user