Bladeren bron

move assets outside app

pull/44/head
Guillaume Vincent 8 jaren geleden
bovenliggende
commit
a9aa25099b
39 gewijzigde bestanden met toevoegingen van 0 en 133 verwijderingen
  1. +0
    -43
      app/router.js
  2. +0
    -55
      app/services/auth.js
  3. +0
    -35
      app/services/logging.js
  4. +0
    -0
      assets/favicons/android-chrome-144x144.png
  5. +0
    -0
      assets/favicons/android-chrome-192x192.png
  6. +0
    -0
      assets/favicons/android-chrome-36x36.png
  7. +0
    -0
      assets/favicons/android-chrome-48x48.png
  8. +0
    -0
      assets/favicons/android-chrome-72x72.png
  9. +0
    -0
      assets/favicons/android-chrome-96x96.png
  10. +0
    -0
      assets/favicons/apple-touch-icon-114x114.png
  11. +0
    -0
      assets/favicons/apple-touch-icon-120x120.png
  12. +0
    -0
      assets/favicons/apple-touch-icon-144x144.png
  13. +0
    -0
      assets/favicons/apple-touch-icon-152x152.png
  14. +0
    -0
      assets/favicons/apple-touch-icon-180x180.png
  15. +0
    -0
      assets/favicons/apple-touch-icon-57x57.png
  16. +0
    -0
      assets/favicons/apple-touch-icon-60x60.png
  17. +0
    -0
      assets/favicons/apple-touch-icon-72x72.png
  18. +0
    -0
      assets/favicons/apple-touch-icon-76x76.png
  19. +0
    -0
      assets/favicons/apple-touch-icon-precomposed.png
  20. +0
    -0
      assets/favicons/apple-touch-icon.png
  21. +0
    -0
      assets/favicons/browserconfig.xml
  22. +0
    -0
      assets/favicons/favicon-16x16.png
  23. +0
    -0
      assets/favicons/favicon-32x32.png
  24. +0
    -0
      assets/favicons/favicon-96x96.png
  25. +0
    -0
      assets/favicons/favicon.ico
  26. +0
    -0
      assets/favicons/manifest.json
  27. +0
    -0
      assets/favicons/mstile-144x144.png
  28. +0
    -0
      assets/favicons/mstile-150x150.png
  29. +0
    -0
      assets/favicons/mstile-310x150.png
  30. +0
    -0
      assets/favicons/mstile-310x310.png
  31. +0
    -0
      assets/favicons/mstile-70x70.png
  32. +0
    -0
      assets/favicons/safari-pinned-tab.svg
  33. +0
    -0
      assets/images/featurettes.svg
  34. +0
    -0
      assets/images/lesspass.svg
  35. +0
    -0
      assets/images/logo-white.svg
  36. +0
    -0
      assets/images/logo.svg
  37. +0
    -0
      assets/images/story-en.svg
  38. +0
    -0
      assets/images/story-fr.svg
  39. +0
    -0
      assets/robots.txt

+ 0
- 43
app/router.js Bestand weergeven

@@ -1,43 +0,0 @@
var Vue = require('vue');
var Router = require('vue-router');

var App = require('./app.vue');
var IndexView = require('./components/index.vue');
var Dashboard = require('./components/dashboard.vue');

Vue.use(Router);

var router = new Router();

router.map({
'/': {
auth: true,
component: Dashboard
},
'/presentation/': {
component: IndexView
}
});

router.redirect({
'*': '/'
});

router.start(App, '#app');

var Auth = require('./services/auth.js');

Auth.checkAuth();

router.beforeEach(function (transition) {
if (transition.to.auth && !Auth.user.authenticated) {
transition.redirect('/presentation/')
} else {
transition.next()
}
});

module.exports = router;




+ 0
- 55
app/services/auth.js Bestand weergeven

@@ -1,55 +0,0 @@
var logging = require('./logging.js');

module.exports = {
user: {
authenticated: false
},

login(context, credentials, callback) {
var self = this;
context.$http.post('/api/sessions/', credentials).then(
function (response) {
localStorage.setItem('token', response.data.token);
self.user.authenticated = true;
if (callback) {
logging.success(this.$t('login.welcome'));
callback();
}
},
function () {
logging.error(this.$t('login.credentials_invalids'));
}
);
},

register(context, user) {
var self = this;
context.$http.post('/api/users/', user).then(
function (response) {
logging.warning(this.$t('register.beta'));
},
function (error) {
logging.warning(this.$t('register.beta'));
}
);
},

logout(callback) {
localStorage.removeItem('token');
this.user.authenticated = false;
if (callback) {
callback();
}
},

checkAuth() {
var jwt = localStorage.getItem('token');
this.user.authenticated = !!jwt;
},

getAuthHeader() {
return {
'Authorization': 'Bearer ' + localStorage.getItem('token')
}
}
};

+ 0
- 35
app/services/logging.js Bestand weergeven

@@ -1,35 +0,0 @@
var toastr = require('toastr');
require('toastr/build/toastr.min.css');

toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": true,
"progressBar": false,
"positionClass": "toast-top-center",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "10000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};

module.exports = {
error(message){
toastr.error(message);
},
success(message){
toastr.success(message);
},
warning(message){
toastr.warning(message);
},
clear(){
toastr.clear();
}
};

app/assets/favicons/android-chrome-144x144.png → assets/favicons/android-chrome-144x144.png Bestand weergeven


app/assets/favicons/android-chrome-192x192.png → assets/favicons/android-chrome-192x192.png Bestand weergeven


app/assets/favicons/android-chrome-36x36.png → assets/favicons/android-chrome-36x36.png Bestand weergeven


app/assets/favicons/android-chrome-48x48.png → assets/favicons/android-chrome-48x48.png Bestand weergeven


app/assets/favicons/android-chrome-72x72.png → assets/favicons/android-chrome-72x72.png Bestand weergeven


app/assets/favicons/android-chrome-96x96.png → assets/favicons/android-chrome-96x96.png Bestand weergeven


app/assets/favicons/apple-touch-icon-114x114.png → assets/favicons/apple-touch-icon-114x114.png Bestand weergeven


app/assets/favicons/apple-touch-icon-120x120.png → assets/favicons/apple-touch-icon-120x120.png Bestand weergeven


app/assets/favicons/apple-touch-icon-144x144.png → assets/favicons/apple-touch-icon-144x144.png Bestand weergeven


app/assets/favicons/apple-touch-icon-152x152.png → assets/favicons/apple-touch-icon-152x152.png Bestand weergeven


app/assets/favicons/apple-touch-icon-180x180.png → assets/favicons/apple-touch-icon-180x180.png Bestand weergeven


app/assets/favicons/apple-touch-icon-57x57.png → assets/favicons/apple-touch-icon-57x57.png Bestand weergeven


app/assets/favicons/apple-touch-icon-60x60.png → assets/favicons/apple-touch-icon-60x60.png Bestand weergeven


app/assets/favicons/apple-touch-icon-72x72.png → assets/favicons/apple-touch-icon-72x72.png Bestand weergeven


app/assets/favicons/apple-touch-icon-76x76.png → assets/favicons/apple-touch-icon-76x76.png Bestand weergeven


app/assets/favicons/apple-touch-icon-precomposed.png → assets/favicons/apple-touch-icon-precomposed.png Bestand weergeven


app/assets/favicons/apple-touch-icon.png → assets/favicons/apple-touch-icon.png Bestand weergeven


app/assets/favicons/browserconfig.xml → assets/favicons/browserconfig.xml Bestand weergeven


app/assets/favicons/favicon-16x16.png → assets/favicons/favicon-16x16.png Bestand weergeven


app/assets/favicons/favicon-32x32.png → assets/favicons/favicon-32x32.png Bestand weergeven


app/assets/favicons/favicon-96x96.png → assets/favicons/favicon-96x96.png Bestand weergeven


app/assets/favicons/favicon.ico → assets/favicons/favicon.ico Bestand weergeven


app/assets/favicons/manifest.json → assets/favicons/manifest.json Bestand weergeven


app/assets/favicons/mstile-144x144.png → assets/favicons/mstile-144x144.png Bestand weergeven


app/assets/favicons/mstile-150x150.png → assets/favicons/mstile-150x150.png Bestand weergeven


app/assets/favicons/mstile-310x150.png → assets/favicons/mstile-310x150.png Bestand weergeven


app/assets/favicons/mstile-310x310.png → assets/favicons/mstile-310x310.png Bestand weergeven


app/assets/favicons/mstile-70x70.png → assets/favicons/mstile-70x70.png Bestand weergeven


app/assets/favicons/safari-pinned-tab.svg → assets/favicons/safari-pinned-tab.svg Bestand weergeven


app/assets/images/featurettes.svg → assets/images/featurettes.svg Bestand weergeven


app/assets/images/lesspass.svg → assets/images/lesspass.svg Bestand weergeven


app/assets/images/logo-white.svg → assets/images/logo-white.svg Bestand weergeven


app/assets/images/logo.svg → assets/images/logo.svg Bestand weergeven


app/assets/images/story-en.svg → assets/images/story-en.svg Bestand weergeven


app/assets/images/story-fr.svg → assets/images/story-fr.svg Bestand weergeven


app/assets/robots.txt → assets/robots.txt Bestand weergeven


Laden…
Annuleren
Opslaan