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">
20 <template v-if="item.subtitle">
23 <template v-else-if="api">
24 happily storing {{ api.count }} documents
29 <div class="tag" :class="item.tagstyle" v-if="item.tag">
30 <strong class="tag-text">#{{ item.tag }}</strong>
51 fetchStatus: async function () {
52 if (this.item.subtitle != null) return; // omitting unnecessary ajax call as the subtitle is showing
53 var apikey = this.item.apikey;
56 "apikey is not present in config.yml for the paperless entry!"
60 const url = `${this.item.url}/api/documents/`;
61 this.api = await fetch(url, {
63 Authorization: "Token " + this.item.apikey,
66 .then(function (response) {
68 throw new Error("Not 2xx response");
70 return response.json();
73 .catch((e) => console.log(e));
79 <style scoped lang="scss">