3 <div class="card" :class="item.class">
4 <a :href="item.url" :target="item.target" rel="noreferrer">
5 <div class="card-content">
7 <div v-if="item.logo" class="media-left">
8 <figure class="image is-48x48">
9 <img :src="item.logo" :alt="`${item.name} logo`" />
12 <div v-if="item.icon" class="media-left">
13 <figure class="image is-48x48">
14 <i style="font-size: 35px" :class="['fa-fw', item.icon]"></i>
17 <div class="media-content">
18 <p class="title is-4">{{ item.name }}</p>
19 <p class="subtitle is-6">{{ item.subtitle }}</p>
23 v-if="config !== null && config.system.news.unread > 0"
26 >{{ config.system.news.unread }}</strong
29 v-if="config !== null && config.main.logs.numWarnings > 0"
30 class="notif warnings"
32 >{{ config.main.logs.numWarnings }}</strong
35 v-if="config !== null && config.main.logs.numErrors > 0"
38 >{{ config.main.logs.numErrors }}</strong
43 title="Connection error to Medusa API, check url and apikey in config.yml"
48 <div class="tag" :class="item.tagstyle" v-if="item.tag">
49 <strong class="tag-text">#{{ item.tag }}</strong>
69 created: function () {
73 fetchConfig: function () {
74 fetch(`${this.item.url}/api/v2/config`, {
75 credentials: "include",
76 headers: { "X-Api-Key": `${this.item.apikey}` },
79 if (response.status != 200) {
80 throw new Error(response.statusText);
82 return response.json();
89 this.serverError = true;
96 <style scoped lang="scss">
103 font-family: sans-serif;
108 padding-right: 0.35em;
109 padding-left: 0.35em;
111 padding-bottom: 0.2em;
112 border-radius: 0.25em;
118 background-color: #777777;
122 background-color: #d08d2e;
126 background-color: #e51111;