Update colors, icons, and fonts

This commit is contained in:
Scott Nonnenberg 2019-10-04 11:06:17 -07:00
parent 28aed8247f
commit c81c25bb85
225 changed files with 3080 additions and 4594 deletions

View file

@ -102,7 +102,7 @@
window.isActive = () => {
const now = Date.now();
return now <= activeTimestamp + ACTIVE_TIMEOUT;
return window.isFocused() && now <= activeTimestamp + ACTIVE_TIMEOUT;
};
window.registerForActive = handler => activeHandlers.push(handler);
window.unregisterForActive = handler => {
@ -110,91 +110,16 @@
};
// Load these images now to ensure that they don't flicker on first use
const images = [];
window.preloadedImages = [];
function preload(list) {
for (let index = 0, max = list.length; index < max; index += 1) {
const image = new Image();
image.src = `./images/${list[index]}`;
images.push(image);
window.preloadedImages.push(image);
}
}
preload([
'alert-outline.svg',
'android.svg',
'apple.svg',
'appstore.svg',
'audio.svg',
'back.svg',
'chat-bubble-outline.svg',
'chat-bubble.svg',
'check-circle-outline.svg',
'check.svg',
'clock.svg',
'close-circle.svg',
'delete.svg',
'dots-horizontal.svg',
'double-check.svg',
'down.svg',
'download.svg',
'ellipsis.svg',
'error.svg',
'error_red.svg',
'file-gradient.svg',
'file.svg',
'folder-outline.svg',
'forward.svg',
'gear.svg',
'group_default.png',
'hourglass_empty.svg',
'hourglass_full.svg',
'icon_1024.png',
'icon_128.png',
'icon_16.png',
'icon_250.png',
'icon_256.png',
'icon_32.png',
'icon_48.png',
'image.svg',
'import.svg',
'lead-pencil.svg',
'menu.svg',
'microphone.svg',
'movie.svg',
'open_link.svg',
'paperclip.svg',
'play.svg',
'playstore.png',
'read.svg',
'reply.svg',
'save.svg',
'search.svg',
'sending.svg',
'shield.svg',
'signal-laptop.png',
'signal-phone.png',
'smile.svg',
'sync.svg',
'timer-00.svg',
'timer-05.svg',
'timer-10.svg',
'timer-15.svg',
'timer-20.svg',
'timer-25.svg',
'timer-30.svg',
'timer-35.svg',
'timer-40.svg',
'timer-45.svg',
'timer-50.svg',
'timer-55.svg',
'timer-60.svg',
'timer.svg',
'verified-check.svg',
'video.svg',
'voice.svg',
'warning.svg',
'x.svg',
'x_white.svg',
]);
const builtInImages = await window.getBuiltInImages();
preload(builtInImages);
// We add this to window here because the default Node context is erased at the end
// of preload.js processing