Skip to content

Commit fede09e

Browse files
committed
# This is a combination of 10 commits.
# This is the 1st commit message: start redesign Too many updates to explain in a commit. See PR :O add size and objects number fix addresses and remove agent version persist file history # This is the commit message #2: outer space # This is the commit message #3: add files to right # This is the commit message #4: update # This is the commit message #5: relative working thing # This is the commit message #6: updates # This is the commit message #7: new font and icons # This is the commit message #8: close #515 # This is the commit message #9: solve objectOf wrong type # This is the commit message #10: update
1 parent 6d2b908 commit fede09e

File tree

84 files changed

+2577
-846
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2577
-846
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
"dependencies": {
88
"electron-compile": "^6.4.2",
99
"electron-is-dev": "^0.3.0",
10+
"menubar": "^5.2.3",
1011
"electron-squirrel-startup": "^1.0.0",
1112
"ipfs-api": "^17.1.3",
1213
"ipfs-geoip": "^2.3.0",
1314
"ipfs-logo": "github:ipfs/logo",
1415
"ipfsd-ctl": "^0.26.0",
15-
"menubar": "^5.2.3",
16+
"moment": "^2.19.2",
1617
"multiaddr": "^3.0.1",
1718
"node-notifier": "^5.1.2",
1819
"normalize.css": "^7.0.0",
20+
"pretty-bytes": "^4.0.2",
1921
"prop-types": "^15.6.0",
2022
"react": "^16.1.1",
2123
"react-dnd": "^2.5.4",
@@ -101,7 +103,8 @@
101103
"Kristoffer Ström <[email protected]>",
102104
"David Dias <[email protected]>",
103105
"Juan Benet <[email protected]>",
104-
"Friedel Ziegelmayer <[email protected]>"
106+
"Friedel Ziegelmayer <[email protected]>",
107+
"Henrique Dias <[email protected]>"
105108
],
106109
"license": "MIT",
107110
"bugs": {

src/config.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,18 @@ import {getLogo, macOsMenuBar} from './utils/logo'
88

99
const isProduction = !isDev
1010
const currentURL = (name) => `file://${__dirname}/views/${name}.html`
11-
const ipfsPathFile = path.join(app.getPath('appData'), 'ipfs-electron-app-node-path')
11+
const ipfsAppData = (() => {
12+
let p = path.join(app.getPath('appData'), 'ipfs-station')
13+
14+
if (!fs.existsSync(p)) {
15+
fs.mkdirSync(p)
16+
}
17+
18+
return p
19+
})()
20+
21+
const ipfsPathFile = path.join(ipfsAppData, 'app-node-path')
22+
const ipfsFileHistoryFile = path.join(ipfsAppData, 'file-history.json')
1223

1324
const ipfsPath = (() => {
1425
let pathIPFS
@@ -55,7 +66,7 @@ const window = {
5566
// Configuration for the MenuBar
5667
const menubar = {
5768
dir: __dirname,
58-
width: 300,
69+
width: 800,
5970
height: 400,
6071
index: `file://${__dirname}/views/menubar.html`,
6172
icon: (os.platform() === 'darwin') ? macOsMenuBar : getLogo(),
@@ -78,6 +89,7 @@ export default {
7889
webuiPath: '/webui',
7990
ipfsPath,
8091
ipfsPathFile,
92+
ipfsFileHistoryFile,
8193
urls: {
8294
welcome: currentURL('welcome'),
8395
settings: currentURL('settings')

src/constants.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const PAGES = {
2+
FILES: 'files',
3+
INFO: 'info'
4+
}

src/controls/drag-drop.js

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,22 @@
1-
import notifier from 'node-notifier'
2-
import {join} from 'path'
31
import {logger} from '../config'
4-
import {getIPFS} from './../index'
2+
import {getIPFS, appendFile} from './../index'
53
import {clipboard} from 'electron'
64

7-
const iconPath = join(__dirname, '..', '..', 'node_modules', 'ipfs-logo', 'platform-icons/[email protected]')
8-
95
// TODO: persist this to disk
106
const filesUploaded = []
117

12-
function notify (title, message) {
13-
notifier.notify({
14-
appName: 'ipfs.station',
15-
title,
16-
message,
17-
icon: iconPath,
18-
sound: true,
19-
wait: false
20-
})
21-
}
22-
23-
function notifyError (message) {
24-
notifier.notify({
25-
title: 'Error in file upload',
26-
message,
27-
icon: iconPath,
28-
sound: true,
29-
wait: false
30-
})
31-
}
32-
338
export default function dragDrop (event, files) {
349
const ipfs = getIPFS()
3510
if (!ipfs) {
36-
notifyError('Can\'t upload file, IPFS Node is offline')
11+
// FAILED TO UPLOAD FILES
3712
return
3813
}
3914

4015
ipfs
4116
.add(files, {w: files.length > 1})
4217
.then((res) => {
4318
if (!res) {
44-
notifyError('Failed to upload files')
19+
// FAILED TO UPLOAD FILES
4520
return
4621
}
4722

@@ -54,14 +29,11 @@ export default function dragDrop (event, files) {
5429

5530
logger.info('Uploaded file %s', file.path)
5631

57-
notify(
58-
`Finished uploading ${file.path}`,
59-
`${file.path} was uploaded to ${url}.`
60-
)
32+
appendFile(file.path, file.hash)
6133
})
6234
})
6335
.catch((err) => {
6436
logger.error(err)
65-
notifyError(err.message)
37+
// FAILED TO UPLOAD FILES
6638
})
6739
}

src/controls/open-settings.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/fonts/SF-Pro-Display-Black.otf

312 KB
Binary file not shown.
143 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Bold.otf

327 KB
Binary file not shown.
156 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Heavy.otf

328 KB
Binary file not shown.
156 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Light.otf

311 KB
Binary file not shown.
155 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Medium.otf

328 KB
Binary file not shown.
156 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Regular.otf

292 KB
Binary file not shown.
145 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Semibold.otf

328 KB
Binary file not shown.
156 KB
Binary file not shown.

src/fonts/SF-Pro-Display-Thin.otf

310 KB
Binary file not shown.
154 KB
Binary file not shown.
309 KB
Binary file not shown.
153 KB
Binary file not shown.

src/fonts/SF-Pro-Text-Bold.otf

334 KB
Binary file not shown.

src/fonts/SF-Pro-Text-BoldItalic.otf

175 KB
Binary file not shown.

src/fonts/SF-Pro-Text-Heavy.otf

334 KB
Binary file not shown.

src/fonts/SF-Pro-Text-HeavyItalic.otf

174 KB
Binary file not shown.

src/fonts/SF-Pro-Text-Light.otf

322 KB
Binary file not shown.

src/fonts/SF-Pro-Text-LightItalic.otf

174 KB
Binary file not shown.

src/fonts/SF-Pro-Text-Medium.otf

335 KB
Binary file not shown.
176 KB
Binary file not shown.

src/fonts/SF-Pro-Text-Regular.otf

303 KB
Binary file not shown.
165 KB
Binary file not shown.

src/fonts/SF-Pro-Text-Semibold.otf

335 KB
Binary file not shown.
176 KB
Binary file not shown.

src/fonts/dripicons.ttf

-4 Bytes
Binary file not shown.

src/fonts/maven_pro_bold-webfont.ttf

-49.6 KB
Binary file not shown.
-79.6 KB
Binary file not shown.
-81.1 KB
Binary file not shown.

src/fonts/themify.eot

76.9 KB
Binary file not shown.

src/fonts/themify.svg

Lines changed: 362 additions & 0 deletions

src/fonts/themify.ttf

76.7 KB
Binary file not shown.

src/fonts/themify.woff

54.8 KB
Binary file not shown.

src/img/icons/add.svg

Lines changed: 13 additions & 0 deletions

src/img/icons/arrow.svg

Lines changed: 13 additions & 0 deletions

src/img/icons/folder.svg

Lines changed: 12 additions & 0 deletions

src/img/icons/logo.svg

Lines changed: 15 additions & 0 deletions

src/img/icons/more.svg

Lines changed: 16 additions & 0 deletions

src/img/icons/off.svg

Lines changed: 15 additions & 0 deletions

src/img/icons/warning.svg

Lines changed: 19 additions & 0 deletions

src/img/jellyfish-blur.png

-82.2 KB
Binary file not shown.

src/img/jellyfish-large.png

-164 KB
Binary file not shown.

0 commit comments

Comments
 (0)