feat: confetti during setup success

This commit is contained in:
NGPixel 2020-05-21 00:34:24 -04:00
parent 6b561623ee
commit 9bd77a9ccd
3 changed files with 12 additions and 0 deletions

View File

@ -104,6 +104,7 @@
import _ from 'lodash' import _ from 'lodash'
import validate from 'validate.js' import validate from 'validate.js'
import { BreedingRhombusSpinner } from 'epic-spinners' import { BreedingRhombusSpinner } from 'epic-spinners'
import confetti from 'canvas-confetti'
/* global siteConfig */ /* global siteConfig */
@ -206,6 +207,11 @@ export default {
if (resp.ok === true) { if (resp.ok === true) {
_.delay(() => { _.delay(() => {
confetti({
particleCount: 100,
spread: 70,
zIndex: 100000
})
this.success = true this.success = true
_.delay(() => { _.delay(() => {
window.location.assign('/login') window.location.assign('/login')

View File

@ -217,6 +217,7 @@
"babel-plugin-prismjs": "2.0.1", "babel-plugin-prismjs": "2.0.1",
"babel-plugin-transform-imports": "2.0.0", "babel-plugin-transform-imports": "2.0.0",
"cache-loader": "4.1.0", "cache-loader": "4.1.0",
"canvas-confetti": "1.2.0",
"chart.js": "2.9.3", "chart.js": "2.9.3",
"clean-webpack-plugin": "3.0.0", "clean-webpack-plugin": "3.0.0",
"clipboard": "2.0.6", "clipboard": "2.0.6",

View File

@ -4704,6 +4704,11 @@ caniuse-lite@^1.0.30001039:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001040.tgz#103fc8e6eb1d7397e95134cd0e996743353d58ea"
integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ== integrity sha512-Ep0tEPeI5wCvmJNrXjE3etgfI+lkl1fTDU6Y3ZH1mhrjkPlVI9W4pcKbMo+BQLpEWKVYYp2EmYaRsqpPC3k7lQ==
canvas-confetti@1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/canvas-confetti/-/canvas-confetti-1.2.0.tgz#5591764e1126adb08710d20bc9ba63842a3d8ee6"
integrity sha512-0B49O9CfLciAYz4hriu9pvWNGkCtVcpvyNFKWZI+JVWJM5nJTMg5MX3cFzatyeYcOL6bR1Jw3yhZKbgt03O8/Q==
capture-exit@^2.0.0: capture-exit@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4"