diff --git a/ui/package.json b/ui/package.json index f0e1f8b..e1ee5a2 100644 --- a/ui/package.json +++ b/ui/package.json @@ -17,6 +17,7 @@ "moment": "^2.29.1", "sugar": "^2.0.6", "vue": "^2.6.12", + "vue-i18n": "^8.0.0", "vue-matomo": "^3.14.0-0", "vue-router": "^3.4.9", "vuex": "^3.5.1" diff --git a/ui/src/App.vue b/ui/src/App.vue index 14d0510..9c10892 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -3,9 +3,7 @@ - +
@@ -32,4 +30,15 @@ footer { padding-top: 1em; padding-bottom: 1em; } + +/* RTL styles */ +[dir="rtl"] #app { + direction: rtl; + text-align: right; +} + +[dir="rtl"] footer { + direction: rtl; + text-align: center; /* Keep footer text centered or change as needed */ +} diff --git a/ui/src/components/Faq.vue b/ui/src/components/Faq.vue index 1c22e97..1432083 100644 --- a/ui/src/components/Faq.vue +++ b/ui/src/components/Faq.vue @@ -1,27 +1,30 @@ @@ -32,10 +35,16 @@ export default { name: 'Faq', - components: {FaqEntry}, + components: { FaqEntry }, computed: { - human_size_limit() { return `${parseInt(Constants.zimit_size_limit / 1073741824)} GiB`; }, - human_time_limit() { return `${parseInt(Constants.zimit_time_limit / 3600)} hours`; }, + human_size_limit() { + const sizeInGiB = parseInt(Constants.zimit_size_limit / 1073741824); + return `${sizeInGiB} GiB`; + }, + human_time_limit() { + const timeInHours = parseInt(Constants.zimit_time_limit / 3600); + return timeInHours; + }, } } - + \ No newline at end of file diff --git a/ui/src/components/FaqEntry.vue b/ui/src/components/FaqEntry.vue index 92e101f..eee9f59 100644 --- a/ui/src/components/FaqEntry.vue +++ b/ui/src/components/FaqEntry.vue @@ -33,9 +33,18 @@ top: .5em; right: .3rem; } + + /* Adjust for RTL by resetting 'right' and setting 'left' */ + :root[dir="rtl"] .card-header .plus, + :root[dir="rtl"] .card-header .minus { + right: auto; + left: .3rem; + } + .card-header .collapsed .minus { display: none; } + .card-header .not-collapsed .plus { display: none; } @@ -47,11 +56,13 @@ margin-bottom: 0 !important; border-radius: 0; } + .faq .card:not(:first-child) { border-top: 0; } + .card-header { background-color: transparent; border: 0; } - + \ No newline at end of file diff --git a/ui/src/components/Loading.vue b/ui/src/components/Loading.vue index 5a82ccb..7cc5f43 100644 --- a/ui/src/components/Loading.vue +++ b/ui/src/components/Loading.vue @@ -19,18 +19,18 @@ return this.$store.getters.loadingStatus.should_display; }, loading_text() { - return this.$store.getters.loadingStatus.text; + return this.$store.getters.loadingStatus.text || this.$t('loading.loading'); } } } diff --git a/ui/src/components/NavBar.vue b/ui/src/components/NavBar.vue index 377592b..41de121 100644 --- a/ui/src/components/NavBar.vue +++ b/ui/src/components/NavBar.vue @@ -1,8 +1,19 @@ + + header img { + max-width: 50vw; + width: 400px; + } + + .language-selector-container { + position: absolute; + top: 2em; + right: 2em; + margin-left: auto; + } + + .language-selector { + padding: .5rem 1rem; + border-radius: .25rem; + border: 1px solid #ced4da; + appearance: none; + background-color: #fff; + background-size: 16px 12px; + } + + [dir='rtl'] .language-selector-container { + right: auto; + left: 2em; + } + \ No newline at end of file diff --git a/ui/src/components/NewRequest.vue b/ui/src/components/NewRequest.vue index e8199a5..c318793 100644 --- a/ui/src/components/NewRequest.vue +++ b/ui/src/components/NewRequest.vue @@ -1,13 +1,13 @@