Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/privacy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-18 17:42:36 +0300
committerMorris Jobke <hey@morrisjobke.de>2019-03-18 17:42:36 +0300
commita5cc5f6b35b79ec8feb0bcbe15715e86e1d2ebdb (patch)
tree461900cffd0e72d4aee9a5635ab5706418965ba7 /src
parent23f04061d90d71fd014a7e2b813a8c10befcffb0 (diff)
Fix display if no country is selected yet - fixes #49
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'src')
-rw-r--r--src/Location.vue14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Location.vue b/src/Location.vue
index aa0a97d..b59c769 100644
--- a/src/Location.vue
+++ b/src/Location.vue
@@ -3,7 +3,8 @@
<span v-show="isLoading" class="icon icon-loading" />
<Map v-show="!isLoading" />
<p v-show="!isEditingLocation && !isLoading">
- {{ label }}<strong>{{ country }}.</strong>
+ <span v-show="country">{{ label }}<strong>{{ country }}.</strong></span>
+ <span v-show="!country">{{ labelForNoCountry }}</span>
<span v-show="isAdmin" class="icon icon-rename" @click="editLocation" />
</p>
<div v-show="isEditingLocation && !isLoading" class="multiselect-container">
@@ -49,6 +50,9 @@ export default {
label() {
return t('privacy', 'Your data is located in: ')
},
+ labelForNoCountry() {
+ return t('privacy', 'The admin hasn\'t selected the location of the server yet.')
+ },
country() {
return getNameForCountryCode(this.$data.selectedCountry)
},
@@ -79,9 +83,11 @@ export default {
HttpClient.get(url).then(resp => {
this.selectedCountry = resp.data.code
- const elm = document.querySelector('.where-is-my-data #' + this.selectedCountry)
- if (elm) {
- elm.style.fill = '#e6605c'
+ if (this.selectedCountry !== '') {
+ const elm = document.querySelector('.where-is-my-data #' + this.selectedCountry)
+ if (elm) {
+ elm.style.fill = '#e6605c'
+ }
}
this.isLoading = false