4 <p class="title is-4">{{ item.name }}</p>
5 <p class="subtitle is-6">
6 <template v-if="item.subtitle">
9 <template v-else-if="percentage">
10 {{ percentage }}% blocked
15 <div v-if="status" class="status" :class="status">
23 import service from "@/mixins/service.js";
24 import Generic from "./Generic.vue";
37 ads_percentage_today: 0,
40 percentage: function () {
41 if (this.ads_percentage_today) {
42 return this.ads_percentage_today.toFixed(1);
51 fetchStatus: async function () {
52 const result = await this.fetch("/api.php").catch((e) => console.log(e));
54 this.status = result.status;
55 this.ads_percentage_today = result.ads_percentage_today;
61 <style scoped lang="scss">
64 color: var(--text-title);
67 background-color: #94e185;
68 border-color: #78d965;
69 box-shadow: 0 0 5px 1px #94e185;
73 background-color: #c9404d;
74 border-color: #c42c3b;
75 box-shadow: 0 0 5px 1px #c9404d;
80 display: inline-block;
84 border: 1px solid #000;