Compare commits

...

2 commits

Author SHA1 Message Date
fdeab38203 hide empty ticker 2022-09-12 23:49:16 +00:00
f01cf0fbe0 private getter 2022-09-12 23:49:06 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
<TitleBar :title="title_html" />
<HelloWorld />
</v-main>
<TickerBar :content="ticker_html" />
<TickerBar v-if="ticker_html !== ''" :content="ticker_html" />
</v-app>
</template>

View file

@ -18,7 +18,7 @@ export default class TickerBar extends Vue {
@Prop({ required: true })
private readonly content!: string;
get marqueeDuration(): string {
private get marqueeDuration(): string {
// 10 seconds + another second per 7 chars
let dv = this.content ? Math.round(this.content.length / 7) : 0;
return 10 + dv + "s";