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