diff --git a/src/locale/locale.ts b/src/locale/locale.ts
index f7da448..7a0e40d 100644
--- a/src/locale/locale.ts
+++ b/src/locale/locale.ts
@@ -1,4 +1,5 @@
export interface LocaleDefinition {
+ name: string
main: {
menu: {
wallets: string
@@ -225,6 +226,7 @@ export interface LocaleDefinition {
currency: string
currencyDetails: string
pin: string
+ pinDetails: string
changePin: string
lockAfter: string
lockAfterDetails: string
diff --git a/src/locale/locales.ts b/src/locale/locales.ts
index 28f8405..ebe9ea1 100644
--- a/src/locale/locales.ts
+++ b/src/locale/locales.ts
@@ -1,10 +1,14 @@
const files = require.context('@/assets/locales/', false, /\.ts$/)
-const locales = {}
+const locales: any = {}
+export const localeNames: any = {}
files.keys().forEach(key => {
if (key === './index.ts') return
- // @ts-ignore
- locales[key.replace(/(\.\/|\.ts)/g, '')] = files(key).default
+
+ const langCode = key.replace(/(\.\/|\.ts)/g, '')
+
+ locales[langCode] = files(key).default
+ localeNames[langCode] = files(key).default.name || langCode
})
export default locales
diff --git a/src/utils/currencies.ts b/src/utils/currencies.ts
index 2150cc1..b2cfcc0 100644
--- a/src/utils/currencies.ts
+++ b/src/utils/currencies.ts
@@ -1,6 +1,17 @@
-import constants from '@/utils/constants'
-
-export default [
- constants.defaultCurrencyCode,
- 'EUR'
-]
+export default {
+ AUD: 'Australian Dollar',
+ BRL: 'Brazilian Real',
+ CAD: 'Canadian Dollar',
+ CHF: 'Swiss Franc',
+ CNY: 'Chinese Yuan',
+ DKK: 'Danish krone',
+ EUR: 'Euro',
+ GBP: 'British Pound',
+ HKD: 'Hong Kong Dollar',
+ IDR: 'Indonesian Rupiah',
+ NZD: 'New Zealand Dollar',
+ RUB: 'Russian Ruble',
+ SGD: 'Singapore dollar',
+ THB: 'Thai Baht',
+ USD: 'United States Dollar'
+}
diff --git a/src/views/Settings/SettingsView.vue b/src/views/Settings/SettingsView.vue
index a64a2dd..94c3114 100644
--- a/src/views/Settings/SettingsView.vue
+++ b/src/views/Settings/SettingsView.vue
@@ -4,38 +4,39 @@
-
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
+
+
import { mapActions, mapGetters } from 'vuex'
-import locales from '@/locale/locales'
+import { localeNames } from '@/locale/locales'
import currencies from '@/utils/currencies'
import NavigationHeader from '@/components/layout/NavigationHeader'
+import FormBox from '@/components/layout/FormBox'
import FormSection from '@/components/layout/FormSection'
import ChangePinModal from '@/views/Settings/ChangePinModal'
import VersionBlock from '@/components/VersionBlock'
export default {
name: 'settings-view',
- components: { VersionBlock, FormSection, NavigationHeader },
+
+ components: { FormBox, VersionBlock, FormSection, NavigationHeader },
+
data () {
return {
- langs: Object.keys(locales),
- currencies: currencies,
- lockAfter: '5m',
- locks: {
- '5m': '5 Minutes',
- '10m': '10 Minutes',
- '20m': '20 Minutes',
- '30m': '30 Minutes'
- }
+ langs: localeNames,
+ currencies: currencies
}
},
+
computed: {
language: {
get () {
@@ -98,6 +96,7 @@ export default {
}
}
},
+
methods: {
...mapGetters(['currentCurrencyCode', 'currentLanguageCode']),
...mapActions(['updateCurrency', 'updateLanguage']),
diff --git a/src/views/TorStatus.vue b/src/views/TorStatus.vue
index 8606cbc..b955867 100644
--- a/src/views/TorStatus.vue
+++ b/src/views/TorStatus.vue
@@ -106,13 +106,13 @@ export default {
return fetch(constants.ipApi)
.then(res => res.ok && res.json())
.then(networkData => {
- Log.warn('Fetched IP address')
+ Log.info('Fetched IP address')
this.networkData = networkData
this.loading = false
})
.catch(err => {
- Log.warn("Couldn't load ip data. Reason:", err)
+ Log.error("Couldn't load ip data. Reason:", err)
this.error = err
this.networkData = null