Skip to content

Commit

Permalink
Merge pull request #28 from ritz078/fixes-
Browse files Browse the repository at this point in the history
fix(magnet): fix incorrect magnet link name in downloads page
  • Loading branch information
ritz078 authored Jun 13, 2017
2 parents bca8df5 + 38af7b3 commit f869473
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 84 deletions.
10 changes: 6 additions & 4 deletions main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ const fixPath = require('fix-path');
const dev = require('electron-is-dev');
const root = require('window-or-global');
const { moveToApplications } = require('electron-lets-move');
const unhandled = require('electron-unhandled');
const downloadTorrent = require('./middleware/download');
const template = require('./template');
const { logError } = require('./utils/logEmitter');

// adds debug features like hotkeys for triggering dev tools and reload
require('electron-debug')();

unhandled();
process.on('unhandledRejection', (error) => {
logError(error);
});

const server = require('./server');
const { addToConfig, readConfig } = require('snape-config');
Expand Down Expand Up @@ -53,7 +55,7 @@ async function createWindow() {
backgroundColor: '#ffffff',
width: 1000,
minWidth: 1000,
skipTaskbar: true
skipTaskbar: true,
});

root.win = win;
Expand All @@ -76,7 +78,7 @@ async function createWindow() {
const {
default: installExtension,
REACT_DEVELOPER_TOOLS,
REDUX_DEVTOOLS
REDUX_DEVTOOLS,
} = require('electron-devtools-installer');

installExtension(REACT_DEVELOPER_TOOLS);
Expand Down
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snape",
"version": "0.1.7",
"version": "0.1.8",
"description": "A torrent client to search, stream and download torrents. Play music, view images and stream videos.",
"engines": {
"node": ">=6"
Expand Down Expand Up @@ -42,7 +42,6 @@
"electron-debug": "^1.1.0",
"electron-is-dev": "^0.1.2",
"electron-lets-move": "^0.0.5",
"electron-unhandled": "^0.2.0",
"express": "^4.15.3",
"fix-path": "^2.1.0",
"get-port": "^3.1.0",
Expand All @@ -59,34 +58,34 @@
"postcss-easy-import": "^2.1.0",
"pretty-bytes": "^4.0.2",
"prop-types": "^15.5.10",
"protobufjs": "^6.7.3",
"protobufjs": "^6.8.0",
"pump": "^1.0.2",
"query-string": "^4.3.4",
"range-parser": "^1.2.0",
"rc-slider": "^8.0.2",
"rc-slider": "^8.1.2",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-ink": "^6.2.0",
"react-lazy-card": "^0.1.5",
"react-loading-bar": "^0.0.4",
"react-modal": "^1.7.8",
"react-modal": "^1.9.4",
"react-notification-badge": "^1.3.3",
"react-photostory": "^0.6.2",
"react-redux": "^5.0.5",
"react-toastify": "^1.7.0",
"react-virtualized": "^9.7.6",
"react-virtualized": "^9.8.0",
"redux": "^3.6.0",
"redux-create-reducer": "^1.1.1",
"redux-observable": "^0.14.1",
"rimraf": "^2.6.1",
"rxjs": "^5.4.0",
"sinon": "^2.3.2",
"sinon": "^2.3.4",
"snape-config": "^0.0.1",
"snape-thepiratebay": "^1.4.2",
"spectre.css": "^0.2.14",
"styled-components": "^2.0.1",
"tempy": "^0.1.0",
"url-loader": "^0.5.8",
"url-loader": "^0.5.9",
"vlc-command": "^1.1.1",
"webtorrent": "^0.98.18",
"window-or-global": "^1.0.1"
Expand All @@ -104,7 +103,7 @@
"devtron": "^1.4.0",
"electron": "1.7.2",
"electron-builder": "^18.6.2",
"electron-builder-squirrel-windows": "^18.6.0",
"electron-builder-squirrel-windows": "^19.2.0",
"electron-devtools-installer": "^2.2.0",
"electron-rebuild": "^1.5.11",
"eslint": "^3.19.0",
Expand All @@ -117,9 +116,9 @@
"husky": "^0.13.4",
"less": "^2.7.2",
"less-loader": "^4.0.4",
"lint-staged": "^3.6.0",
"lint-staged": "^3.6.1",
"postcss-loader": "^2.0.5",
"prettier-eslint-cli": "^4.0.4",
"prettier-eslint-cli": "^4.1.0",
"raw-loader": "^0.5.1"
},
"config": {
Expand Down
6 changes: 4 additions & 2 deletions renderer/components/DownloadTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const ContentTitle = styled.div`

export const Name = styled.div`
flex: 0.5;
padding-right: 20px;
`;

const RemoveIcon = styled.i`
Expand Down Expand Up @@ -144,9 +145,10 @@ export default class DownloadTile extends Component {
<ContentTitle index={index} onClick={() => onClick(index)}>
<FixedWidthDiv width="30px">{index + 1}</FixedWidthDiv>
<FixedWidthDiv width="40px">
{getCategoryIcon(`${details.category.name} | ${details.subcategory.name}`)}
{(details.category || details.subcategory) &&
getCategoryIcon(`${details.category.name} | ${details.subcategory.name}`)}
</FixedWidthDiv>
<Name>{details.name}</Name>
<Name className="text-ellipsis">{details.name}</Name>
<Details>
<div>{Math.round(downloadData.progress || 0)} %</div>
<div>{prettyBytes(downloadData.downloadSpeed || 0)}/s</div>
Expand Down
Loading

0 comments on commit f869473

Please sign in to comment.