Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
Format code using Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
salomvary committed Apr 30, 2019
1 parent 0d6bf53 commit f6da45f
Show file tree
Hide file tree
Showing 31 changed files with 392 additions and 288 deletions.
8 changes: 2 additions & 6 deletions .eslintrc
@@ -1,5 +1,5 @@
{
"extends": "airbnb-base",
"extends": ["airbnb-base", "prettier"],
"parserOptions": {
"sourceType": "scripts"
},
Expand All @@ -9,17 +9,13 @@
"es6": true
},
"rules": {
"comma-dangle": ["error", "never"],
"consistent-return": "off",
"eqeqeq": "off",
"import/order": "off",
"indent": [2, 2],
"no-console": 0,
"no-use-before-define": ["error", "nofunc"],
"prefer-template": "off",
"semi": [2, "never"],
"strict": [2, "global"],
"curly": [2, "all"]
"strict": [2, "global"]
},
"settings": {
"import/core-modules": [ "electron" ]
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc.json
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "always"
}
11 changes: 6 additions & 5 deletions .travis.yml
@@ -1,11 +1,12 @@
os:
- osx
- osx
language: node_js
node_js:
- '8'
- '8'
script:
- npm run eslint
- npm test
- npm run release
- npm run eslint
- npm run prettier
- npm test
- npm run release
env:
secure: pTXmdkvqiBTO66GlnMkz8m2WSkXQ3mp3s5JB/0mnP17eMUbd17P0TomKT5yIoBp3CcXGuFmVYzNV/rqZQwgDgEiwNFotIsCEPjd/eLrsLeBt0IYic0qqKhi7+hDFhFzPfMvpkiDl3pNlzH0ehpubZ029uGn1J2id0jmicwcvLsuIHukyuWUhuNIRjounJBuiaLd5CuZc2JnSoGY5Mz5f9rkqu/lYFKIa/8xSLXlor5ABzZVQEQQHY06dc/2cFW5frV4QH0BOkFl84lNFXBkrUoVG/IR3/E3obQOpnrhebdTQBACbyn7DRqYdXCERDEFdsrCyTowsWj8xAGE0vZZ80eu2jDdLeWhY4Wpw/58IhRh4O/zHXn/gWMCN1Dya6P/2reuNqn3jhN3xYkU9su9fZLMTeD4/X/Ru5J5hUx+mv+TCX2t2mkL60cquv7kYg3oiWL17RtJKmA5J/Na2qLPsNzNzmhhu4lvSFCSwAjOdAQ0YorvK2rdd+smWRQTkW2t7oWngrwZS5T0I1RzLlpQpiiXOQCHjfwKKuPtu01XyKH9up7uzwFxvZx8JURy9I0BHHSn4ojz7aIARpcVk3ioMtoaOBruMKwkCaWpqn1RBo96q4BJ1lIKAVSY5XeH7IR6DQ83Z9CsQAizPtihY0WgKrnvgmcnPo8N5cSmhbwiflXI=
35 changes: 32 additions & 3 deletions CHANGELOG.md
@@ -1,72 +1,89 @@
## 1.4.0 (August 31, 2018)

- Allow launching with a SoundCloud URL from the command line
- Security updates

## 1.3.4 (March 23, 2018)

- Fix broken history navigation shortcuts

## 1.3.3 (February 26, 2018)

- Fix reposting and liking tracks while searching #163 #165
- Fix Bluetooth headphone Play/Pause #159
- Fix "window is not defined" on network errors #149

## 1.3.2 (November 28, 2017)

- Fix notification spam when seeking or restarting play
- Adds a "repost" option to all of the menus
- Bring in latest security fixes from Electron (see https://electron.atom.io/releases/)

## 1.3.1 (October 17, 2017) (revoked release due to broken signatures)

- Fix notification spam when seeking or restarting play
- Adds a "repost" option to all of the menus
- Bring in latest security fixes from Electron (see https://electron.atom.io/releases/)

## 1.3.0 (April 20, 2017)

- Support Windows back/forward/home keys
- Add MacBook Touch Bar support

## 1.2.0 (March 14, 2017)

- Fix full screen closing/quitting on macOS
- Add like/unlike to the main and dock menus
- Show album art on desktop notification

## 1.1.9 (March 3, 2017)
## 1.1.9 (March 3, 2017)

- Fix black screen when closing fullscreen app

## 1.1.8 (January 17, 2017)

- Fix accidental back navigation when scrolling

## 1.1.7 (January 14, 2017)

- Add experimental swipe back/forward navigation
- Fix media key flakyness under some circumstances
- Fix crash on startup #130

## 1.1.6 (November 23, 2016)

- Release SoundCleod for Windows
- Yet another fix for Facebook login

## 1.1.5 (November 16, 2016)

- Allow hiding main window with Cmd+1
- Prevent quitting with Cmd+W on macOS

## 1.1.4 (November 14, 2016)

- Fix broken play/pause/prev/next menu items
- Prevent exception on right clicking certain elements
- Download updates from https://updates.soundcleod.com

## 1.1.3 (November 4, 2016)
## 1.1.3 (November 4, 2016)

- Fix Google login (again)
- Improve how window position is saved

## 1.1.2 (October 18, 2016)

- Log detailed errors for easier debugging

## 1.1.1 (October 18, 2016)

- Improve when the error screen is shown
- Show error code on the error screen
- Open share windows within SoundCleod (again)
- Fix Facebook login (again)

## 1.1.0 (October 7, 2016)
## 1.1.0 (October 7, 2016)

- Fix Facebook login
- Open external links in system browser
- Add standard actions to the context menu
Expand Down Expand Up @@ -104,50 +121,62 @@ happen quickly. They will hopefully added back some time in the near future:
- Space bar play/pause control only works if SoundCleod is in foreground

## 0.20 (June 17, 2016)

- Fix startup with blank screen (upgrade Sparkle to latest)
- Update the list of applications for media keys compatibility

## 0.19 (May 26, 2016)

- Fix broken media keys

## 0.18 (May 15, 2015)

- Added "History" and "Controls" menu
- Removed the "Install Flash" dialog
- Added DockMenu support for pause/play, previous and next

## 0.17 (December 19, 2014)

- detect and prompt when Flash Plugin is blocked by Safari

## 0.16 (December 7, 2014)

- Prompt for installing the plugin when no Flash for Safari is detected
- Show current URL in the "open location" dialog (Cmd+L)
- Fixed spacebar for keyboard navigation and play/pause when hidden

## 0.15 (November 13, 2014)

- Another attempt to fix scrolling issues with Yosemite

## 0.14 (November 5, 2014)

- Fix scrolling issues with Yosemite
- Removed swipe back-forward navigation
- Added microphone start/stop button support

## 0.13 (October 14, 2014)

- Fix broken media keys
- Fix broken "open SoundCloud url" dialog
- Support custom cleod:// url scheme

## 0.12 (November 8, 2013)

- Automatic updates yay!

## 0.11 (October 10, 2013)

- fixed closing window stops music in certain cases
- notifications support

## 0.10 (September 13, 2013)

- added reload menu item and Cmd+R shortcut
- added main window menu item and Cmd+1 shortcut

## 0.9.1 (August 1, 2013)

- distributed as .dmg package instead of Mac Installer
- compatible with OSX 10.7 Lion

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -11,7 +11,7 @@ docs](DEVELOPMENT.md).
## Submitting bug reports

Please **do not report issues with soundcloud.com** here. If you found a bug or have some other problem using SoundCloud's website or mobile apps please [contact
SoundCloud through one of their support channels directly](https://soundcloud.com/pages/contact).
SoundCloud through one of their support channels directly](https://soundcloud.com/pages/contact).

Besides a clear explanation of what problem you are facing please provide the
following details:
Expand All @@ -23,7 +23,7 @@ following details:

## Requesting or adding new features

SoundCleod is meant to be a *lightweight* desktop application for
SoundCleod is meant to be a _lightweight_ desktop application for
soundcloud.com. Although there are thousands of ways to extend the
functionality of both the application and the website please be very
considerate when coming up with new ideas.
Expand All @@ -49,7 +49,7 @@ There are a few conventions to follow:
- Indent with two spaces
- No semicolons in JavaScript
- Change one thing only in a pull request
- Make sure there are no failing tests or linting errors (`npm test` and `npm run eslint` must pass)
- Make sure there are no failing tests, code quality and styling errors (`npm run verify` must pass)
- Keep commit messages short
- Use the present tense in commit messages ("Add feature" not "Added feature")
- Use the imperative mood in commit messages ("Move cursor to..." not "Moves cursor to...")
9 changes: 6 additions & 3 deletions DEVELOPMENT.md
Expand Up @@ -16,7 +16,10 @@ SoundCleod comes with a small test suite:
npm test -- test/options.js # run a single test file

The JavaScript code is verified with ESLint. It is strongly recommended to [install a plugin
for your editor](https://eslint.org/docs/user-guide/integrations#editors) or simply run `npm run eslint` from the command line.
for your editor](https://eslint.org/docs/user-guide/integrations#editors) or simply run `npm run eslint` from the command line. Some problems can automatically be fixed using `npm run eslint:fix`.

Consistent code formatting is enforced with Prettier. It is strongly recommended to [install a plugin
for your editor](https://prettier.io/docs/en/editors.html). To verify correct formatting run `npm run prettier` from the command line, to reformat files use `npm run prettier:fix`.

Now that you are all set start making changes and check out the [Electron documentation](https://electronjs.org/docs) for more!

Expand All @@ -43,8 +46,8 @@ Distributable installers can be built with the npm `dist` script:
Start SoundCleod with `npm start` or the installed application with `--developer-tools`:

/Applications/SoundCleod.app/Contents/MacOS/SoundCleod --developer-tools
Use Cmd+Option+I to toggle Developer Tools or use View > Toggle Developer Tools from the menu.

Use Cmd+Option+I to toggle Developer Tools or use View > Toggle Developer Tools from the menu.

## Tricks and tips

Expand Down
5 changes: 2 additions & 3 deletions MAINTENANCE.md
Expand Up @@ -71,7 +71,7 @@ Exporting a macOS certificate for signing a Windows application:
This is required for automatically publishing releases to GitHub.

- Create a [new personal access token on GitHub](https://github.com/settings/tokens)
- Only enable `public_repo` permission
- Only enable `public_repo` permission
- [Encrypt the token for AppVeyor here](https://ci.appveyor.com/tools/encrypt)
- Update `environment.GH_TOKEN.secure` with the token in `appveyor.yml`
- Update the token in `.travis.yml` with `travis encrypt --add env GH_TOKEN=<the token>` (install the Travis Gem first with `gem install travis`)
Expand All @@ -80,8 +80,7 @@ This is required for automatically publishing releases to GitHub.
## Set up code signing certificates on Travis CI and AppVeyor

- Export the certificate as `codesign-certificate.p12`
- Encode file to base64 (macOS: `base64 -i codesign-certificate.p12 | pbcopy`, Linux: `base64 codesign-certificate.p12 >
codesign-certificate.txt`).
- Encode file to base64 (macOS: `base64 -i codesign-certificate.p12 | pbcopy`, Linux: `base64 codesign-certificate.p12 > codesign-certificate.txt`).
- Set `CSC_LINK` and `CSC_KEY_PASSWORD` environment variables. The base64 encoded value goes into `CSC_LINK` without change.
- [Travis CI Settings](https://travis-ci.org/salomvary/soundcleod/settings)
- [AppVeyor Settings](https://ci.appveyor.com/project/salomvary/soundcleod/settings/environment)
Expand Down
4 changes: 2 additions & 2 deletions README.markdown
Expand Up @@ -19,7 +19,7 @@ Current version is 1.4.0 (August 31, 2018) [see changes](https://github.com/salo
### For macOS

- [Download macOS installer from
here](https://github.com/salomvary/soundcleod/releases/download/v1.4.0/soundcleod-1.4.0.dmg)
here](https://github.com/salomvary/soundcleod/releases/download/v1.4.0/soundcleod-1.4.0.dmg)
- Locate the installer (.dmg) file in the Finder
- Right click (or control-click) on the installer file
- If prompted **"SoundCleod-1.4.0.dmg" is from an unidentified developer. Are you sure you want to open it?**,
Expand All @@ -43,7 +43,7 @@ To use media keys on macOS Mojave (10.14) or newer:
### For Windows

- [Download Windows installer from
here](https://github.com/salomvary/soundcleod/releases/download/v1.4.0/soundcleod-Setup-1.4.0.exe)
here](https://github.com/salomvary/soundcleod/releases/download/v1.4.0/soundcleod-Setup-1.4.0.exe)
- Save the file when prompted
- Run the downloaded installer

Expand Down
71 changes: 44 additions & 27 deletions app/about.html
@@ -1,7 +1,7 @@
<!doctype html>
<!DOCTYPE html>

<title>About SoundCleod</title>
<meta charset="utf-8">
<meta charset="utf-8" />
<style>
body {
font-family: sans-serif;
Expand All @@ -26,50 +26,67 @@

<body>
<p>
<img src="about-icon.png" width="64" height="64" alt="SoundCleod logo">
<img src="about-icon.png" width="64" height="64" alt="SoundCleod logo" />
</p>

<p>
<b>SoundCleod</b><br>
<b>SoundCleod</b><br />
Version <span id="app-version"></span>
<script>document.getElementById('app-version').textContent = appVersion</script>
<script>
document.getElementById('app-version').textContent = appVersion
</script>
</p>

<p>
<b>UNOFFICIAL SoundCloud for Windows</b><br>
<b>UNOFFICIAL SoundCloud for Windows</b><br />
<a href="http://soundcleod.com" target="_blank">http://soundcleod.com</a>
</p>

<p>
<b>Created by</b><br>
Márton Salomváry<br>
<a href="mailto:salomvary@gmail.com" target="_blank">salomvary@gmail.com</a><br>
<a href="https://twitter.com/salomvary" target="_blank">https://twitter.com/salomvary</a><br>
<b>Created by</b><br />
Márton Salomváry<br />
<a href="mailto:salomvary@gmail.com" target="_blank">salomvary@gmail.com</a
><br />
<a href="https://twitter.com/salomvary" target="_blank"
>https://twitter.com/salomvary</a
><br />
</p>

<p>
and <a href="https://github.com/salomvary/soundcleod/graphs/contributors">SoundCleod contributors</a>
and
<a href="https://github.com/salomvary/soundcleod/graphs/contributors"
>SoundCleod contributors</a
>
</p>

<div class="license">
<p>
Copyright (C) 2012-2016 Márton Salomváry
Copyright (C) 2012-2016 Márton Salomváry
</p>

<p>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
</p>

<p>
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
</p>

<p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
</p>
</div>

<p>
Expand Down

0 comments on commit f6da45f

Please sign in to comment.