From 2d6280a315a098c0c59d748ca3edf276d4b2c4f9 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sun, 4 Aug 2019 16:41:47 -0500 Subject: [PATCH] tidies and rm some boilerplate --- src/FilterLists.Web.V2/package-lock.json | Bin 542414 -> 542413 bytes src/FilterLists.Web.V2/package.json | 2 +- src/FilterLists.Web.V2/src/App.css | 33 -------------------- src/FilterLists.Web.V2/src/App.tsx | 2 +- src/FilterLists.Web.V2/src/index.css | 6 ++-- src/FilterLists.Web.V2/src/index.tsx | 2 +- src/FilterLists.Web.V2/src/logo.svg | 7 ----- src/FilterLists.Web.V2/src/serviceWorker.ts | 16 +++++----- src/FilterLists.Web.V2/tsconfig.json | 2 +- 9 files changed, 15 insertions(+), 55 deletions(-) delete mode 100644 src/FilterLists.Web.V2/src/logo.svg diff --git a/src/FilterLists.Web.V2/package-lock.json b/src/FilterLists.Web.V2/package-lock.json index c6c1284cc9249255342a3c76d7c9c5956fbdb3c0..15449eb4e06ba87ef51fee84dcafd92157f57ed1 100644 GIT binary patch delta 25 gcmX@tt9Z6ov7v>rg{g(Pg{6hHg{_5s3&&YE0Dip){{R30 delta 27 icmX@xt9Y(gv7v>rg{g(Pg{6hHg{_5s3&&YEMlJx5#0d%j diff --git a/src/FilterLists.Web.V2/package.json b/src/FilterLists.Web.V2/package.json index 9554ac1bc..8c6e4ee0b 100644 --- a/src/FilterLists.Web.V2/package.json +++ b/src/FilterLists.Web.V2/package.json @@ -38,4 +38,4 @@ "last 1 safari version" ] } -} +} \ No newline at end of file diff --git a/src/FilterLists.Web.V2/src/App.css b/src/FilterLists.Web.V2/src/App.css index b41d297ca..e69de29bb 100644 --- a/src/FilterLists.Web.V2/src/App.css +++ b/src/FilterLists.Web.V2/src/App.css @@ -1,33 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - animation: App-logo-spin infinite 20s linear; - height: 40vmin; - pointer-events: none; -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/src/FilterLists.Web.V2/src/App.tsx b/src/FilterLists.Web.V2/src/App.tsx index 689b99593..70a5b15fe 100644 --- a/src/FilterLists.Web.V2/src/App.tsx +++ b/src/FilterLists.Web.V2/src/App.tsx @@ -1,6 +1,6 @@ +import { Button } from 'antd'; import React from 'react'; import './App.css'; -import { Button } from 'antd'; const App: React.FC = () => { return ( diff --git a/src/FilterLists.Web.V2/src/index.css b/src/FilterLists.Web.V2/src/index.css index ec2585e8c..4a1df4db7 100644 --- a/src/FilterLists.Web.V2/src/index.css +++ b/src/FilterLists.Web.V2/src/index.css @@ -1,13 +1,13 @@ body { margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", + "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { - font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace; } diff --git a/src/FilterLists.Web.V2/src/index.tsx b/src/FilterLists.Web.V2/src/index.tsx index 87d1be551..57a536ca7 100644 --- a/src/FilterLists.Web.V2/src/index.tsx +++ b/src/FilterLists.Web.V2/src/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import './index.css'; import App from './App'; +import './index.css'; import * as serviceWorker from './serviceWorker'; ReactDOM.render(, document.getElementById('root')); diff --git a/src/FilterLists.Web.V2/src/logo.svg b/src/FilterLists.Web.V2/src/logo.svg deleted file mode 100644 index 6b60c1042..000000000 --- a/src/FilterLists.Web.V2/src/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/FilterLists.Web.V2/src/serviceWorker.ts b/src/FilterLists.Web.V2/src/serviceWorker.ts index 15d90cb81..b3793f855 100644 --- a/src/FilterLists.Web.V2/src/serviceWorker.ts +++ b/src/FilterLists.Web.V2/src/serviceWorker.ts @@ -12,12 +12,12 @@ const isLocalhost = Boolean( window.location.hostname === 'localhost' || - // [::1] is the IPv6 localhost address. - window.location.hostname === '[::1]' || - // 127.0.0.1/8 is considered localhost for IPv4. - window.location.hostname.match( - /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ - ) + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) ); type Config = { @@ -51,7 +51,7 @@ export function register(config?: Config) { navigator.serviceWorker.ready.then(() => { console.log( 'This web app is being served cache-first by a service ' + - 'worker. To learn more, visit https://bit.ly/CRA-PWA' + 'worker. To learn more, visit https://bit.ly/CRA-PWA' ); }); } else { @@ -79,7 +79,7 @@ function registerValidSW(swUrl: string, config?: Config) { // content until all client tabs are closed. console.log( 'New content is available and will be used when all ' + - 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' ); // Execute callback diff --git a/src/FilterLists.Web.V2/tsconfig.json b/src/FilterLists.Web.V2/tsconfig.json index 0980b23fa..755462aec 100644 --- a/src/FilterLists.Web.V2/tsconfig.json +++ b/src/FilterLists.Web.V2/tsconfig.json @@ -22,4 +22,4 @@ "include": [ "src" ] -} +} \ No newline at end of file