Merge pull request #516 from mozilla/cache-assets

cache assets
This commit is contained in:
Danny Coates 2017-08-16 17:44:09 -07:00 committed by GitHub
commit ad82d30dd9
17 changed files with 850 additions and 55 deletions

View file

@ -3,6 +3,8 @@ import Storage from './storage';
import * as metrics from './metrics';
import { allowedCopy, copyToClipboard, ONE_DAY_IN_MS } from './utils';
import bel from 'bel';
import copyImg from '../../public/resources/copy-16.svg';
import closeImg from '../../public/resources/close-16.svg';
const HOUR = 1000 * 60 * 60;
const storage = new Storage();
@ -58,13 +60,13 @@ function addFile(file) {
<td>${file.name}</td>
<td>
<span class="icon-docs" data-l10n-id="copyUrlHover"></span>
<img onclick=${copyClick} src="/resources/copy-16.svg" class="icon-copy" data-l10n-id="copyUrlHover">
<img onclick=${copyClick} src="${copyImg}" class="icon-copy" data-l10n-id="copyUrlHover">
<span data-l10n-id="copiedUrl" class="text-copied" hidden="true"></span>
</td>
<td>${timeLeft(countdown)}</td>
<td>
<span class="icon-cancel-1" data-l10n-id="deleteButtonHover" title="Delete"></span>
<img onclick=${showPopup} src="/resources/close-16.svg" class="icon-delete" data-l10n-id="deleteButtonHover" title="Delete">
<img onclick=${showPopup} src="${closeImg}" class="icon-delete" data-l10n-id="deleteButtonHover" title="Delete">
<div class="popup">
<div class="popuptext" onclick=${stopProp} onblur=${cancel} tabindex="-1">
<div class="popup-message" data-l10n-id="deletePopupText"></div>

View file

@ -1,6 +1,6 @@
/*** index.html ***/
html {
background: url('resources/send_bg.svg');
background: url('../../public/resources/send_bg.svg');
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'segoe ui',
'helvetica neue', helvetica, ubuntu, roboto, noto, arial, sans-serif;
font-weight: 200;
@ -89,7 +89,7 @@ body {
.feedback {
background-color: #0297f8;
background-image: url('resources/feedback.svg');
background-image: url('../../public/resources/feedback.svg');
background-position: 2px 4px;
background-repeat: no-repeat;
background-size: 18px;