mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Made the animation working again :)
This commit is contained in:
parent
2faaf3941c
commit
d9c6cec16e
@ -33,12 +33,21 @@ const {
|
||||
|
||||
const orgNameAnimation = ref(null);
|
||||
|
||||
onMounted(() => {
|
||||
gsap.to(orgNameAnimation.value, {
|
||||
duration: 1,
|
||||
scrambleText: fetchNewsOrgInfo.value?.title,
|
||||
});
|
||||
});
|
||||
watch(
|
||||
() => fetchNewsOrgInfo.value,
|
||||
(newValue) => {
|
||||
if (newValue?.title) {
|
||||
nextTick(() => {
|
||||
gsap.to(orgNameAnimation.value, {
|
||||
duration: 1,
|
||||
scrambleText: newValue.title,
|
||||
ease: "none",
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
@ -52,7 +61,10 @@ onMounted(() => {
|
||||
draggable="false"
|
||||
/>
|
||||
<div class="flex flex-col gap-3 text-left">
|
||||
<h1 class="text-4xl font-bold m-3 text-left">
|
||||
<h1
|
||||
class="text-4xl font-bold m-3 text-left"
|
||||
ref="orgNameAnimation"
|
||||
>
|
||||
{{ fetchNewsOrgInfo?.title }}
|
||||
</h1>
|
||||
<span class="text-ms m-1 mt-5 text-left text-wrap">{{
|
||||
|
@ -28,9 +28,9 @@ const {
|
||||
lang: locale,
|
||||
},
|
||||
});
|
||||
if (error) {
|
||||
if (error === null) {
|
||||
eerrrroorr.value = true;
|
||||
errorMsg.value = error.value.message;
|
||||
errorMsg.value = error.value;
|
||||
}
|
||||
|
||||
async function getImageSource(image: string) {
|
||||
|
@ -15,10 +15,15 @@ services:
|
||||
newsanalyze-service:
|
||||
image: ghcr.io/hpware/news-analyze:master
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
|
||||
interval: 1m
|
||||
timeout: 10s
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
"wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1",
|
||||
]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
networks:
|
||||
- web
|
||||
labels:
|
||||
|
Loading…
x
Reference in New Issue
Block a user