Skip to content

Commit

Permalink
Merge branch 'master' into ipfsd-ctl-update
Browse files Browse the repository at this point in the history
  • Loading branch information
hacdias authored Jan 11, 2018
2 parents a5afab7 + 2e6d098 commit 196aaff
Show file tree
Hide file tree
Showing 65 changed files with 1,671 additions and 870 deletions.
4 changes: 2 additions & 2 deletions .compilerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"env",
{
"targets": {
"electron": "1.7.9"
"electron": "1.7.10"
}
}
],
Expand All @@ -27,7 +27,7 @@
"env",
{
"targets": {
"electron": "1.7.9"
"electron": "1.7.10"
}
}
],
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ release
out
*.log
*.lock
package-lock.json
package-lock.json
dist
*.zip
23 changes: 0 additions & 23 deletions CHANGELOG.md

This file was deleted.

55 changes: 36 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<a href="ipfs.io">IPFS Station<!--<img width="650px" src="" alt="IPFS Station" />--></a>
<a href="https://ipfs.io">IPFS Desktop</a>
</h1>

<h3 align="center">A menubar IPFS application to get you on the Distributed Web!</h3>
Expand All @@ -11,19 +11,21 @@
</p>

<p align="center">
<a href="https://travis-ci.org/ipfs-shipyard/station"><img src="https://travis-ci.org/ipfs-shipyard/station.svg?branch=master" /></a>
<!--<a href="https://circleci.com/gh/ipfs-shipyard/station"><img src="https://circleci.com/gh/ipfs-shipyard/station.svg?style=svg" /></a>-->
<!--<a href="https://coveralls.io/github/ipfs-shipyard/station?branch=master"><img src="https://coveralls.io/repos/github/ipfs-shipyard/station/badge.svg?branch=master"></a>-->
<a href="https://travis-ci.org/ipfs-shipyard/ipfs-desktop"><img src="https://travis-ci.org/ipfs-shipyard/ipfs-desktop.svg?branch=master" /></a>
<br>
<a href="https://david-dm.org/ipfs-shipyard/station"><img src="https://david-dm.org/ipfs-shipyard/station.svg?style=flat-square" /></a>
<a href="https://david-dm.org/ipfs-shipyard/ipfs-desktop"><img src="https://david-dm.org/ipfs-shipyard/ipfs-desktop.svg?style=flat-square" /></a>
<a href="https://github.com/feross/standard"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square"></a>
<a href="https://github.com/RichardLitt/standard-readme"><img src="https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square" /></a>
<a href=""><img src="https://img.shields.io/badge/npm-%3E%3D3.0.0-orange.svg?style=flat-square" /></a>
<a href=""><img src="https://img.shields.io/badge/Node.js-%3E%3D6.0.0-orange.svg?style=flat-square" /></a>
<br>
</p>

![](https://ipfs.io/ipfs/QmQjPLSWt54MdFzLAxyEvTdaYPtdTAor7A1d5ugcVcmT87)
| ![](https://ipfs.io/ipfs/QmPBMMG4HUB1U1kLfwWvr6zQhGMcuvWYtGEFeTqBjG2jxW) | ![](https://ipfs.io/ipfs/QmQKdHbDnEAp7ajW7QNayxsuEWywRNyZaX6VbTzvWnHxex) | ![](https://ipfs.io/ipfs/QmTUS8rRufkXQp7ePRogMFLMxmf6YziYcb8HnDrVCvC2DF)|
|:---:|:---:|:---:|
| Info | Add Files | Pin Hashes |
| ![](https://ipfs.io/ipfs/QmW1SWU1aALf8sqSvEFGUtzK8oqX9BGNA6r4bzS8MPg94B) | <img src="https://ipfs.io/ipfs/QmYo91nuMF6QqRVNJbHjKkdpk4nay1qkjq1ztwxFchtDWU" width="260"> | ![](https://ipfs.io/ipfs/QmS9mHTza1U6CjE1ehnaSxpKw7YDBsY3mvBZdBHVoTMLbm) |
| Peers | Overview | Light Theme |

## Table of Contents

Expand All @@ -35,7 +37,7 @@

## Install pre-compiled version

`Soon™` you will be able to install it via dist.ipfs.io. Track progress at https://github.com/ipfs-shipyard/station/pull/514
`Soon™` you will be able to install it via dist.ipfs.io. In the meanwhile, you can head to the [latest release](https://github.com/ipfs-shipyard/ipfs-desktop/releases/latest) and download the binary for your OS. Just click and install!

## Install from Source

Expand All @@ -49,8 +51,8 @@ sudo xcode-select --switch /Library/Developer/CommandLineTools
Also you will need [npm](npmjs.org) `>=3.0`. After that you should run

```bash
> git clone https://github.com/ipfs/station.git
> cd station
> git clone https://github.com/ipfs-shipyard/ipfs-desktop.git
> cd ipfs-desktop
> npm install
> npm start
```
Expand Down Expand Up @@ -79,7 +81,7 @@ All of the important files of this application are into `src` folder, which can

### How to add an new pane

To create a new pane, you should start by creating a new file inside `./src/js/panes` with the following bootstrap content:
Start by creating a new file inside `./src/js/panes` with the following bootstrap content. For more information about each piece, take a look at the [`Header`](./src/js/components/view/header.js) and [`Footer`](./src/js/components/view/footer.js) components.

```js
import React from 'react'
Expand All @@ -90,7 +92,7 @@ import Footer from '../components/view/footer'

export default function MyPane {
return (
<Pane class='left-pane peers'>
<Pane>
<Header title='The title of your pane' />

<div className='main'>
Expand All @@ -106,36 +108,51 @@ export default function MyPane {
}
```

For more information about each piece, take a look at the [`Header`](./src/js/components/view/header.js) and [`Footer`](./src/js/components/view/footer.js) components.
Then, you'll have to import the file and create an entry on `panes` array on [`./src/js/screens/menu.js`](./src/js/components/view/icon.js) with a content similar to this one:

Now, to incorporate your pane into Station iself so it is visible, you have to import it on `./src/js/screens/menubar.js` and add it to `_getRouteScreen`.
```
{
id: 'my-pane-id', // A simple slug to identify your pane.
title: 'Title', // To be shown in the menu.
icon: 'ipfs' // A themify icon ID (themify.me/themify-icons)
}
```

**Note:** soon, there will be more information on how to add a new pane.
Now, you already have your pane created and its menu entry. Although, it you click on it, you'll probably get an error message since you aren't really routing that path to it. On the same file, go to `_getRouteScreen` function, and add a `case` for your pane on the `switch`. The value must be the same as the `id` you put on the menu entry.

## Components

The components are classes exported with CamelCase names. The corresponding files have the associated class name with hyphen-separated-words. So, e.g., `simple-stat.js` exports a class named `SimpleStat`.

### [Stateless Components](./src/js/components/view)

+ [**Button**](./src/js/components/view/button.js) is a simple button with text.
+ [**File**](./src/js/components/view/file.js) is used within a file list to describe a file with a button to copy its link.
+ [**CheckboxBlock**](./src/js/components/view/checkbox-block.js) is like an `InfoBlock`, but with a checkbox attached to it.
+ [**FileBlock**](./src/js/components/view/file-block.js) is used within a file list to describe a file with a button to copy its link.
+ [**Footer**](./src/js/components/view/footer.js) is the footer of a pane.
+ [**Header**](./src/js/components/view/header.js) is the header of a pane.
+ [**Heartbeat**](./src/js/components/view/heartbeat.js) displays an heartbeat-like animation with the IPFS logo.
+ [**IconButton**](./src/js/components/view/icon-button.js) is a button with an icon inside.
+ [**IconDropdownList**](./src/js/components/view/icon-dropdown-list.js) is a dropdown list with an icon.
+ [**Icon**](./src/js/components/view/icon.js) shows an icon.
+ [**InfoBlock**](./src/js/components/view/info-block.js) shows a block of information (used on node info pane).
+ [**Loader**](./src/js/components/view/loader.js) is a loader.
+ [**Peer**](./src/js/components/view/peer.js) shows a peer information.
+ [**KeyCombo**](./src/js/components/view/key-combo.js) is a key combination.
+ [**Key**](./src/js/components/view/key.js) is a key.
+ [**MenuOption**](./src/js/components/view/menu-option.js) is a menu option to show within a menu bar.
+ [**PinnedHash**](./src/js/components/view/pinned-hash.js) is a pinned hash.

### [Statefull Components](./src/js/components/logic)

+ [**NewPinnedHash**](./src/js/components/view/new-pinned-hash.js) is a new pinned hash form.

## Contribute

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)

Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/station/issues)!
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs-shipyard/ipfs-desktop/issues)!

This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).

## License

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgit.luolix.top%2Fipfs%2Fstation.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgit.luolix.top%2Fipfs%2Fstation?ref=badge_large)
[MIT 2016 Protocol Labs, Inc.](./LICENSE)
43 changes: 23 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ipfs-station",
"productName": "IPFS Station",
"name": "ipfs-desktop",
"productName": "IPFS Desktop",
"private": true,
"version": "0.3.0",
"description": "IPFS Native Application",
Expand All @@ -11,30 +11,31 @@
"electron-is-dev": "^0.3.0",
"electron-menubar": "^1.0.1",
"electron-squirrel-startup": "^1.0.0",
"file-extension": "^4.0.0",
"go-ipfs-dep": "^0.4.13",
"ipfs-geoip": "^2.3.0",
"ipfsd-ctl": "ipfs/js-ipfsd-ctl#feat/remote-daemon",
"moment": "^2.19.3",
"multiaddr": "^3.0.1",
"file-extension": "^4.0.1",
"ipfs-geoip": "^2.3.0",
"is-ipfs": "^0.3.2",
"moment": "^2.20.1",
"multiaddr": "^3.0.2",
"normalize.css": "^7.0.0",
"pretty-bytes": "^4.0.2",
"prop-types": "^15.6.0",
"react": "^16.1.1",
"react": "^16.2.0",
"react-dnd": "^2.5.4",
"react-dnd-html5-backend": "^2.5.4",
"react-dom": "^16.1.1",
"react-dom": "^16.2.0",
"winston": "^3.0.0-rc1"
},
"devDependencies": {
"babel-eslint": "^8.0.2",
"babel-eslint": "^8.2.1",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.24.1",
"electron-debug": "^1.4.0",
"electron-forge": "^4.1.5",
"electron-prebuilt-compile": "1.7.9",
"electron-debug": "^1.5.0",
"electron-forge": "^4.2.0",
"electron-prebuilt-compile": "1.8.1",
"eslint": "^4",
"eslint-config-aegir": "^1.0.1",
"eslint-config-standard-react": "^5.0.0",
Expand Down Expand Up @@ -66,7 +67,7 @@
},
"electronPackagerConfig": {
"packageManager": "yarn",
"executableName": "ipfs-station",
"executableName": "ipfs-desktop",
"icon": "./src/img/icons/executable/ipfs.ico"
},
"electronInstallerDebian": {
Expand All @@ -76,17 +77,17 @@
}
},
"electronWinstallerConfig": {
"name": "Station",
"name": "Desktop",
"setupIcon": "./src/img/icons/executable/ipfs.ico",
"loadingGif": "./src/img/loading.gif",
"exe": "ipfs-station.exe"
"exe": "ipfs-desktop.exe"
},
"electronInstallerDMG": {
"icon": "./src/img/icons/executable/ipfs.icns"
},
"github_repository": {
"owner": "ipfs-shipyard",
"name": "station"
"name": "ipfs-desktop"
}
}
},
Expand All @@ -96,11 +97,13 @@
"keywords": [
"ipfs",
"electron",
"station"
"station",
"desktop",
"app"
],
"repository": {
"type": "git",
"url": "https://github.com/ipfs/station"
"url": "https://github.com/ipfs-shipyard/ipfs-desktop"
},
"author": "IPFS",
"contributors": [
Expand All @@ -112,7 +115,7 @@
],
"license": "MIT",
"bugs": {
"url": "https://github.com/ipfs/station/issues"
"url": "https://github.com/ipfs-shipyard/ipfs-desktop/issues"
},
"homepage": "https://github.com/ipfs/station"
"homepage": "https://github.com/ipfs-shipyard/ipfs-desktop"
}
2 changes: 1 addition & 1 deletion postinst.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env bash
set -e
chmod 755 /usr/lib/ipfs-station/resources/app/node_modules/go-ipfs-dep/go-ipfs/ipfs
chmod 755 /usr/lib/ipfs-desktop/resources/app/node_modules/go-ipfs-dep/go-ipfs/ipfs
echo "Changed permissions correctly"
27 changes: 27 additions & 0 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -e

# Pre-requisites:
# GITHUB_TOKEN must be set
# tag must be set

LAST_BUILD="https://ci.ipfs.team/job/IPFS%20Shipyard/job/ipfs-desktop/job/master/lastSuccessfulBuild/artifact/out/make/*zip*/make.zip"

# Install GHR if not present
if ! [ -x "$(command -v ghr)" ]; then
go get -u github.com/tcnksm/ghr
fi

# Get the latest successfull build and unzip it
curl -o latest.zip "$LAST_BUILD"
unzip -o latest.zip -d dist/

cd dist

# Remove nupkg, releases and flattens the directory.
find . -type f -name '*.nupkg' -delete
find . -type f -name 'RELEASES' -delete
find . -type d -empty -delete
find . -mindepth 2 -type f -exec mv -i '{}' . ';'

ghr -u ipfs-shipyard -r ipfs-desktop "$tag" .
Loading

0 comments on commit 196aaff

Please sign in to comment.