Bladeren bron

remove toastr and replace it with notie

pull/342/head
Guillaume Vincent 8 jaren geleden
bovenliggende
commit
62be70e2c6
3 gewijzigde bestanden met toevoegingen van 15 en 28 verwijderingen
  1. +1
    -0
      package.json
  2. +1
    -1
      src/app.vue
  3. +13
    -27
      src/services/logging.js

+ 1
- 0
package.json Bestand weergeven

@@ -18,6 +18,7 @@
"jquery": "^2.2.2",
"lesspass": "^2.0.1",
"moment": "^2.12.0",
"notie": "^3.2.0",
"tether": "^1.2.0",
"toastr": "^2.1.2",
"vue": "^1.0.20",


+ 1
- 1
src/app.vue Bestand weergeven

@@ -1,7 +1,7 @@
<style lang="sass">
@import '../node_modules/bootstrap/scss/bootstrap.scss';
@import '../node_modules/ionicons/dist/css/ionicons.css';
@import '../node_modules/toastr/build/toastr.css';
@import '../node_modules/notie/dist/notie.css';

html, body {
width: 100%;


+ 13
- 27
src/services/logging.js Bestand weergeven

@@ -1,34 +1,20 @@
import toastr from 'toastr';
import notie from 'notie';

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'
};
notie.setOptions({
colorSuccess: '#449d44',
colorWarning: '#f0ad4e',
colorError: '#d9534f',
colorText: '#FFFFFF'
});

module.exports = {
error(message) {
toastr.error(message);
},
success(message) {
toastr.success(message);
error(message, duration = 3) {
notie.alert(3, message, duration);
},
warning(message) {
toastr.warning(message);
success(message, duration) {
notie.alert(1, message, duration);
},
clear() {
toastr.clear();
warning(message, duration) {
notie.alert(2, message, duration);
}
};

Laden…
Annuleren
Opslaan