Skip to content

Commit

Permalink
# This is a combination of 10 commits.
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
hacdias committed Dec 1, 2017
1 parent 6d2b908 commit fede09e
Show file tree
Hide file tree
Showing 84 changed files with 2,577 additions and 846 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
"dependencies": {
"electron-compile": "^6.4.2",
"electron-is-dev": "^0.3.0",
"menubar": "^5.2.3",
"electron-squirrel-startup": "^1.0.0",
"ipfs-api": "^17.1.3",
"ipfs-geoip": "^2.3.0",
"ipfs-logo": "github:ipfs/logo",
"ipfsd-ctl": "^0.26.0",
"menubar": "^5.2.3",
"moment": "^2.19.2",
"multiaddr": "^3.0.1",
"node-notifier": "^5.1.2",
"normalize.css": "^7.0.0",
"pretty-bytes": "^4.0.2",
"prop-types": "^15.6.0",
"react": "^16.1.1",
"react-dnd": "^2.5.4",
Expand Down Expand Up @@ -101,7 +103,8 @@
"Kristoffer Ström <kristoffer@rymdkoloni.se>",
"David Dias <daviddias@ipfs.io>",
"Juan Benet <juan@ipfs.io>",
"Friedel Ziegelmayer <dignifiedquire@gmail.com>"
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
"Henrique Dias <hacdias@gmail.com>"
],
"license": "MIT",
"bugs": {
Expand Down
16 changes: 14 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,18 @@ import {getLogo, macOsMenuBar} from './utils/logo'

const isProduction = !isDev
const currentURL = (name) => `file://${__dirname}/views/${name}.html`
const ipfsPathFile = path.join(app.getPath('appData'), 'ipfs-electron-app-node-path')
const ipfsAppData = (() => {
let p = path.join(app.getPath('appData'), 'ipfs-station')

if (!fs.existsSync(p)) {
fs.mkdirSync(p)
}

return p
})()

const ipfsPathFile = path.join(ipfsAppData, 'app-node-path')
const ipfsFileHistoryFile = path.join(ipfsAppData, 'file-history.json')

const ipfsPath = (() => {
let pathIPFS
Expand Down Expand Up @@ -55,7 +66,7 @@ const window = {
// Configuration for the MenuBar
const menubar = {
dir: __dirname,
width: 300,
width: 800,
height: 400,
index: `file://${__dirname}/views/menubar.html`,
icon: (os.platform() === 'darwin') ? macOsMenuBar : getLogo(),
Expand All @@ -78,6 +89,7 @@ export default {
webuiPath: '/webui',
ipfsPath,
ipfsPathFile,
ipfsFileHistoryFile,
urls: {
welcome: currentURL('welcome'),
settings: currentURL('settings')
Expand Down
4 changes: 4 additions & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const PAGES = {
FILES: 'files',
INFO: 'info'
}
38 changes: 5 additions & 33 deletions src/controls/drag-drop.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,22 @@
import notifier from 'node-notifier'
import {join} from 'path'
import {logger} from '../config'
import {getIPFS} from './../index'
import {getIPFS, appendFile} from './../index'
import {clipboard} from 'electron'

const iconPath = join(__dirname, '..', '..', 'node_modules', 'ipfs-logo', 'platform-icons/osx-menu-bar@2x.png')

// TODO: persist this to disk
const filesUploaded = []

function notify (title, message) {
notifier.notify({
appName: 'ipfs.station',
title,
message,
icon: iconPath,
sound: true,
wait: false
})
}

function notifyError (message) {
notifier.notify({
title: 'Error in file upload',
message,
icon: iconPath,
sound: true,
wait: false
})
}

export default function dragDrop (event, files) {
const ipfs = getIPFS()
if (!ipfs) {
notifyError('Can\'t upload file, IPFS Node is offline')
// FAILED TO UPLOAD FILES
return
}

ipfs
.add(files, {w: files.length > 1})
.then((res) => {
if (!res) {
notifyError('Failed to upload files')
// FAILED TO UPLOAD FILES
return
}

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

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

notify(
`Finished uploading ${file.path}`,
`${file.path} was uploaded to ${url}.`
)
appendFile(file.path, file.hash)
})
})
.catch((err) => {
logger.error(err)
notifyError(err.message)
// FAILED TO UPLOAD FILES
})
}
10 changes: 0 additions & 10 deletions src/controls/open-settings.js

This file was deleted.

Binary file added src/fonts/SF-Pro-Display-Black.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-BlackItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Bold.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-BoldItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Heavy.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-HeavyItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Light.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-LightItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Medium.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-MediumItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Regular.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-RegularItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Semibold.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-SemiboldItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Thin.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-ThinItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-Ultralight.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Display-UltralightItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-Bold.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-BoldItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-Heavy.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-HeavyItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-Light.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-LightItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-Medium.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-MediumItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-Regular.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-RegularItalic.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-Semibold.otf
Binary file not shown.
Binary file added src/fonts/SF-Pro-Text-SemiboldItalic.otf
Binary file not shown.
Binary file modified src/fonts/dripicons.ttf
Binary file not shown.
Binary file removed src/fonts/maven_pro_bold-webfont.ttf
Binary file not shown.
Binary file removed src/fonts/maven_pro_medium-webfont.ttf
Binary file not shown.
Binary file removed src/fonts/maven_pro_regular-webfont.ttf
Binary file not shown.
Binary file added src/fonts/themify.eot
Binary file not shown.
362 changes: 362 additions & 0 deletions src/fonts/themify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/fonts/themify.ttf
Binary file not shown.
Binary file added src/fonts/themify.woff
Binary file not shown.
13 changes: 13 additions & 0 deletions src/img/icons/add.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/img/icons/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/img/icons/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/img/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/img/icons/more.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/img/icons/off.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions src/img/icons/warning.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/img/jellyfish-blur.png
Binary file not shown.
Binary file removed src/img/jellyfish-large.png
Binary file not shown.
Loading

0 comments on commit fede09e

Please sign in to comment.