Reorganize files and translate login to portuguese
This commit is contained in:
parent
4254cc6b86
commit
fc00b938e6
@ -3,10 +3,10 @@
|
||||
<form @submit="submit">
|
||||
<img src="../assets/logo.svg" alt="File Manager">
|
||||
<h1>File Manager</h1>
|
||||
<div v-if="wrong" class="wrong">Wrong credentials</div>
|
||||
<input type="text" v-model="username" placeholder="Username">
|
||||
<input type="password" v-model="password" placeholder="Password">
|
||||
<input type="submit" value="Login">
|
||||
<div v-if="wrong" class="wrong">{{ $t("login.wrongCredentials") }}</div>
|
||||
<input type="text" v-model="username" :placeholder="$t('login.username')">
|
||||
<input type="password" v-model="password" :placeholder="$t('login.password')">
|
||||
<input type="submit" :value="$t('login.submit')">
|
||||
</form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<nav :class="{active}">
|
||||
<router-link class="action" to="/files/" aria-label="My Files" title="My Files">
|
||||
<i class="material-icons">folder</i>
|
||||
<span>My Files</span>
|
||||
<span>{{ $t('My Files') }}</span>
|
||||
</router-link>
|
||||
|
||||
<div v-if="user.allowNew">
|
||||
@ -65,6 +65,7 @@ export default {
|
||||
computed: {
|
||||
...mapState(['user', 'plugins']),
|
||||
active () {
|
||||
console.log(this.$i18n)
|
||||
return this.$store.state.show === 'sidebar'
|
||||
}
|
||||
},
|
||||
|
||||
@ -27,9 +27,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Forbidden from './errors/403'
|
||||
import NotFound from './errors/404'
|
||||
import InternalError from './errors/500'
|
||||
import Forbidden from '@/components/errors/403'
|
||||
import NotFound from '@/components/errors/404'
|
||||
import InternalError from '@/components/errors/500'
|
||||
import Preview from './Preview'
|
||||
import Listing from './Listing'
|
||||
import Editor from './Editor'
|
||||
@ -35,10 +35,10 @@
|
||||
import { mapState } from 'vuex'
|
||||
import url from '@/utils/url'
|
||||
import api from '@/utils/api'
|
||||
import InfoButton from './buttons/Info'
|
||||
import DeleteButton from './buttons/Delete'
|
||||
import RenameButton from './buttons/Rename'
|
||||
import DownloadButton from './buttons/Download'
|
||||
import InfoButton from '@/components/buttons/Info'
|
||||
import DeleteButton from '@/components/buttons/Delete'
|
||||
import RenameButton from '@/components/buttons/Rename'
|
||||
import DownloadButton from '@/components/buttons/Download'
|
||||
|
||||
export default {
|
||||
name: 'preview',
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
<ul>
|
||||
<li><router-link to="/settings/profile">Go to Profile Settings</router-link></li>
|
||||
<li><router-link to="/users">Go to User Management</router-link></li>
|
||||
<li><router-link to="/settings/users">Go to User Management</router-link></li>
|
||||
</ul>
|
||||
|
||||
<form @submit="savePlugin" v-if="plugins.length > 0">
|
||||
@ -14,7 +14,7 @@
|
||||
<td>{{ user.username }}</td>
|
||||
<td><i v-if="user.admin" class="material-icons">done</i><i v-else class="material-icons">close</i></td>
|
||||
<td>{{ user.filesystem }}</td>
|
||||
<td><router-link :to="'/users/' + user.ID"><i class="material-icons">mode_edit</i></router-link></td>
|
||||
<td><router-link :to="'/settigns/users/' + user.ID"><i class="material-icons">mode_edit</i></router-link></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
8
assets/src/i18n/en.json
Normal file
8
assets/src/i18n/en.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"login": {
|
||||
"wrongCredentials": "Wrong credentials",
|
||||
"username": "Username",
|
||||
"password": "Password",
|
||||
"submit": "Login"
|
||||
}
|
||||
}
|
||||
14
assets/src/i18n/index.js
Normal file
14
assets/src/i18n/index.js
Normal file
@ -0,0 +1,14 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import en from './en.json'
|
||||
import pt from './pt.json'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
export default new VueI18n({
|
||||
locale: 'en',
|
||||
messages: {
|
||||
'en': en,
|
||||
'pt': pt
|
||||
}
|
||||
})
|
||||
8
assets/src/i18n/pt.json
Normal file
8
assets/src/i18n/pt.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"login": {
|
||||
"wrongCredentials": "Credenciais erradas",
|
||||
"username": "Nome de utilizador",
|
||||
"password": "Palavra-passe",
|
||||
"submit": "Entrar"
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ import Vue from 'vue'
|
||||
import App from './App'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import i18n from './i18n'
|
||||
|
||||
Vue.config.productionTip = true
|
||||
|
||||
@ -10,6 +11,7 @@ new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
router,
|
||||
i18n,
|
||||
template: '<App/>',
|
||||
components: { App }
|
||||
})
|
||||
|
||||
@ -2,11 +2,11 @@ import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Login from '@/components/Login'
|
||||
import Main from '@/components/Main'
|
||||
import Files from '@/components/Files'
|
||||
import Users from '@/components/Users'
|
||||
import User from '@/components/User'
|
||||
import GlobalSettings from '@/components/GlobalSettings'
|
||||
import ProfileSettings from '@/components/ProfileSettings'
|
||||
import Files from '@/components/files/Files'
|
||||
import Users from '@/components/settings/Users'
|
||||
import User from '@/components/settings/User'
|
||||
import GlobalSettings from '@/components/settings/Global'
|
||||
import ProfileSettings from '@/components/settings/Profile'
|
||||
import error403 from '@/components/errors/403'
|
||||
import error404 from '@/components/errors/404'
|
||||
import error500 from '@/components/errors/500'
|
||||
@ -96,13 +96,13 @@ const router = new Router({
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/users/',
|
||||
path: '/settings/users/',
|
||||
redirect: {
|
||||
path: '/users'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/users/*',
|
||||
path: '/settings/users/*',
|
||||
name: 'User',
|
||||
component: User,
|
||||
meta: {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
"moment": "^2.18.1",
|
||||
"normalize.css": "^7.0.0",
|
||||
"vue": "^2.3.3",
|
||||
"vue-i18n": "^7.1.0",
|
||||
"vue-router": "^2.7.0",
|
||||
"vuex": "^2.3.1"
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user