Skip to content

Commit 12cad12

Browse files
committed
chore(lint): apply config update
1 parent 5faa68c commit 12cad12

File tree

16 files changed

+113
-81
lines changed

16 files changed

+113
-81
lines changed

src/components/ConnectivityChecker.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
<div v-if="offline" class="offline-message mb-4">
33
<i class="fa-solid fa-triangle-exclamation"></i>
44
<h1>
5-
Network unreachable
5+
Network unreachable
66
<span @click="checkOffline"> <i class="fas fa-redo-alt"></i></span>
77
</h1>
88
<p>
9-
<a href="https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md#connectivity-checks">More information →</a>
9+
<a
10+
href="https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md#connectivity-checks"
11+
>More information →</a
12+
>
1013
</p>
1114
</div>
1215
</template>

src/components/DarkMode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default {
1818
props: {
1919
defaultValue: String,
2020
},
21-
emits: ['updated'],
21+
emits: ["updated"],
2222
data: function () {
2323
return {
2424
isDark: null,

src/components/Message.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default {
7373
return;
7474
}
7575
return response.json();
76-
}
76+
},
7777
);
7878
},
7979

src/components/Navbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default {
5252
},
5353
links: Array,
5454
},
55-
emits: ['navbar-toggle'],
55+
emits: ["navbar-toggle"],
5656
computed: {
5757
showMenu: function () {
5858
return this.open && this.isSmallScreen();

src/components/services/FreshRSS.vue

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,27 @@
22
<Generic :item="item">
33
<template #indicator>
44
<div class="notifs">
5-
<strong v-if="subscriptions > 0" class="notif subscriptions" title="Subscriptions">
5+
<strong
6+
v-if="subscriptions > 0"
7+
class="notif subscriptions"
8+
title="Subscriptions"
9+
>
610
{{ subscriptions }}
711
</strong>
812
<strong v-if="unread > 0" class="notif unread" title="Unread">
913
{{ unread }}
1014
</strong>
1115
<strong
12-
v-if="serverError" class="notif errors"
13-
title="Connection error to the FreshRSS API, check url username and password in config.yml">?</strong>
16+
v-if="serverError"
17+
class="notif errors"
18+
title="Connection error to the FreshRSS API, check url username and password in config.yml"
19+
>?</strong
20+
>
1421
</div>
1522
</template>
1623
</Generic>
1724
</template>
18-
25+
1926
<script>
2027
import service from "@/mixins/service.js";
2128
import Generic from "./Generic.vue";
@@ -45,28 +52,39 @@ export default {
4552
},
4653
methods: {
4754
fetchConfig: async function () {
48-
4955
if (!this.auth) {
50-
const match = await this.fetch(`/api/greader.php/accounts/ClientLogin?Email=${this.item.username}&Passwd=${this.item.password}`, { method: 'GET', cache: "no-cache" }, false)
51-
.then(response => { return response.text(); })
52-
.then(body => { return body.match(/Auth=(([([a-z0-9]+)\/([([a-z0-9]+))/i); });
53-
if (match !== null)
54-
this.auth = match[1];
56+
const match = await this.fetch(
57+
`/api/greader.php/accounts/ClientLogin?Email=${this.item.username}&Passwd=${this.item.password}`,
58+
{ method: "GET", cache: "no-cache" },
59+
false,
60+
)
61+
.then((response) => {
62+
return response.text();
63+
})
64+
.then((body) => {
65+
return body.match(/Auth=(([([a-z0-9]+)\/([([a-z0-9]+))/i);
66+
});
67+
if (match !== null) this.auth = match[1];
5568
}
5669
5770
const headers = {
58-
"Authorization": `GoogleLogin auth=${this.auth}`,
71+
Authorization: `GoogleLogin auth=${this.auth}`,
5972
};
6073
61-
this.fetch(`/api/greader.php/reader/api/0/subscription/list?output=json`, { headers })
74+
this.fetch(
75+
`/api/greader.php/reader/api/0/subscription/list?output=json`,
76+
{ headers },
77+
)
6278
.then((subscription) => {
6379
this.subscriptions = subscription.subscriptions.length;
6480
})
6581
.catch((e) => {
6682
console.error(e);
6783
this.serverError = true;
6884
});
69-
this.fetch(`/api/greader.php/reader/api/0/unread-count?output=json`, { headers })
85+
this.fetch(`/api/greader.php/reader/api/0/unread-count?output=json`, {
86+
headers,
87+
})
7088
.then((unreadcount) => {
7189
this.unread = unreadcount.max;
7290
})
@@ -78,7 +96,7 @@ export default {
7896
},
7997
};
8098
</script>
81-
99+
82100
<style scoped lang="scss">
83101
.notifs {
84102
position: absolute;
@@ -104,4 +122,4 @@ export default {
104122
}
105123
}
106124
}
107-
</style>
125+
</style>

src/components/services/Generic.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,21 @@
2020
<slot name="content">
2121
<p class="title">{{ item.name }}</p>
2222
<p v-if="item.quick" class="quicklinks">
23-
<a
24-
v-for="(link, linkIndex) in item.quick"
25-
:key="linkIndex"
26-
:style="`background-color:${link.color};`"
27-
:href="link.url"
28-
:target="link.target"
23+
<a
24+
v-for="(link, linkIndex) in item.quick"
25+
:key="linkIndex"
26+
:style="`background-color:${link.color};`"
27+
:href="link.url"
28+
:target="link.target"
2929
rel="noreferrer"
30-
>
31-
<span v-if="item.icon"><i style="font-size: 12px" :class="['fa-fw', link.icon]"></i></span>
32-
{{ link.name }}
30+
>
31+
<span v-if="item.icon"
32+
><i
33+
style="font-size: 12px"
34+
:class="['fa-fw', link.icon]"
35+
></i
36+
></span>
37+
{{ link.name }}
3338
</a>
3439
</p>
3540
<p v-if="item.subtitle" class="subtitle">
@@ -92,5 +97,4 @@ a[href=""] {
9297
pointer-events: all;
9398
}
9499
}
95-
96100
</style>

src/components/services/Glances.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
<p class="subtitle is-6">
66
<template v-for="(statItem, index) in item.stats" :key="statItem">
77
<span v-if="stats[statItem]" :title="stats[statItem].label">
8-
<i :class="stats[statItem].icon"></i> {{ stats[statItem].value }} {{ stats[statItem].unit }}
9-
<span v-if="index != item.stats.length-1"> / </span>
8+
<i :class="stats[statItem].icon"></i> {{ stats[statItem].value }}
9+
{{ stats[statItem].unit }}
10+
<span v-if="index != item.stats.length - 1"> / </span>
1011
</span>
1112
</template>
1213
</p>
@@ -18,7 +19,6 @@
1819
import service from "@/mixins/service.js";
1920
import Generic from "./Generic.vue";
2021
21-
2222
export default {
2323
name: "Glances",
2424
components: {
@@ -48,25 +48,25 @@ export default {
4848
label: "System load",
4949
icon: "fa-solid fa-bolt",
5050
unit: "%",
51-
}
51+
};
5252
this.stats["cpu"] = {
5353
value: response.cpu,
5454
label: `CPU usage (${response.cpu_name})`,
5555
icon: "fa-solid fa-microchip",
5656
unit: "%",
57-
}
57+
};
5858
this.stats["mem"] = {
5959
value: response.mem,
6060
label: `RAM usage`,
6161
icon: "fa-solid fa-memory",
6262
unit: "%",
63-
}
63+
};
6464
this.stats["swap"] = {
6565
value: response.swap,
6666
label: `Swap usage`,
6767
icon: "fa-solid fa-file-arrow-down",
6868
unit: "%",
69-
}
69+
};
7070
})
7171
.catch((e) => {
7272
console.log(e);

src/components/services/Gotify.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default {
3131
item: Object,
3232
},
3333
data: () => ({
34-
health: {},
34+
health: {},
3535
messages: 0,
3636
}),
3737
computed: {
@@ -45,7 +45,7 @@ export default {
4545
}
4646
4747
return "green";
48-
}
48+
},
4949
},
5050
created() {
5151
this.fetchStatus();
@@ -55,15 +55,15 @@ export default {
5555
fetchStatus: async function () {
5656
await this.fetch(`/health`)
5757
.catch((e) => console.log(e))
58-
.then((resp) => this.health = resp);
58+
.then((resp) => (this.health = resp));
5959
},
6060
fetchMessages: async function () {
6161
const headers = {
6262
"X-Gotify-Key": this.item.apikey,
6363
};
6464
await this.fetch(`/message?limit=100`, { headers })
6565
.catch((e) => console.log(e))
66-
.then((resp) => this.messages = resp.messages.length);
66+
.then((resp) => (this.messages = resp.messages.length));
6767
},
6868
},
6969
};

src/components/services/Mealie.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default {
4646
return `Happily keeping ${this.stats.totalRecipes} recipes organized`;
4747
}
4848
return null;
49-
}
49+
},
5050
},
5151
created() {
5252
this.fetchStatus();
@@ -60,9 +60,9 @@ export default {
6060
6161
if (this.item.subtitle != null) return;
6262
63-
this.meal = await this.fetch("/api/groups/mealplans/today", { headers }).catch(
64-
(e) => console.log(e),
65-
);
63+
this.meal = await this.fetch("/api/groups/mealplans/today", {
64+
headers,
65+
}).catch((e) => console.log(e));
6666
this.stats = await this.fetch("/api/admin/about/statistics", {
6767
headers,
6868
}).catch((e) => console.log(e));

src/components/services/Nextcloud.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
<template #content>
44
<p class="title is-4">{{ item.name }}</p>
55
<p class="subtitle is-6">
6-
<template v-if="versionstring">
7-
Version {{ versionstring }}
8-
</template>
6+
<template v-if="versionstring"> Version {{ versionstring }} </template>
97
</p>
108
</template>
119
<template #indicator>

0 commit comments

Comments
 (0)