Error translations and some bug fixes

This commit is contained in:
Henrique Dias 2017-07-31 14:59:05 +01:00
parent 29befbb1f3
commit c460f09a4f
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
6 changed files with 11 additions and 6 deletions

View File

@ -2,7 +2,7 @@
<div>
<h2 class="message">
<i class="material-icons">error</i>
<span>You're not welcome here.</span>
<span>{{ $t('errors.forbidden') }}</span>
</h2>
</div>
</template>

View File

@ -2,7 +2,7 @@
<div>
<h2 class="message">
<i class="material-icons">gps_off</i>
<span>This location can't be reached.</span>
<span>{{ $t('errors.notFound') }}</span>
</h2>
</div>
</template>

View File

@ -2,7 +2,7 @@
<div>
<h2 class="message">
<i class="material-icons">error_outline</i>
<span>Something really went wrong.</span>
<span>{{ $t('errors.internal') }}</span>
</h2>
</div>
</template>

View File

@ -11,8 +11,8 @@
</span>
</div>
<div v-if="error">
<not-found v-if="error === 404"></not-found>
<forbidden v-else-if="error === 403"></forbidden>
<not-found v-if="error.message === '404'"></not-found>
<forbidden v-else-if="error.message === '403'"></forbidden>
<internal-error v-else></internal-error>
</div>
<editor v-else-if="isEditor"></editor>

View File

@ -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="'/settigns/users/' + user.ID"><i class="material-icons">mode_edit</i></router-link></td>
<td><router-link :to="'/settings/users/' + user.ID"><i class="material-icons">mode_edit</i></router-link></td>
</tr>
</table>

View File

@ -16,5 +16,10 @@
"rename": "Rename",
"switchView": "Swicth view",
"upload": "Upload"
},
"errors": {
"forbidden": "You're not welcome here.",
"notFound": "This location can't be reached.",
"internal": "Something really went wrong."
}
}