Get the language module out of spot.js
This commit is contained in:
@@ -13,10 +13,10 @@ export default {
|
||||
icon: String,
|
||||
iconClasses: String
|
||||
},
|
||||
inject: ['spot'],
|
||||
inject: ['lang'],
|
||||
computed: {
|
||||
title() {
|
||||
if(this.localTime != this.siteTime) return this.spot.lang('your_time', this.siteTime.slice(-5)) + ((this.offset != '0')?' ('+this.spot.lang('unit_d')+this.offset+')':'');
|
||||
if(this.localTime != this.siteTime) return this.lang.get('your_time', this.siteTime.slice(-5)) + ((this.offset != '0')?' ('+this.lang.get('unit_d')+this.offset+')':'');
|
||||
},
|
||||
spotIconClasses() {
|
||||
return this.iconClasses || 'fa-fw fa-lg';
|
||||
@@ -28,4 +28,4 @@ export default {
|
||||
<template>
|
||||
<spotIcon v-if="icon" :icon="icon" :classes="spotIconClasses" :title="title" :text="localTime" />
|
||||
<span v-else :class="classes" :title="title">{{ localTime }}</span>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user