Commit 950dfc45 authored by SpinShare's avatar SpinShare

added startup translation strings, added support for user promos

parent 20b109a8
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div :style="'background-image: url(' + image_path + ');'" :class="isLoading ? 'staff-promo promo-loading' : 'staff-promo' "> <div :style="'background-image: url(' + image_path + ');'" :class="isLoading ? 'staff-promo promo-loading' : 'staff-promo' ">
<div class="promo-type" :style="'color:' + color">{{ type }}</div> <div class="promo-type" :style="'color:' + color">{{ type }}</div>
<div class="promo-title" :style="'color:' + textColor" v-html="title"></div> <div class="promo-title" :style="'color:' + textColor" v-html="title"></div>
<div class="promo-button" :style="'background-color:' + color" v-on:click="buttonClick()">CHECK IT OUT</div> <div class="promo-button" :style="'background-color:' + color" v-on:click="buttonClick()">{{ $t('startup.staffpromo.action') }}</div>
</div> </div>
</template> </template>
...@@ -14,19 +14,27 @@ ...@@ -14,19 +14,27 @@
name: 'StaffPromo', name: 'StaffPromo',
methods: { methods: {
buttonClick: function() { buttonClick: function() {
switch(this.$props.buttonType) { console.log(this.$props.button.type);
console.log(this.$props.button.data);
switch(this.$props.button.type) {
case 0: case 0:
// Song // Song
this.$router.push({ name: 'SongDetail', params: { id: this.$props.button.data } });
break; break;
case 1: case 1:
// Playlist (unused) // Playlist (unused)
break; break;
case 2: case 2:
// Search Query // Search Query
this.$router.push({ name: 'Search', params: { searchQuery: this.$props.button.data } });
break; break;
case 3: case 3:
// External // External
shell.openExternal(this.$props.buttonData); shell.openExternal(this.$props.button.data);
break;
case 4:
// User
this.$router.push({ name: 'UserDetail', params: { id: this.$props.button.data } });
break; break;
} }
} }
...@@ -36,8 +44,7 @@ ...@@ -36,8 +44,7 @@
'image_path', 'image_path',
'type', 'type',
'title', 'title',
'buttonType', 'button',
'buttonData',
'textColor', 'textColor',
'color' 'color'
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment