This commit is contained in:
syuilo
2018-10-09 14:58:37 +09:00
parent f1301a4780
commit ba1c823fb1
4 changed files with 22 additions and 0 deletions

View File

@ -130,3 +130,16 @@ pre
[data-fa]
display inline-block
.swal2-popup
background var(--face) !important
.swal-icon-only
width 180px !important
> .swal2-header
> .swal2-icon
margin 1.25em auto 1.875em
> .swal2-title
display none

View File

@ -103,6 +103,12 @@ export default Vue.extend({
(this as any).api('notes/favorites/create', {
noteId: this.note.id
}).then(() => {
this.$swal({
type: 'success',
showConfirmButton: false,
timer: 1250,
customClass: 'swal-icon-only'
});
this.destroyDom();
});
},

View File

@ -8,6 +8,7 @@ import VueRouter from 'vue-router';
import * as TreeView from 'vue-json-tree-view';
import VAnimateCss from 'v-animate-css';
import VModal from 'vue-js-modal';
import VueSweetalert2 from 'vue-sweetalert2';
import VueHotkey from './common/hotkey';
import App from './app.vue';
@ -26,6 +27,7 @@ Vue.use(TreeView);
Vue.use(VAnimateCss);
Vue.use(VModal);
Vue.use(VueHotkey);
Vue.use(VueSweetalert2);
// Register global directives
require('./common/views/directives');