aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2022-04-30 15:42:31 +0200
committerGitHub <noreply@github.com>2022-04-30 15:42:31 +0200
commit7e48e099aa968307d2b99720a076b4bdc706b5fd (patch)
tree971b362eb335628d818a3faf14ba4a6d9749d850 /src
parentaf0a6e89c9104ed69766e41f032a4b610ef67ccd (diff)
parent4f56c2c11baad8f98c338989fb0cd8e5af78d0c8 (diff)
downloadhomer-7e48e099aa968307d2b99720a076b4bdc706b5fd.tar.gz
homer-7e48e099aa968307d2b99720a076b4bdc706b5fd.tar.zst
homer-7e48e099aa968307d2b99720a076b4bdc706b5fd.zip
Merge pull request #421 from bastienwirtz/docker-rework
Docker rework
Diffstat (limited to 'src')
-rw-r--r--src/App.vue18
-rw-r--r--src/assets/app.scss4
-rw-r--r--src/components/GetStarted.vue2
-rw-r--r--src/components/services/Emby.vue2
4 files changed, 22 insertions, 4 deletions
diff --git a/src/App.vue b/src/App.vue
index 81f92f7..515177e 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -18,7 +18,10 @@
18 </a> 18 </a>
19 <i v-if="config.icon" :class="config.icon"></i> 19 <i v-if="config.icon" :class="config.icon"></i>
20 </div> 20 </div>
21 <div class="dashboard-title"> 21 <div
22 class="dashboard-title"
23 :class="{ 'no-logo': !config.icon || !config.logo }"
24 >
22 <span class="headline">{{ config.subtitle }}</span> 25 <span class="headline">{{ config.subtitle }}</span>
23 <h1>{{ config.title }}</h1> 26 <h1>{{ config.title }}</h1>
24 </div> 27 </div>
@@ -61,7 +64,7 @@
61 @network-status-update="offline = $event" 64 @network-status-update="offline = $event"
62 /> 65 />
63 66
64 <GetStarted v-if="loaded && !services" /> 67 <GetStarted v-if="configurationNeeded" />
65 68
66 <div v-if="!offline"> 69 <div v-if="!offline">
67 <!-- Optional messages --> 70 <!-- Optional messages -->
@@ -168,6 +171,7 @@ export default {
168 data: function () { 171 data: function () {
169 return { 172 return {
170 loaded: false, 173 loaded: false,
174 configNotFound: false,
171 config: null, 175 config: null,
172 services: null, 176 services: null,
173 offline: false, 177 offline: false,
@@ -177,6 +181,11 @@ export default {
177 showMenu: false, 181 showMenu: false,
178 }; 182 };
179 }, 183 },
184 computed: {
185 configurationNeeded: function () {
186 return (this.loaded && !this.services) || this.configNotFound;
187 },
188 },
180 created: async function () { 189 created: async function () {
181 this.buildDashboard(); 190 this.buildDashboard();
182 window.onhashchange = this.buildDashboard; 191 window.onhashchange = this.buildDashboard;
@@ -228,6 +237,11 @@ export default {
228 return; 237 return;
229 } 238 }
230 239
240 if (response.status == 404) {
241 this.configNotFound = true;
242 return {};
243 }
244
231 if (!response.ok) { 245 if (!response.ok) {
232 throw Error(`${response.statusText}: ${response.body}`); 246 throw Error(`${response.statusText}: ${response.body}`);
233 } 247 }
diff --git a/src/assets/app.scss b/src/assets/app.scss
index aa8b077..ae2cb6b 100644
--- a/src/assets/app.scss
+++ b/src/assets/app.scss
@@ -104,6 +104,10 @@ body {
104 104
105 .dashboard-title { 105 .dashboard-title {
106 padding: 6px 0 0 80px; 106 padding: 6px 0 0 80px;
107
108 &.no-logo {
109 padding-left: 0;
110 }
107 } 111 }
108 112
109 .first-line { 113 .first-line {
diff --git a/src/components/GetStarted.vue b/src/components/GetStarted.vue
index dcabc02..c256a0f 100644
--- a/src/components/GetStarted.vue
+++ b/src/components/GetStarted.vue
@@ -6,7 +6,7 @@
6 <p> 6 <p>
7 <a 7 <a
8 class="button is-primary mt-5 has-text-weight-bold" 8 class="button is-primary mt-5 has-text-weight-bold"
9 href="https://github.com/bastienwirtz/homer/blob/main/README.md#getting-started" 9 href="https://github.com/bastienwirtz/homer/blob/main/docs/configuration.md#configuration"
10 target="_blank" 10 target="_blank"
11 > 11 >
12 Get started 12 Get started
diff --git a/src/components/services/Emby.vue b/src/components/services/Emby.vue
index 25a2612..d2411f0 100644
--- a/src/components/services/Emby.vue
+++ b/src/components/services/Emby.vue
@@ -62,7 +62,7 @@ export default {
62 this.fetch("/System/info/public") 62 this.fetch("/System/info/public")
63 .then((response) => { 63 .then((response) => {
64 if (response.Id) this.status = "running"; 64 if (response.Id) this.status = "running";
65 else throw new Error(); 65 else throw new Error();
66 }) 66 })
67 .catch((e) => { 67 .catch((e) => {
68 console.log(e); 68 console.log(e);