Skip to content

Commit 3444438

Browse files
committed
add notfound img
1 parent bbb7f47 commit 3444438

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎dist/sw.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// cache, then increment the CACHE_VERSION value. It will kick off the service worker update
2525
// flow and the old cache(s) will be purged as part of the activate event handler when the
2626
// updated service worker is activated.
27-
var CACHE_VERSION = '2019-01-05T08:24:20.847Z';
27+
var CACHE_VERSION = '2019-01-05T08:30:08.448Z';
2828
var CURRENT_CACHES = {
2929
prefetch: 'prefetch-cache-v' + CACHE_VERSION
3030
};
@@ -50,6 +50,10 @@ self.addEventListener('install', function(event) {
5050
"fonts/fontawesome-webfont.ttf",
5151
"fonts/fontawesome-webfont.woff",
5252
"fonts/fontawesome-webfont.woff2",
53+
"js/app.75ffbf6a.js",
54+
"js/app.js",
55+
"js/lib.2ef380a5.js",
56+
"js/lib.js",
5357
"images/404_dribbble.ae94d03c.gif",
5458
"images/404_dribbble.gif",
5559
"images/codelf_logo.f4ae25bd.png",
@@ -62,10 +66,6 @@ self.addEventListener('install', function(event) {
6266
"images/wechatpay.jpg",
6367
"images/zhifubao.70c19370.png",
6468
"images/zhifubao.png",
65-
"js/app.75ffbf6a.js",
66-
"js/app.js",
67-
"js/lib.2ef380a5.js",
68-
"js/lib.js",
6969
"css/themes/default/assets/fonts/brand-icons.eot",
7070
"css/themes/default/assets/fonts/brand-icons.svg",
7171
"css/themes/default/assets/fonts/brand-icons.ttf",

‎src/components/VariableList.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React from 'react';
22
import {Button, Label, Popup} from 'semantic-ui-react';
33
import * as Tools from '../utils/Tools';
4-
import md5 from 'md5';
4+
5+
const notFoundReg = /59ce9297fba93aeb9d693a2f61922fb6|bfd876277827a33f49d363e8857977a0/ig;
6+
const notFoundImg = '//user-images.githubusercontent.com/799578/50722069-7dd28200-1104-11e9-9529-22d686ae2ddf.png';
57

68
class Variable extends React.Component {
79
clipboardId = `clipboardId-${Tools.uuid()}`;
@@ -85,10 +87,8 @@ export default class VariableList extends React.Component {
8587

8688
renderResult() {
8789
// display not found
88-
if (this.props.searchValue
89-
&& /59ce9297fba93aeb9d693a2f61922fb6|bfd876277827a33f49d363e8857977a0/.test(md5(this.props.searchValue))) {
90-
return <img style={{maxWidth: '100%'}}
91-
src='https://user-images.githubusercontent.com/799578/50722069-7dd28200-1104-11e9-9529-22d686ae2ddf.png'/>
90+
if (this.props.searchValue && notFoundReg.test(Tools.MD5(this.props.searchValue))) {
91+
return <img style={{maxWidth: '100%'}} src={notFoundImg}/>
9292
}
9393
return this.renderPage();
9494
}

0 commit comments

Comments
 (0)