better info

This commit is contained in:
lilydjwg 2021-10-06 23:20:06 +08:00
parent 7c0fe6b022
commit 0858561edd

View File

@ -145,11 +145,17 @@
<div class="error">{error}</div>
{/if}
{#if loading}
<div id="loading"><p>正在加载...</p></div>
{:else if result && result.has_more}
<div id="more"><button on:click={do_search_more}>加载更多</button></div>
{/if}
<div class="info">
{#if loading}
<p>正在加载...</p>
{:else if result && result.has_more}
<button on:click={do_search_more}>加载更多</button>
{:else if result && !result.has_more}
<p>到底了。</p>
{:else if result && result.messages.length == 0}
<p>没有匹配的消息。</p>
{/if}
</div>
</main>
<style>
@ -178,16 +184,16 @@
text-align: center;
}
#loading, #more {
.info {
display: flex;
justify-content: center;
}
#loading > * {
border: 1px #bfbfbf solid;
border-radius: 2em;
}
#loading > *, #more > * {
.info > * {
padding: 0.5em 1em;
margin: 1em 0;
}
.info > p {
border: 1px #bfbfbf solid;
border-radius: 2em;
}
</style>