From 24571df531c95254eb1739f8c86f77c29609ffb9 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 26 Nov 2018 22:00:06 -0700 Subject: [PATCH] Making front end prettier --- server/ui/fuse.js | 2 + server/ui/src/index.html | 2 + server/ui/src/index.tsx | 29 ++++--- server/ui/yarn.lock | 177 ++++++++++++++++++++------------------- 4 files changed, 107 insertions(+), 103 deletions(-) diff --git a/server/ui/fuse.js b/server/ui/fuse.js index a43ac1b..187d7c1 100644 --- a/server/ui/fuse.js +++ b/server/ui/fuse.js @@ -5,6 +5,7 @@ const { CSSPlugin, WebIndexPlugin, QuantumPlugin, + CopyPlugin } = require('fuse-box'); // const transformInferno = require('../../dist').default const transformInferno = require('ts-transform-inferno').default; @@ -26,6 +27,7 @@ Sparky.task('config', _ => { plugins: [ EnvPlugin({ NODE_ENV: isProduction ? 'production' : 'development' }), CSSPlugin(), + CopyPlugin({ files: ["src/favicon.ico"] }), WebIndexPlugin({ title: 'Inferno Typescript FuseBox Example', template: 'src/index.html', diff --git a/server/ui/src/index.html b/server/ui/src/index.html index eaa950d..6d814d3 100644 --- a/server/ui/src/index.html +++ b/server/ui/src/index.html @@ -5,6 +5,8 @@ + + Torrents.csv diff --git a/server/ui/src/index.tsx b/server/ui/src/index.tsx index 7f4e375..68ec49c 100644 --- a/server/ui/src/index.tsx +++ b/server/ui/src/index.tsx @@ -77,15 +77,15 @@ class TorrentSearchComponent extends Component { table() { return (
-
- +
+
- + - - + + @@ -93,17 +93,17 @@ class TorrentSearchComponent extends Component { {this.state.results.torrents.map(torrent => ( - - - - + + + @@ -119,7 +119,7 @@ class TorrentSearchComponent extends Component { navbar() { return ( -
NameName Size SeedsLeechesCreatedLeechesCreated
{torrent.name}{humanFileSize(torrent.size_bytes, true)}{torrent.seeders}{torrent.leechers} + {humanFileSize(torrent.size_bytes, true)}
{torrent.seeders}
{torrent.leechers} {moment(torrent.created_unix * 1000).fromNow()} - +