constants at the top

Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
Ashesh Vidyut 2019-03-21 23:41:47 +05:30 committed by timvisee
parent a6a3cae5e9
commit a3e8646ea7
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
2 changed files with 1 additions and 2 deletions

View file

@ -1,6 +1,7 @@
const { platform } = require('../utils'); const { platform } = require('../utils');
const assets = require('../../common/assets'); const assets = require('../../common/assets');
const size = 32;
const loaderWidth = 5; const loaderWidth = 5;
const loaderColor = '#0090ed'; const loaderColor = '#0090ed';
@ -19,7 +20,6 @@ function drawCircle(canvas, context, color, lineWidth, outerWidth, percent) {
function drawNewFavicon(progressRatio) { function drawNewFavicon(progressRatio) {
const canvas = document.createElement('canvas'); const canvas = document.createElement('canvas');
const size = 32;
const context = canvas.getContext('2d'); const context = canvas.getContext('2d');
drawCircle(canvas, context, '#efefef', loaderWidth, size, 1); drawCircle(canvas, context, '#efefef', loaderWidth, size, 1);
drawCircle(canvas, context, loaderColor, loaderWidth, size, progressRatio); drawCircle(canvas, context, loaderColor, loaderWidth, size, progressRatio);

View file

@ -9,7 +9,6 @@ module.exports = function(state, emit) {
.filter(archive => !archive.expired) .filter(archive => !archive.expired)
.map(archive => archiveTile(state, emit, archive)); .map(archive => archiveTile(state, emit, archive));
let left = ''; let left = '';
if (state.uploading) { if (state.uploading) {
left = archiveTile.uploading(state, emit); left = archiveTile.uploading(state, emit);
} else if (state.archive.numFiles > 0) { } else if (state.archive.numFiles > 0) {