From 0bd3e8f240ce37110dc9198b904c8747815d0504 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Mon, 21 Nov 2022 21:08:03 -0800 Subject: [PATCH] ??? --- package.json | 2 +- packages/client/src/pages/page.vue | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f88b5d93c..1532145b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "12.119.0-calc.16.10", + "version": "12.119.0-calc.16.11", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/client/src/pages/page.vue b/packages/client/src/pages/page.vue index faeaa27a5..6f3fd40c2 100644 --- a/packages/client/src/pages/page.vue +++ b/packages/client/src/pages/page.vue @@ -107,14 +107,18 @@ function fetchPage() { username: props.username, }).then(_page => { page = _page; - if (_page.eyeCatchingImage != null) { - bgImg = `url(${_page.eyeCatchingImage.url})`; - } + getBgImg(); }).catch(err => { error = err; }); } +function getBgImg() { + if (page.eyeCatchingImage != null) { + bgImg = `url(${page.eyeCatchingImage.url})`; + } +} + function share() { navigator.share({ title: page.title ?? page.name, @@ -130,7 +134,7 @@ function shareWithNote() { } function like() { - os.apiWithDialog('pages/like', { + os.api('pages/like', { pageId: page.id, }).then(() => { page.isLiked = true; @@ -158,7 +162,7 @@ function pin(pin) { }); } -watch(() => path, fetchPage, bgImg, { immediate: true }); +watch(() => path, fetchPage, { immediate: true }); const headerActions = $computed(() => []);