add: loading and empty status componments

This commit is contained in:
Hakadao
2022-04-19 03:02:43 +08:00
parent 8ee8fdd11e
commit 96833946a8
5 changed files with 33 additions and 1 deletions

BIN
extension/assets/empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

9
src/components/Empty.vue Normal file
View File

@@ -0,0 +1,9 @@
<script setup lang="ts">
const emptyImg = browser.runtime.getURL('/assets/empty.png')
</script>
<template>
<div flex="~" justify="center" items="center">
<img :src="emptyImg" w="200px" h="auto">
</div>
</template>

View File

@@ -0,0 +1,23 @@
<script setup lang="ts">
const imgURL = browser.runtime.getURL('/assets/loading.gif')
</script>
<template>
<div
w="full"
h="46px"
p="y-8"
flex="~"
justify="center"
items="center"
>
<img
:src="imgURL"
alt="loading"
w="46px"
h="46px"
m="r-2"
/>
{{ $t('home.loading_more') }}
</div>
</template>

View File

@@ -45,7 +45,7 @@ export async function getManifest() {
js: ['./dist/contentScripts/index.global.js'],
},
],
web_accessible_resources: ['dist/contentScripts/style.css'],
web_accessible_resources: ['dist/contentScripts/style.css', 'assets/*'],
}
if (isDev) {