mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 09:57:29 -07:00
bruh
This commit is contained in:
parent
bf33d98a10
commit
79298a4069
2 changed files with 9 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "12.119.0-calc.16.12",
|
||||
"version": "12.119.0-calc.16.13",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -87,9 +87,8 @@ const props = defineProps<{
|
|||
username: string;
|
||||
}>();
|
||||
|
||||
let bgImg = 'linear-gradient(to bottom right, #31748f, #9ccfd8)';
|
||||
|
||||
let page = $ref(null);
|
||||
let bgImg = $ref(null);
|
||||
let error = $ref(null);
|
||||
const otherPostsPagination = {
|
||||
endpoint: 'users/pages' as const,
|
||||
|
@ -107,15 +106,18 @@ function fetchPage() {
|
|||
username: props.username,
|
||||
}).then(_page => {
|
||||
page = _page;
|
||||
getBgImg();
|
||||
bgImg = getBgImg();
|
||||
}).catch(err => {
|
||||
error = err;
|
||||
});
|
||||
}
|
||||
|
||||
function getBgImg() {
|
||||
function getBgImg(): string {
|
||||
if (page.eyeCatchingImage != null) {
|
||||
bgImg = `url(${page.eyeCatchingImage.url})`;
|
||||
return `url(${page.eyeCatchingImage.url})`;
|
||||
}
|
||||
else {
|
||||
return 'linear-gradient(to bottom right, #31748f, #9ccfd8)'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,7 +165,6 @@ function pin(pin) {
|
|||
}
|
||||
|
||||
watch(() => path, fetchPage, { immediate: true });
|
||||
watch(() => bgImg, getBgImg, {});
|
||||
|
||||
const headerActions = $computed(() => []);
|
||||
|
||||
|
|
Loading…
Reference in a new issue