@@ -16,10 +16,9 @@
import _ from 'lodash';
import shared from './shared';
-
export default {
name: 'app',
- data () {
+ data() {
return {
notification: null
}
@@ -93,7 +92,7 @@ body
font-size: 12pt;
}
-#app
+.container
{
margin-left: auto;
margin-right: auto;
diff --git a/public/src/app.js b/public/src/app.js
index 269c97c..17493af 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -44,6 +44,7 @@ const router = new VueRouter({
},
{ path: '/admin', component: () => import('./route/admin/Landing.vue'),
children: [
+ { path: 'uploads', component: () => import('./route/admin/Uploads.vue') },
{ path: 'codes', component: () => import('./route/admin/Codes.vue') },
{ path: 'profile', component: () => import('./route/admin/Profile.vue') },
{ path: 'users', component: () => import('./route/admin/Users.vue') },
diff --git a/public/src/lang.js b/public/src/lang.js
index 64a2895..5ddce6d 100644
--- a/public/src/lang.js
+++ b/public/src/lang.js
@@ -1,67 +1,7 @@
+import en from './locale/en';
+import nl from './locale/nl';
+
export default {
- en: {
- title: 'File upload - Recv',
- disclaimer: '',
-
- landing: {
- invitePlaceholder: 'Code',
- inviteButton: 'Check code',
- inviteButtonChecking: 'Checking...',
-
- loginButton: 'Log in'
- },
-
- notification: {
- invalidCode: 'The specified code is invalid or has expired'
- },
-
- uppyDashboard: {
- done: 'Done',
- dropPaste: 'Drop files here, paste or',
- browse: 'browse'
- },
-
-
- admin: {
- login: {
- usernamePlaceholder: 'Username or e-mail address',
- passwordPlaceholder: 'Password',
- button: 'Login',
- buttonChecking: 'Checking...'
- }
- }
- },
-
- nl: {
- title: 'Bestandsoverdracht - Recv',
- disclaimer: '',
-
- landing: {
- invitePlaceholder: 'Code',
- inviteButton: 'Controleer code',
- inviteButtonChecking: 'Controleren...',
-
- loginButton: 'Inloggen'
- },
-
- notification: {
- invalidCode: 'De ingevoerde code is ongeldig of verlopen'
- },
-
- uppyDashboard: {
- done: 'Gereed',
- dropPaste: 'Sleep bestanden, plak of ',
- browse: 'selecteer'
- },
-
-
- admin: {
- login: {
- usernamePlaceholder: 'Gebruikersnaam of e-mail adres',
- passwordPlaceholder: 'Wachtwoord',
- button: 'Inloggen',
- buttonChecking: 'Controleren...'
- }
- }
- }
+ en: en,
+ nl: nl
}
\ No newline at end of file
diff --git a/public/src/locale/en.js b/public/src/locale/en.js
new file mode 100644
index 0000000..7c26b8d
--- /dev/null
+++ b/public/src/locale/en.js
@@ -0,0 +1,53 @@
+export default {
+ title: 'File upload - Recv',
+ disclaimer: '',
+
+ landing: {
+ invitePlaceholder: 'Code',
+ inviteButton: 'Check code',
+ inviteButtonChecking: 'Checking...',
+
+ loginButton: 'Log in'
+ },
+
+ notification: {
+ invalidCode: 'The specified code is invalid or has expired'
+ },
+
+ uppyDashboard: {
+ done: 'Done',
+ dropPaste: 'Drop files here, paste or',
+ browse: 'browse'
+ },
+
+
+ admin: {
+ loading: 'Loading…',
+ empty: 'No data',
+
+ login: {
+ usernamePlaceholder: 'Username or e-mail address',
+ passwordPlaceholder: 'Password',
+ button: 'Login',
+ buttonChecking: 'Checking...'
+ },
+
+ menu: {
+ uploads: 'Uploads',
+ codes: 'Codes',
+ users: 'Users'
+ },
+
+ uploads: {
+ created: 'Date',
+ owner: 'Owner'
+ },
+
+ codes: {
+ code: 'Code',
+ owner: 'Owner',
+
+ add: 'Generate code'
+ }
+ }
+}
\ No newline at end of file
diff --git a/public/src/locale/nl.js b/public/src/locale/nl.js
new file mode 100644
index 0000000..a29a068
--- /dev/null
+++ b/public/src/locale/nl.js
@@ -0,0 +1,53 @@
+export default {
+ title: 'Bestandsoverdracht - Recv',
+ disclaimer: '',
+
+ landing: {
+ invitePlaceholder: 'Code',
+ inviteButton: 'Controleer code',
+ inviteButtonChecking: 'Controleren...',
+
+ loginButton: 'Inloggen'
+ },
+
+ notification: {
+ invalidCode: 'De ingevoerde code is ongeldig of verlopen'
+ },
+
+ uppyDashboard: {
+ done: 'Gereed',
+ dropPaste: 'Sleep bestanden, plak of ',
+ browse: 'selecteer'
+ },
+
+
+ admin: {
+ loading: 'Bezig met laden…',
+ empty: 'Geen gegevens',
+
+ login: {
+ usernamePlaceholder: 'Gebruikersnaam of e-mail adres',
+ passwordPlaceholder: 'Wachtwoord',
+ button: 'Inloggen',
+ buttonChecking: 'Controleren...'
+ },
+
+ menu: {
+ uploads: 'Uploads',
+ codes: 'Codes',
+ users: 'Gebruikers'
+ },
+
+ uploads: {
+ created: 'Datum',
+ owner: 'Eigenaar'
+ },
+
+ codes: {
+ code: 'Code',
+ owner: 'Eigenaar',
+
+ add: 'Genereer code'
+ }
+ }
+}
\ No newline at end of file
diff --git a/public/src/route/admin/Codes.vue b/public/src/route/admin/Codes.vue
index 188fab2..b2ee459 100644
--- a/public/src/route/admin/Codes.vue
+++ b/public/src/route/admin/Codes.vue
@@ -1,4 +1,85 @@
+
+
+
+
+
+
{{ $t('admin.codes.add') }}
+
+
+
+
+
+
+
{{ code.id }}
+
{{ code.username }}
+
+
+
+
+ {{ $t('admin.empty') }}
+
+
+
+
+ {{ $t('admin.loading') }}
+
+
+
+
+
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/public/src/route/admin/Landing.vue b/public/src/route/admin/Landing.vue
index 080923b..3be8568 100644
--- a/public/src/route/admin/Landing.vue
+++ b/public/src/route/admin/Landing.vue
@@ -7,4 +7,42 @@
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/public/src/route/admin/Login.vue b/public/src/route/admin/Login.vue
index a2fd467..e186f7b 100644
--- a/public/src/route/admin/Login.vue
+++ b/public/src/route/admin/Login.vue
@@ -20,8 +20,11 @@
+
+
\ No newline at end of file
diff --git a/public/src/route/admin/Uploads.vue b/public/src/route/admin/Uploads.vue
new file mode 100644
index 0000000..8322f0a
--- /dev/null
+++ b/public/src/route/admin/Uploads.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
+
+
+
+
{{ upload.created }}
+
{{ upload.username }}
+
+
+
+ {{ file.name }}
+
+
+
+
+
+
+ {{ $t('admin.empty') }}
+
+
+
+
+ {{ $t('admin.loading') }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/src/route/admin/Users.vue b/public/src/route/admin/Users.vue
index 188fab2..37c44fa 100644
--- a/public/src/route/admin/Users.vue
+++ b/public/src/route/admin/Users.vue
@@ -1,4 +1,25 @@
+
+
+
+
\ No newline at end of file
diff --git a/public/src/shared.js b/public/src/shared.js
index 16ad717..20aa07b 100644
--- a/public/src/shared.js
+++ b/public/src/shared.js
@@ -1,9 +1,26 @@
import Vue from 'vue';
+import Cookies from 'js-cookie';
export default new Vue({
- data () {
+ data() {
return {
token: null
}
},
+
+ created()
+ {
+ var self = this;
+
+ var cookie = Cookies.get('token');
+ if (typeof cookie !== 'undefined')
+ self.token = cookie;
+ },
+
+ watch: {
+ token(newValue)
+ {
+ Cookies.set('token', newValue);
+ }
+ }
});
\ No newline at end of file