Compare commits

...

28 Commits

Author SHA1 Message Date
Marquis Kurt d2f1f23006
Update config.yml 2021-01-07 13:31:47 -05:00
Marquis Kurt 6f6fe991f5
Merge pull request #236 from hyperspacedev/dependabot/npm_and_yarn/axios-0.21.1
Bump axios from 0.19.2 to 0.21.1
2021-01-05 13:15:32 -05:00
dependabot[bot] a74bd76b10
Bump axios from 0.19.2 to 0.21.1
Bumps [axios](https://github.com/axios/axios) from 0.19.2 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.19.2...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 07:44:38 +00:00
Marquis Kurt 01ece3cb7b
Delete feature_request.md 2020-12-25 22:03:36 -05:00
Marquis Kurt e8ec0a47f9
Update config.yml 2020-12-25 22:03:23 -05:00
Marquis Kurt 119066fa91
Increment build number 2020-10-03 18:43:41 -04:00
Marquis Kurt 5620b9d505
Update MAS script 2020-10-03 13:52:09 -04:00
Marquis Kurt e0f0f3f2d8
Update README 2020-10-03 13:49:55 -04:00
Marquis Kurt 27acb9a151
Merge pull request #231 from hyperspacedev/develop/1.1.4
v1.1.4
2020-10-03 13:45:24 -04:00
Marquis Kurt 07be3af687
Merge pull request #230 from hyperspacedev/feat/check-bypass
Added instance name validation bypass
2020-10-03 13:31:54 -04:00
Marquis Kurt a94180b15c
Added instance name validation bypass
Signed-off-by: Marquis Kurt <software@marquiskurt.net>
2020-10-03 12:47:45 -04:00
Marquis Kurt d3729ee76f
Add slashes to end of app links in Welcome (fixes #224)
Signed-off-by: Marquis Kurt <software@marquiskurt.net>
2020-10-03 11:33:00 -04:00
Marquis Kurt 4e8a372234
Migrate from mastodon.social -> mastodon.online 2020-10-03 11:25:43 -04:00
Marquis Kurt ded85d38a1
Merge pull request #228 from hyperspacedev/chore/icons-and-settings
Update macOS icon for Big Sur, change default instance
2020-10-03 10:39:12 -04:00
Marquis Kurt dd7b3d7b78
Merge branch 'develop/1.1.4' into chore/icons-and-settings 2020-10-01 13:21:19 -04:00
Marquis Kurt f640cd2963
Update macOS icon, version string, and default instance
Signed-off-by: Marquis Kurt <software@marquiskurt.net>
2020-10-01 13:19:33 -04:00
Travis Kohlbeck 914ee67d95
Merge pull request #223 from hyperspacedev/GH-208-input-error-state
Don't show input error state when not empty
2020-07-08 18:39:26 -04:00
Marquis Kurt 54388e806a
Merge branch 'develop/1.1.4' into GH-208-input-error-state 2020-07-08 18:29:53 -04:00
Travis Kohlbeck b7e27b703c Update package.json and config.json versions 2020-07-08 18:26:35 -04:00
Travis Kohlbeck 214262fdb3 Don't show input error state when not empty 2020-07-06 12:47:40 -04:00
Marquis Kurt 3d201eddf9
Merge pull request #221 from hyperspacedev/chore/electron-builder-updates
Update Electron Builder scripts
2020-07-02 20:26:10 -04:00
Marquis Kurt 993f5718fe
Add Mac App Store link 🎉 2020-07-02 20:07:06 -04:00
Marquis Kurt 50b758c24b
Update README 2020-07-02 13:55:15 -04:00
Marquis Kurt ac8d58c247
Fix Mac CI alignment 2020-07-02 12:29:59 -04:00
Marquis Kurt 43a83c1c84
Attempt to fix Mac CI workflow 2020-07-02 12:28:55 -04:00
Marquis Kurt 78e4fef3aa
Update workflows 2020-07-02 12:25:08 -04:00
Marquis Kurt d1a70faf09
Reorganize NPM scripts, update workflows 2020-07-02 12:20:45 -04:00
Marquis Kurt cd3147b2ce
Update electron-builder configs 2020-07-02 11:25:39 -04:00
38 changed files with 498 additions and 315 deletions

View File

@ -1,5 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Request a feature
url: "https://github.com/hyperspacedev/hyperspace/discussions/new?category=ideas"
about: Suggest a new idea here.
- name: Discord
url: "https://discord.gg/c69AXwk"
about: Chat with us here.

View File

@ -1,19 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: "Request title"
labels: "enhancement"
assignees: ""
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -3,17 +3,36 @@ name: Build Linux Client
on: [push, pull_request]
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install dependencies and build
run: |
npm install
npm run build --if-present
npm run build-desktop-linux
build_linux:
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Change desktop field
run: |
from json import load, dump
json_dict = {}
with open('public/config.json', 'r') as file:
json_dict = load(file)
json_dict["location"] = "desktop"
with open('public/config.json', 'w+') as out:
dump(json_dict, out)
shell: python
- name: Install dependencies and build
run: |
npm install
npm run build --if-present
npm run build:linux
- name: Upload Linux executables
uses: actions/upload-artifact@v1
if: success()
with:
name: "Linux executables (output dir)"
path: dist

View File

@ -3,46 +3,65 @@ name: Build macOS Client
on: [push, pull_request]
jobs:
build_darwin:
runs-on: macos-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install certificates and entitlements
if: github.actor == 'alicerunsonfedora' || github.actor == 'Nomad1556' || github.actor == 'audmaxwell'
run: |
echo "Downloading certificates and profiles..."
echo "$ascCertificates" > certs.b64
echo "$ascMasProfile" > mas.b64
echo "$ascMacProfile" > mac.b64
echo "$ascEntitlementsMas" > entmas.b64
echo "$ascEntitlementsMac" > entmac.b64
echo "$ascInfoPlist" > info.b64
build_darwin:
runs-on: macos-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install certificates and entitlements
if: github.actor == 'alicerunsonfedora' || github.actor == 'Nomad1556' || github.actor == 'audmaxwell'
run: |
echo "Downloading certificates and profiles..."
echo "$ascCertificates" > certs.b64
echo "$ascMasProfile" > mas.b64
echo "$ascMacProfile" > mac.b64
echo "$ascEntitlementsMas" > entmas.b64
echo "$ascEntitlementsMac" > entmac.b64
echo "$ascInfoPlist" > info.b64
echo "Installing certificates and profiles..."
base64 --decode certs.b64 > Certificates.p12
base64 --decode mas.b64 > desktop/embedded.provisionprofile
base64 --decode mac.b64 > desktop/nonmas.provisionprofile
base64 --decode entmas.b64 > desktop/entitlements.mas.plist
base64 --decode entmac.b64 > desktop/entitlements.mac.plist
base64 --decode info.b64 > desktop/info.plist
security add-generic-password -a "appleseed@marquiskurt.net" -w "$ascPassword" -s "AC_PASSWORD"
sudo security import Certificates.p12 -P "$ascCertsPassword" -k /Library/Keychains/System.keychain
env:
ascPassword: ${{ secrets.ASC_PASSWORD }}
ascCertificates: ${{ secrets.ASC_CERTS }}
ascCertsPassword: ${{ secrets.ASC_CERTS_PASSWORD }}
ascMacProfile: ${{ secrets.ASC_NONMAS_PROFILE }}
ascMasProfile: ${{ secrets.ASC_EMBEDDED_PROFILE }}
ascEntitlementsMas: ${{ secrets.ASC_MAS_ENTITLEMENTS }}
ascEntitlementsMac: ${{ secrets.ASC_MAC_ENTITLEMENTS }}
ascInfoPlist: ${{ secrets.ASC_INFO_PLIST }}
- name: Install dependencies and build
run: |
npm install
npm run build --if-present
npm run build-desktop-darwin-nosign
echo "Installing certificates and profiles..."
base64 --decode certs.b64 > Certificates.p12
base64 --decode mas.b64 > desktop/embedded.provisionprofile
base64 --decode mac.b64 > desktop/nonmas.provisionprofile
base64 --decode entmas.b64 > desktop/entitlements.mas.plist
base64 --decode entmac.b64 > desktop/entitlements.mac.plist
base64 --decode info.b64 > desktop/info.plist
security add-generic-password -a "appleseed@marquiskurt.net" -w "$ascPassword" -s "AC_PASSWORD"
sudo security import Certificates.p12 -P "$ascCertsPassword" -k /Library/Keychains/System.keychain
env:
ascPassword: ${{ secrets.ASC_PASSWORD }}
ascCertificates: ${{ secrets.ASC_CERTS }}
ascCertsPassword: ${{ secrets.ASC_CERTS_PASSWORD }}
ascMacProfile: ${{ secrets.ASC_NONMAS_PROFILE }}
ascMasProfile: ${{ secrets.ASC_EMBEDDED_PROFILE }}
ascEntitlementsMas: ${{ secrets.ASC_MAS_ENTITLEMENTS }}
ascEntitlementsMac: ${{ secrets.ASC_MAC_ENTITLEMENTS }}
ascInfoPlist: ${{ secrets.ASC_INFO_PLIST }}
- name: Change desktop field
run: |
from json import load, dump
json_dict = {}
with open('public/config.json', 'r') as file:
json_dict = load(file)
json_dict["location"] = "desktop"
with open('public/config.json', 'w+') as out:
dump(json_dict, out)
shell: python
- name: Install dependencies and build
run: |
npm install
npm run build --if-present
npm run build:mac-unsigned
- name: Upload macOS (unsigned) bundle
uses: actions/upload-artifact@v1
if: success()
with:
name: "macOS bundle (output dir)"
path: dist

View File

@ -3,36 +3,36 @@ name: Build Windows Client
on: [push, pull_request]
jobs:
build_win:
runs-on: windows-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Change desktop field
run: |
from json import load, dump
build_win:
runs-on: windows-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Change desktop field
run: |
from json import load, dump
json_dict = {}
with open('public/config.json', 'r') as file:
json_dict = load(file)
json_dict["location"] = "desktop"
json_dict = {}
with open('public/config.json', 'r') as file:
json_dict = load(file)
with open('public/config.json', 'w+') as out:
dump(json_dict, out)
shell: python
- name: Install dependencies and build
run: |
npm install
npm run build --if-present
npm run build-desktop-win
- name: Upload Windows executable
uses: actions/upload-artifact@v1
if: success()
with:
name: 'Windows executable (output dir)'
path: dist
json_dict["location"] = "desktop"
with open('public/config.json', 'w+') as out:
dump(json_dict, out)
shell: python
- name: Install dependencies and build
run: |
npm install
npm run build --if-present
npm run build:win
- name: Upload Windows executable
uses: actions/upload-artifact@v1
if: success()
with:
name: "Windows executable (output dir)"
path: dist

View File

@ -1,26 +0,0 @@
# name: Create issue on Jira
# on:
# issues:
# types: [opened]
# jobs:
# jira:
# runs-on: ubuntu-latest
# steps:
# - name: Jira Login
# id: login
# uses: atlassian/gajira-login@v2.0.0
# env:
# JIRA_BASE_URL: "https://hyperspacedev.atlassian.net"
# JIRA_USER_EMAIL: software@marquiskurt.net
# JIRA_API_TOKEN: ${{ secrets.JIRA_TOKEN }}
# - name: Jira Create issue
# id: create
# uses: atlassian/gajira-create@v2.0.0
# with:
# project: HD
# issuetype: Unsorted
# summary: ${{ github.event.issue.title }}
# description: ${{ github.event.issue.body }}

View File

@ -3,18 +3,18 @@ name: Prettier
on: [pull_request]
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install dependencies and run Prettier
run: |
npm install
npm run check-prettier
env:
CI: true
prettier:
runs-on: ubuntu-latest
steps:
- name: Clone source code
uses: actions/checkout@v1
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install dependencies and run Prettier
run: |
npm install
npm run test:prettier
env:
CI: true

5
.gitignore vendored
View File

@ -72,4 +72,7 @@ desktop/*.plist
desktop/*.provisionprofile
# JetBrains IDEA directory
.idea/
.idea/
# Pesky macOS files
**/**.DS_Store

251
README.md
View File

@ -1,57 +1,63 @@
<p align="center">
<img src="desktop/app.iconset/icon_512@2x.png" width="128" max-width="25%" alt=“Hyperspace” />
</p>
<h1 align="center">Hyperspace</h1>
<div align="center">
<p align="center">The new beautiful, fluffy client for the fediverse written in TypeScript and React</p>
<img src="desktop/app.iconset/icon_512x512@2x.png" width="128" max-width="25%" alt="Hyperspace Desktop icon" />
![Hyperspace 1.0 on a MacBook Pro](screenshot.png)
# Hyperspace Desktop
The new beautiful, fluffy client for the fediverse written in TypeScript and React
</div>
![Hyperspace Desktop on a MacBook Pro](screenshot.png)
[![Matrix room](https://img.shields.io/matrix/hypermasto:matrix.org.svg)](https://matrix.to/#/#hypermasto:matrix.org)
[![Discord server](https://img.shields.io/discord/554108687434907660.svg?color=blueviolet&label=discord)](https://discord.gg/c69AXwk)
![Build Status](https://github.com/hyperspacedev/hyperspace/workflows/Node%20CI/badge.svg) [![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/hyperspacedev/hyperspace?include_prereleases)](https://github.com/hyperspacedev/hyperspace/releases) [![License: NPLv4+](https://img.shields.io/badge/license-NPLv4%2B-blue.svg)](LICENSE.txt) [![Hyperspace](https://snapcraft.io/hyperspace/badge.svg)](https://snapcraft.io/hyperspace)
Hyperspace is the fluffiest client for Mastodon and other fediverse networks written in TypeScript and React. Hyperspace offers a fun, clean, fast, and responsive design that scales beautifully across devices and enhances the fediverse experience.
Socialize and communicate with your friends in the fediverse (ActivityPub-powered social networks like Mastodon and Pleroma) with Hyperspace Desktop. Browse your timelines, check in with friends, and share your experiences across the fediverse in a beautiful, clean, and customizable way.
## Features
What Hyperspace Desktop offers:
- **Responsive by design**: Hyperspace is beautifully designed to put your content front and center and bring a familiar experience to Mastodon. View threads and profiles with ease and compose anywhere with the compose button. And, of course, Hyperspace scales across devices beautifully, providing the same experience anywhere.
- **Customizable**: Hyperspace allows customization and configuration at every level, from the server level with branding and instance setup, down to the user level with dark mode, custom themes, and multi-user account support. And, if the default configuration settings aren't enough, anyone can make their own version of Hyperspace with custom additions.
- **Open-source**: Hyperspace is free (libre) and open-source software. Licensed under the Non-Violent Public License, anyone can modify, redistribute, or contribute to the Hyperspace project without restriction. Hyperspace is written in TypeScript and takes advantage of multiple open-source libraries and projects such as React, Megalodon, and Material-UI, so web and Node.js developers will feel right at home.
- A clean, responsive, and streamlined design that fits in with your Mac
- Support for switching between accounts to access the accounts you use the most
- Customization support, ranging from several beautiful themes to masonry layout and infinite scrolling
- Powerful toot composer with media uploads, emojis, and polls
- Activity and recommended views that give you insight on the community/instance you reside in
> If you've used Hyperspace 0.x, you'll note many changes with the 1.x and later series. You can learn more about these changes in the [migration article](MIGRATING.md).
## Get started
## Downloads
Hyperspace Desktop is available for the major desktop platforms via our downloads page, GitHub, and other store platforms where applicable.
Hyperspace is available for download on GitHub as well as other platforms.
[**Download from our website &rsaquo;**](https://hyperspace.marquiskurt.net/download)
[**Get latest release &rsaquo;**](https://github.com/hyperspacedev/hyperspace/releases/latest)
### Download from a store
<!--[![Get on the Mac App Store](https://hyperspace.marquiskurt.net/images/mas.svg)](https://itunes.apple.com/us/app/hyperspace/id1454139710?mt=12)-->
[![Get on the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/hyperspace) [![Get on the Mac App Store](https://hyperspace.marquiskurt.net/assets/images/mas.svg)](https://apps.apple.com/us/app/hyperspace-desktop/id1454139710?mt=12)
[![Get on the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/hyperspace)
**via [WinGet](https://github.com/microsoft/winget-cli)**:
Looking for the Mac App Store version? [Read more &rsaquo;](https://hyperspace.marquiskurt.net/2019/11/08/post.html)
```
winget install HyperspaceDesktop
```
## Build instructions
## Build from source
### Prerequisites
To develop Hyperspace, you'll need the following tools and packages:
To build Hyperspace Desktop, you'll need the following tools and packages:
- Node.js v10 or later
- (macOS-only) Xcode 10 or higher
### Installing dependencies
First, clone the repository from GitHub:
```bash
```
git clone https://github.com/hyperspacedev/hyperspace
```
Then, in the app directory, run the following command to install all of the package dependencies:
```npm
```
npm install
```
@ -60,72 +66,207 @@ npm install
Run any of the following scripts to test:
- `npm start` - Starts a local server hosted at https://localhost:3000.
- `npm run electrify` - Builds a copy of the source code and then runs the app through Electron. Ensure that the `location` key in `config.json` points to `"desktop"` before running this.
- `npm run electrify-nobuild` - Similar to `electrify` but doesn't build the project before running.
- `npm run electron:build` - Builds a copy of the source code and then runs the app through Electron. Ensure that the `location` key in `config.json` points to `"desktop"` before running this.
- `npm run electron:prebuilt` - Similar to `electron:build` but doesn't build the project before running.
The `location` key in `config.json` can take the following values during testing:
- **https://localhost:3000**: Most suitable for running `npm start` or running via `react-scripts`.
- **desktop**: Most suitable for when testing the desktop application.
> Note: Hyperspace v1.1.0-beta3 and older versions require the location field to be changed to `"https://localhost:3000"` before running.
> Note: Hyperspace Desktop v1.1.0-beta3 and older versions require the location field to be changed to `"https://localhost:3000"` before running.
### Building a release
To build a release, run the following command:
```npm
```
npm run build
```
The built files will be available under `build` as static files that can be hosted on a web server. If you plan to release these files alongside the desktop apps, compress these files in a ZIP.
#### Building desktop releases
#### Building desktop apps
You can run any of the following commands to build a release for the desktop:
- `npm run build-desktop`: Builds the desktop apps for all platforms (eg. Windows, macOS, Linux). Will run `npm run build` before building.
- `npm run build-desktop-win`: Builds the desktop app for Windows without running `npm run build`.
- `npm run build-desktop-darwin`: Builds the desktop apps for macOS (eg. disk image, Mac App Store) without running `npm run build`. See the details below for more information on building for macOS.
- `npm run build-desktop-linux`: Builds the desktop apps for Linux (eg. Debian package, AppImage, and Snap) without running `npm run build`.
- `npm run build-desktop-linux-select`: Builds the desktop app for Linux without running `npm run build`. _Target is required as a parameter._
- `npm run build:desktop-all`: Builds the desktop apps for all platforms (eg. Windows, macOS, Linux). Will run `npm run build` before building.
- `npm run build:win`: Builds the desktop app for Windows without running `npm run build`.
- `npm run build:mac`: Builds the desktop apps for macOS without running `npm run build`. See the details below for more information on building for macOS.
- `npm run build:mas`: Builds the desktop apps for the Mac App Store without running `npm run build`. See the details below for more information on building for macOS.
- `npm run build:linux`: Builds the desktop apps for Linux (eg. Debian package, AppImage, and Snap) without running `npm run build`.
- `npm run build:linux-select-targets`: Builds the desktop app for Linux without running `npm run build`. _Targets are required as parameters._
The built files will be available under `dist` that can be uploaded to your app distributor or website.
#### Building for macOS
#### Extra steps for macOS
More recent version of macOS require that the Hyperspace desktop app be both digitally code-signed and notarized (uploaded to Apple to check for malware). Hyperspace includes the tools necessary to automate this process when building the macOS version either by `npm run build-desktop` or by `npm run build-desktop-darwin`.
The macOS builds of Hyperspace Desktop require a bit more effort and resources to build and distribute accordingly. The following is a quick guide to building Hyperspace Desktop for macOS and for the Mac App Store.
Make sure you have your provisioning profiles for the Mac App Store (`embedded.provisionprofile`) and standard distribution (`nonmas.provisionprofile`) in the `desktop` directory. These provision profiles can be obtained through Apple Developer. You'll also need to create entitlements files in the `desktop` directory that list the following entitlements for your app:
##### Gather your tools
- `com.apple.security.app-sandbox`
- `com.apple.security.files.downloads.read-write`
- `com.apple.security.files.user-selected.read-write`
- `com.apple.security.allow-unsigned-executable-memory`
- `com.apple.security.network.client`
To create a code-signed and notarized version of Hyperspace Desktop, you'll need to acquire some provisioning profiles and certificates from a valid Apple Developer account.
For the child ones (inherited `entitlements.mas.inherit.plist`):
For certificates, make sure your Mac has the following certificates installed:
- `com.apple.security.app-sandbox`
- `com.apple.security.inherit`
- `com.apple.security.files.downloads.read-write`
- `com.apple.security.files.user-selected.read-write`
- `com.apple.security.allow-unsigned-executable-memory`
- `com.apple.security.network.client`
- 3rd Party Mac Developer Application
- 3rd Party Mac Developer Installer
- Developer ID Application
- Developer ID Installer
- Mac Developer
> ⚠️ Note that the inherited permissions are the same as that of the parent. This is due to an issue where the hardened runtime fails to pass down the inherited properties (see [electron/electron#20560](https://github.com/electron/electron/issues/20560#issuecomment-546110018)). This might change in future versions of macOS.
The easiest way to handle this is by opening Xcode and going to **Preferences &rsaquo; Accounts** and create the certificates from "Manage Certificates".
It is also recommended to add the `com.apple.security.applications-groups` entry with your bundle's identifier. You'll also need to create an `info.plist` in the `desktop` directory containing the team identifier and application identifier and install the developer certificates on the Mac you plan to build from.
You'll also need to [create a provisioning profile for **Mac App Store** distribution](https://developer.apple.com/account/resources/profiles/add) and save it to the `desktop` folder as `embedded.provisonprofile`.
You'll also want to modify the `notarize.js` file to change the details from the default to your App Store Connect account details and app identifier.
##### Create your entitlements files
> ⚠️ **Warning**: The package.json file also includes the `build-desktop-darwin-nosign` script. This script is specifically intended for automated systems that cannot run notarization (Azure Pipelines, GitHub Actions, etc.). _Do not use this command to build production-ready versions of Hyperspace_.
You'll also need to create the entitlements files in the `desktop` directory that declares the permissions for Hyperspace Desktop. Replace `TEAM_ID` with the appropriate Apple Developer information and `BUNDLE_ID` with the bundle ID of your app.
###### entitlements.mac.plist
```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>
```
###### entitlements.mas.plist
```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>TEAM_ID.BUNDLE_ID</string>
</array>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
</dict>
</plist>
```
###### entitlements.mas.inherit.plist
```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
</dict>
</plist>
```
###### entitlements.mas.loginhelper.plist
```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>
```
###### info.plist
```plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ElectronTeamID</key>
<string>TEAM_ID</string>
<key>com.apple.developer.team-identifier</key>
<string>TEAM_ID</string>
<key>com.apple.application-identifier</key>
<string>TEAM_ID.BUNDLE_ID</string>
</dict>
</plist>
```
##### Edit `notarize.js`
You'll also need to edit `notarize.js` in the `desktop` directory. Replace `<TEAM_ID>`, `<BUNDLE_ID>`, and `<APPLE_DEVELOPER_EMAIL>` with the appropriate information from the app and your account from Apple Developer.
```js
// notarize.js
// Script to notarize Hyperspace for macOS
// © 2019 Hyperspace developers. Licensed under Apache 2.0.
const { notarize } = require("electron-notarize");
// This is pulled from the Apple Keychain. To set this up,
// follow the instructions provided here:
// https://github.com/electron/electron-notarize#safety-when-using-appleidpassword
const password = `@keychain:AC_PASSWORD`;
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== "darwin") {
return;
}
console.log("Notarizing Hyperspace...");
const appName = context.packager.appInfo.productFilename;
return await notarize({
appBundleId: "<BUNDLE_ID>",
appPath: `${appOutDir}/${appName}.app`,
appleId: "<APPLE_DEVELOPER_EMAIL>",
appleIdPassword: password,
ascProvider: "<TEAM_ID>"
});
};
```
Note that the password is pulled from your keychain. You'll need to create an app password and store it in your keychain as `AC_PASSWORD`.
##### Build the apps
Run any of the following commands to build Hyperspace Desktop for the Mac:
- `npm run build:mac` - Builds the macOS app in a DMG container.
- `npm run build:mac-unsigned` - Similar to `build:mac`, but skips code signing and notarization. **Use only for CI or in situations where code signing and notarization is not available.**
- `npm run build:mas` - Builds the Mac App Store package.
## Licensing and Credits
Hyperspace is licensed under the [Non-violent Public License v4+](LICENSE.txt), a permissive license under the conditions that you do not use this for any unethical purposes and to file patent claims. Please read what your rights are as a Hyperspace user/developer in the license for more information.
Hyperspace Desktop is licensed under the [Non-violent Public License v4+](LICENSE.txt), a permissive license under the conditions that you do not use this for any unethical purposes and to file patent claims. Please read what your rights are as a Hyperspace Desktop user/developer in the license for more information.
Hyperspace has been made possible by the React, TypeScript, Megalodon, and Material-UI projects as well our [Patrons](patreon.md) and our contributors on GitHub.
Hyperspace Desktop has been made possible by the React, TypeScript, Megalodon, and Material-UI projects as well our [Patrons](patreon.md) and our contributors on GitHub.
## Contribute

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

44
ebuild/mas.yml Normal file
View File

@ -0,0 +1,44 @@
#
# Hyperspace Desktop MAS Build Config
# (C) 2020 Hyperspace Developers. Licensed under NPLv4.
#
# The following configuration file is used to configure the Mac App Store builds of Hyperspace
# Desktop. For building cross-platform apps without submitting to the Mac App Store, modify the
# standard.yml config file.
#
appId: net.marquiskurt.hyperspace
afterSign: desktop/notarize.js
directories:
buildResources: desktop
# The bundleVersion and bundleShortVersion keys in this config correspond to builds in the
# Mac App Store. If you are attempting to upload a new build of the same app version to the
# Mac App Store, change the bundle version. The bundle short version should be the same as
# the app version seen in config.json and package.json.
#
# If you are submitting a new app version entirely, make sure the bundle version and short
# version match accordingly, except in cases where the app version is the same version as an
# older Mac App Store build.
mac:
# Bundle version will reflect the build number (i.e., the release number).
bundleVersion: "28"
bundleShortVersion: "1.1.4"
category: public.app-category.social-networking
icon: desktop/app.icns
target: [dmg]
darkModeSupport: true
hardenedRuntime: false
gatekeeperAssess: false
# Note that you will need the proper entitlements files for the following keys below. Refer to
# the Hyperspace Desktop documentation regarding what keys will need to be inserted into the
# entitlements files:
# https://hyperspace.marquiskurt.net/docs/desktop-build-desktop.html
mas:
entitlements: desktop/entitlements.mas.plist
entitlementsInherit: desktop/entitlements.mas.inherit.plist
provisioningProfile: desktop/embedded.provisionprofile
dmg:
sign: false

35
ebuild/standard.yml Normal file
View File

@ -0,0 +1,35 @@
#
# Hyperspace Desktop Build Config
# (C) 2020 Hyperspace Developers. Licensed under NPLv4.
#
# The following configuration file is used to configure and build the cross-platforms apps,
# excluding the Mac App Store build. For the Mac App Store build, modify the mas.yml file.
#
appId: net.marquiskurt.hyperspace
afterSign: desktop/notarize.js
directories:
buildResources: desktop
mac:
category: public.app-category.social-networking
icon: desktop/app.icns
target: [dmg]
darkModeSupport: true
hardenedRuntime: true
dmg:
sign: false
win:
target: [nsis]
icon: desktop/app.ico
linux:
target: ["${@:1}"]
icon: linux
category: Network
snap:
confinement: strict
summary: The fluffiest client for the fediverse

36
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "hyperspace",
"version": "1.1.3",
"version": "1.1.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -3036,38 +3036,12 @@
"dev": true
},
"axios": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"version": "0.21.1",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"dev": true,
"requires": {
"follow-redirects": "1.5.10"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"dev": true,
"requires": {
"debug": "=3.1.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
}
"follow-redirects": "^1.10.0"
}
},
"axobject-query": {

View File

@ -1,7 +1,7 @@
{
"name": "hyperspace",
"productName": "Hyperspace Desktop",
"version": "1.1.3",
"version": "1.1.4",
"description": "A beautiful, fluffy client for the fediverse",
"author": "Marquis Kurt <hyperspacedev@marquiskurt.net>",
"repository": "https://github.com/hyperspacedev/hyperspace.git",
@ -18,7 +18,7 @@
"@types/react-dom": "16.8.3",
"@types/react-router-dom": "^4.3.5",
"@types/react-swipeable-views": "latest",
"axios": "^0.19.2",
"axios": "^0.21.1",
"electron": "^9.0.5",
"electron-builder": "^22.7.0",
"emoji-mart": "^2.11.2",
@ -47,19 +47,20 @@
"main": "public/electron.js",
"scripts": {
"start": "react-scripts start",
"electrify": "npm run build; electron .",
"electrify-nobuild": "electron .",
"build": "react-scripts build",
"create-mac-icon": "cd desktop; iconutil -c icns app.iconset; cd ..",
"build-desktop": "npm run build; npm run create-mac-icon; electron-builder -p 'never' -mwl deb AppImage snap",
"build-desktop-win": "electron-builder -p 'never' -w",
"build-desktop-darwin": "npm run create-mac-icon; electron-builder -p 'never' -m",
"build-desktop-darwin-nosign": "npm run create-mac-icon; electron-builder -p 'never' -m dmg -c.mac.identity=null -c.afterSign=\"desktop/donothing.js\"",
"build-desktop-linux": "electron-builder -p 'never' -l deb AppImage snap",
"build-desktop-linux-select": "electron-builder -p 'never' -l ",
"check-prettier": "prettier --check src/**/**.tsx",
"test": "react-scripts test",
"eject": "react-scripts eject"
"test:prettier": "prettier --check src/**/**.tsx",
"eject": "react-scripts eject",
"electron:build": "npm run build; electron .",
"electron:prebuilt": "electron .",
"build": "react-scripts build",
"build:icns": "iconutil -c icns desktop/app.iconset -o desktop/app.icns",
"build:desktop-all": "npm run build; npm run build:icns; electron-builder -p 'never' -mwl deb AppImage snap -c ebuild/standard.yml",
"build:win": "electron-builder -p 'never' -w -c ebuild/standard.yml",
"build:mac": "npm run build:icns; electron-builder -p 'never' -m -c ebuild/standard.yml",
"build:mac-unsigned": "npm run build:icns; electron-builder -p 'never' -m dmg -c.mac.identity=null -c.afterSign=\"desktop/donothing.js\" -c ebuild/standard.yml",
"build:mas": "npm run build:icns; electron-builder -p 'never' -m mas -c ebuild/mas.yml",
"build:linux": "electron-builder -p 'never' -l deb AppImage snap -c ebuild/standard.yml",
"build:linux-select-targets": "electron-builder -p 'never' -c ebuild/standard.yml -l "
},
"eslintConfig": {
"extends": "react-app"
@ -69,47 +70,5 @@
"not dead",
"not ie <= 11",
"not op_mini all"
],
"build": {
"appId": "net.marquiskurt.hyperspace",
"afterSign": "desktop/notarize.js",
"directories": {
"buildResources": "desktop"
},
"mac": {
"category": "public.app-category.social-networking",
"icon": "desktop/app.icns",
"target": [
"dmg",
"mas"
],
"darkModeSupport": true,
"hardenedRuntime": true
},
"mas": {
"entitlements": "desktop/entitlements.mas.plist",
"entitlementsInherit": "desktop/entitlements.mas.inherit.plist",
"provisioningProfile": "desktop/embedded.provisionprofile"
},
"dmg": {
"sign": false
},
"win": {
"target": [
"nsis"
],
"icon": "desktop/app.ico"
},
"linux": {
"target": [
"${@:1}"
],
"icon": "linux",
"category": "Network"
},
"snap": {
"confinement": "strict",
"summary": "A beautiful, fluffy client for the fediverse"
}
}
]
}

View File

@ -1,5 +1,5 @@
{
"version": "1.1.3",
"version": "1.1.4",
"location": "https://hyperspaceapp.herokuapp.com",
"branding": {
"name": "Hyperspace",
@ -13,7 +13,7 @@
"enablePublicTimeline": true
},
"registration": {
"defaultInstance": "mastodon.social"
"defaultInstance": "mastodon.online"
},
"admin": {
"name": "Hyperspace Developers",

View File

@ -139,7 +139,7 @@ class Blocked extends Component<any, IBlockedState> {
variant="outlined"
fullWidth
value={this.state.blockTextField}
placeholder="mastodon.social"
placeholder="mastodon.online"
onChange={e => this.updateTextField(e.target.value)}
></TextField>
</DialogContent>

View File

@ -226,15 +226,15 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
);
}
// Reset to mastodon.social if the location is a disallowed
// Reset to mastodon.online if the location is a disallowed
// domain.
if (
inDisallowedDomains(result.registration.defaultInstance)
) {
console.warn(
`The default instance field in config.json contains an unsupported domain (${result.registration.defaultInstance}), so it's been reset to mastodon.social.`
`The default instance field in config.json contains an unsupported domain (${result.registration.defaultInstance}), so it's been reset to mastodon.online.`
);
result.registration.defaultInstance = "mastodon.social";
result.registration.defaultInstance = "mastodon.online";
}
// Update the state as per the configuration
@ -285,6 +285,7 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
* @param user The string to update the state to
*/
updateUserInfo(user: string) {
this.checkForErrors(user);
this.setState({ user });
}
@ -392,10 +393,10 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
return "https://" + newUser.split("@")[1];
} else {
let newUser = `${user}@${this.state.registerBase ??
"mastodon.social"}`;
"mastodon.online"}`;
this.setState({ user: newUser });
return (
"https://" + (this.state.registerBase ?? "mastodon.social")
"https://" + (this.state.registerBase ?? "mastodon.online")
);
}
}
@ -403,19 +404,20 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
// Otherwise, treat them as if they're from the server
else {
let newUser = `${user}@${this.state.registerBase ??
"mastodon.social"}`;
"mastodon.online"}`;
this.setState({ user: newUser });
return "https://" + (this.state.registerBase ?? "mastodon.social");
return "https://" + (this.state.registerBase ?? "mastodon.online");
}
}
/**
* Check the user string for any errors and then create a client with an
* ID and secret to start the authorization process.
* @param bypassChecks Whether to bypass the checks in place.
*/
startLogin() {
startLogin(bypassChecks: boolean = false) {
// Check if we have errored
let error = this.checkForErrors();
let error = this.checkForErrors(this.state.user, bypassChecks);
// If we didn't, create the Hyperspace app to register onto that Mastodon
// server.
@ -452,6 +454,15 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
authUrl: resp.url,
proceedToGetCode: true
});
})
.catch((err: Error) => {
this.props.enqueueSnackbar(
`Failed to register app at ${baseurl.replace(
"https://",
""
)}`
);
console.error(err);
});
}
}
@ -510,7 +521,7 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
authorizeEmergencyLogin() {
let redirAddress =
this.state.defaultRedirectAddress === "desktop"
? "hyperspace://hyperspace/app"
? "hyperspace://hyperspace/app/"
: this.state.defaultRedirectAddress;
window.location.href = `${redirAddress}/?code=${this.state.authCode}#/`;
}
@ -534,21 +545,27 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
/**
* Check the user input string for any possible errors
* @param username The username to read and check for errors
* @param bypassesInstanceNameCheck Whether to bypass the instance name validation process. Defaults to false.
* @return Whether an error has occured in the validation.
*/
checkForErrors(): boolean {
checkForErrors(
username: string,
bypassesInstanceNameCheck: boolean = false
): boolean {
let userInputError = false;
let userInputErrorMessage = "";
// Is the user string blank?
if (this.state.user === "") {
if (username === "") {
userInputError = true;
userInputErrorMessage = "Username cannot be blank.";
this.setState({ userInputError, userInputErrorMessage });
return true;
} else {
if (this.state.user.includes("@")) {
if (username.includes("@")) {
if (this.state.federates && this.state.federates === true) {
let baseUrl = this.state.user.split("@")[1];
let baseUrl = username.split("@")[1];
// Is the user's domain in the disallowed list?
if (inDisallowedDomains(baseUrl)) {
@ -558,6 +575,9 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
});
return true;
} else {
if (bypassesInstanceNameCheck) {
return false;
}
// Are we unable to ping the server?
axios
.get(
@ -572,7 +592,7 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
.catch((err: Error) => {
let userInputError = true;
let userInputErrorMessage =
"Instance name is invalid.";
"We couldn't recognize this instance.";
this.setState({
userInputError,
userInputErrorMessage
@ -581,8 +601,8 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
});
}
} else if (
this.state.user.includes(
this.state.registerBase ?? "mastodon.social"
username.includes(
this.state.registerBase ?? "mastodon.online"
)
) {
this.setState({ userInputError, userInputErrorMessage });
@ -674,7 +694,7 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
redirectToApp() {
window.location.href =
window.location.protocol === "hyperspace:"
? "hyperspace://hyperspace/app"
? "hyperspace://hyperspace/app/"
: this.state.redirectAddressIsDynamic
? `https://${window.location.host}/#/`
: this.state.defaultRedirectAddress + "/#/";
@ -772,7 +792,6 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
onChange={event => this.updateUserInfo(event.target.value)}
onKeyDown={event => this.watchUsernameField(event)}
error={this.state.userInputError}
onBlur={() => this.checkForErrors()}
InputProps={{
startAdornment: (
<InputAdornment position="start">@</InputAdornment>
@ -782,6 +801,18 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
{this.state.userInputError ? (
<Typography color="error">
{this.state.userInputErrorMessage}
{this.state.userInputErrorMessage ===
"We couldn't recognize this instance." ? (
<span>
<br />
<Link
// className={classes.welcomeLink}
onClick={() => this.startLogin(true)}
>
Try anyway
</Link>
</span>
) : null}
</Typography>
) : null}
<br />
@ -1038,7 +1069,7 @@ class WelcomePage extends Component<IWelcomeProps, IWelcomeState> {
>
License
</Link>{" "}
|
|{" "}
<Link
className={classes.welcomeLink}
href="https://github.com/hyperspacedev/hyperspace/issues/new"

View File

@ -42,7 +42,7 @@ export type UAccount = {
*/
export type MultiAccount = {
/**
* The host name of the account (ex.: mastodon.social)
* The host name of the account (ex.: mastodon.online)
*/
host: string;