mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
Added i18n support
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<!--Other attributes-->
|
||||
<span v-if="isFile || isImage" class="item-size">{{ file.filesize }}, {{ file.created_at }}</span>
|
||||
|
||||
<span v-if="isFolder" class="item-length">{{ file.items == 0 ? 'Empty' : (file.items + ' item') | pluralize(file.items) }}, {{ file.created_at }}</span >
|
||||
<span v-if="isFolder" class="item-length">{{ file.items == 0 ? $t('folder.empty') : $tc('folder.item_counts', folderItems) }}, {{ file.created_at }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -47,11 +47,6 @@ export default {
|
||||
return this.file.type === 'image'
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
pluralize(word, amount) {
|
||||
return amount > 1 ? word + 's' : word
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="storage-size" v-if="app">
|
||||
<div class="storage-info">
|
||||
<span class="title">Storage</span>
|
||||
<span class="size">{{ app.storage.used }} of {{ app.storage.capacity }} Used</span>
|
||||
<span class="title">{{ $t('storage.title') }}</span>
|
||||
<span class="size">{{ $t('storage.used', {used: app.storage.used, capacity: app.storage.capacity}) }}</span>
|
||||
</div>
|
||||
<ProgressBar :progress="app.storage.percentage" :class="{'is-exceeded': app.storage.percentage > 100}"/>
|
||||
</div>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<transition name="user-menu">
|
||||
<div class="user-menu" v-if="isOpenedMenu">
|
||||
<ul class="menu-options" id="menu-options-list" @click="closeMenu">
|
||||
<li class="menu-option" @click="$goToView('user-settings')">Profile Settings</li>
|
||||
<li class="menu-option" @click="$store.dispatch('logOut')">Log Out</li>
|
||||
<li class="menu-option" @click="$goToView('user-settings')">{{ $t('context_menu.profile_settings') }}</li>
|
||||
<li class="menu-option" @click="$store.dispatch('logOut')">{{ $t('context_menu.log_out') }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</transition>
|
||||
@@ -70,12 +70,14 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: 15px;
|
||||
padding: 5px;
|
||||
user-select: none;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
@include transition(150ms);
|
||||
background: darken($light_background, 3%);
|
||||
|
||||
&:active {
|
||||
transform: scale(0.95);
|
||||
@@ -138,7 +140,7 @@
|
||||
border-radius: 8px;
|
||||
|
||||
.menu-option {
|
||||
font-weight: 600;
|
||||
font-weight: 700;
|
||||
@include font-size(15);
|
||||
padding: 15px 30px;
|
||||
cursor: pointer;
|
||||
@@ -157,17 +159,15 @@
|
||||
.user-headline {
|
||||
position: relative;
|
||||
margin-bottom: 40px;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
#sidebar {
|
||||
background: $dark_mode_background;
|
||||
}
|
||||
|
||||
.user-headline {
|
||||
background: transparent;
|
||||
background: $dark_mode_background;
|
||||
|
||||
&:hover {
|
||||
background: transparent;
|
||||
|
||||
Reference in New Issue
Block a user