]> git.immae.eu Git - github/bastienwirtz/homer.git/blobdiff - app.js
Merge pull request #22 from traeblain/feature-title
[github/bastienwirtz/homer.git] / app.js
diff --git a/app.js b/app.js
index 6c2ba9078ef73da8214034e360530a33e7a3a55c..21bdbb995f47392582a9849f83d55c51cffbaa30 100644 (file)
--- a/app.js
+++ b/app.js
@@ -20,12 +20,13 @@ const app = new Vue({
         this.checkOffline();
         try {
             this.config =  await this.getConfig();
+            document.title = this.config.title + ' | Homer';
         } catch (error) {
             this.offline = true;
         }
 
         // Look for a new message if an endpoint is provided.
-        if (this.config.message.url) {
+        if (this.config.message && this.config.message.url) {
             this.getMessage(this.config.message.url).then(function(message){
                 // keep the original config value if no value is provided by the endpoint
                 for (const prop of ['title','style','content']) {
@@ -87,7 +88,7 @@ Vue.component('service', {
     props: ['item'],
     template: `<div>
     <div class="card">
-        <a :href="item.url">
+        <a :href="item.url" :target="item.target">
             <div class="card-content">
                 <div class="media">
                     <div v-if="item.logo" class="media-left">