diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2024-05-01 19:34:25 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-01 19:34:25 +0200 |
| commit | 2ee4175437bbfcddf98e5eacba9b019113716ac8 (patch) | |
| tree | aff6c7c9adfc27f0f33ab4e14edcf17829dbb282 /electron/service/utils/spinner.js | |
| parent | eb64c88a8bf9c8fe66c33a5309d28e526b994d25 (diff) | |
Remove electron entirely (#2859)
Co-authored-by: rejbasket
Diffstat (limited to 'electron/service/utils/spinner.js')
| -rw-r--r-- | electron/service/utils/spinner.js | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/electron/service/utils/spinner.js b/electron/service/utils/spinner.js deleted file mode 100644 index d643a933..00000000 --- a/electron/service/utils/spinner.js +++ /dev/null @@ -1,57 +0,0 @@ -'use strict' - -const ora = require('ora') -const chalk = require('chalk') - -const spinner = ora() -let lastMsg = null -let isPaused = false - -exports.logWithSpinner = (symbol, msg) => { - if (!msg) { - msg = symbol - symbol = chalk.green('✔') - } - if (lastMsg) { - spinner.stopAndPersist({ - symbol: lastMsg.symbol, - text: lastMsg.text, - }) - } - spinner.text = ' ' + msg - lastMsg = { - symbol: symbol + ' ', - text: msg, - } - spinner.start() -} - -exports.stopSpinner = (persist) => { - if (lastMsg && persist !== false) { - spinner.stopAndPersist({ - symbol: lastMsg.symbol, - text: lastMsg.text, - }) - } else { - spinner.stop() - } - lastMsg = null -} - -exports.pauseSpinner = () => { - if (spinner.isSpinning) { - spinner.stop() - isPaused = true - } -} - -exports.resumeSpinner = () => { - if (isPaused) { - spinner.start() - isPaused = false - } -} - -exports.failSpinner = (text) => { - spinner.fail(text) -} |
