diff --git a/music/templates/app.html b/music/templates/app.html index dad2198..fde3022 100644 --- a/music/templates/app.html +++ b/music/templates/app.html @@ -1,7 +1,7 @@ - sarsoo/spotify + sarsoo/music diff --git a/src/js/Admin/Admin.js b/src/js/Admin/Admin.js index 1028609..d3c565b 100644 --- a/src/js/Admin/Admin.js +++ b/src/js/Admin/Admin.js @@ -11,9 +11,9 @@ class Admin extends Component { return (
diff --git a/src/js/Admin/Functions.js b/src/js/Admin/Functions.js index 23c4084..3871c51 100644 --- a/src/js/Admin/Functions.js +++ b/src/js/Admin/Functions.js @@ -15,20 +15,20 @@ class Functions extends Component { runAllUsers(event){ axios.get('/api/playlist/run/users') .then((response) => { - showMessage('users run'); + showMessage('Users Run'); }) .catch((error) => { - showMessage(`error running all users (${error.response.status})`); + showMessage(`Error Running All Users (${error.response.status})`); }); } runStats(event){ axios.get('/api/spotfm/playlist/refresh/users') .then((response) => { - showMessage('stats run'); + showMessage('Stats Run'); }) .catch((error) => { - showMessage(`error running all users (${error.response.status})`); + showMessage(`Error Running All Users (${error.response.status})`); }); } @@ -38,19 +38,19 @@ class Functions extends Component { -

admin functions

+

Admin Functions

- + - + diff --git a/src/js/Admin/Lock.js b/src/js/Admin/Lock.js index f2a5a94..d04099a 100644 --- a/src/js/Admin/Lock.js +++ b/src/js/Admin/Lock.js @@ -26,7 +26,7 @@ class Lock extends Component { }) }) .catch((error) => { - showMessage(`error getting users info (${error.response.status})`); + showMessage(`Error Getting User Info (${error.response.status})`); }); } @@ -36,7 +36,7 @@ class Lock extends Component { locked: to_state }).catch((error) => { var lockMessage = to_state ? 'locking' : 'unlocking'; - showMessage(`error ${lockMessage} ${username} (${error.response.status})`); + showMessage(`Error ${lockMessage} ${username} (${error.response.status})`); }).finally(() => { this.getUserInfo(); }); @@ -53,7 +53,7 @@ class Lock extends Component {

- account locks + Account Locks

@@ -78,7 +78,7 @@ function Row(props){ diff --git a/src/js/Admin/Tasks.js b/src/js/Admin/Tasks.js index 34cfd8a..c9742cd 100644 --- a/src/js/Admin/Tasks.js +++ b/src/js/Admin/Tasks.js @@ -25,7 +25,7 @@ class Tasks extends Component { }); }) .catch((error) => { - showMessage(`error getting tasks (${error.response.status})`); + showMessage(`Error Getting Tasks (${error.response.status})`); }); } @@ -35,7 +35,7 @@ class Tasks extends Component { -

running tasks

+

Running Tasks

@@ -43,7 +43,7 @@ class Tasks extends Component { - {this.state.total_tasks} running tasks + {this.state.total_tasks} Currently Running diff --git a/src/js/Index/Index.js b/src/js/Index/Index.js index 8bf428e..0f3d267 100644 --- a/src/js/Index/Index.js +++ b/src/js/Index/Index.js @@ -14,29 +14,29 @@ class Index extends Component{ -

music tools

+

Music Tools

- construct spotify playlists from selections of other playlists + Construct spotify playlists from selections of other playlists - group sub-genre playlists + Group sub-genre playlists - optionally append auto-generated recommendations + Optionally append auto-generated recommendations -

playlists are run multiple times a day +

Playlists are run multiple times a day diff --git a/src/js/PlaylistManager.js b/src/js/MusicTools.js similarity index 87% rename from src/js/PlaylistManager.js rename to src/js/MusicTools.js index aee215c..c2c081d 100644 --- a/src/js/PlaylistManager.js +++ b/src/js/MusicTools.js @@ -14,7 +14,7 @@ import showMessage from "./Toast.js" const axios = require('axios'); -class PlaylistManager extends Component { +class MusicTools extends Component { constructor(props){ super(props); @@ -56,12 +56,12 @@ class PlaylistManager extends Component {
- - - - - { this.state.type == 'admin' && } - + + + + + { this.state.type == 'admin' && } +
home
playlists
maths
settings
admin
logout
Home
Playlists
Maths
Settings
Admin
Logout
sarsoo.xyz
@@ -87,4 +87,4 @@ class PlaylistManager extends Component { } -export default PlaylistManager; \ No newline at end of file +export default MusicTools; \ No newline at end of file diff --git a/src/js/Playlist/NewPlaylist.js b/src/js/Playlist/NewPlaylist.js index bb00e7a..c98088e 100644 --- a/src/js/Playlist/NewPlaylist.js +++ b/src/js/Playlist/NewPlaylist.js @@ -25,12 +25,12 @@ class NewPlaylist extends Component { switch(value){ case 'default': this.setState({ - description: 'merge playlists as-is with deduplication by spotify id' + description: 'Merge playlists as-is with deduplication by spotify id' }) break; case 'recents': this.setState({ - description: "select songs from playlists which have been added since a variable number of days" + description: "Select songs from playlists which have been added since a variable number of days" }) break; } @@ -64,19 +64,19 @@ class NewPlaylist extends Component { shuffle: false, type: this.state.type, }).then((response) => { - showMessage(`${this.state.name} created`); + showMessage(`${this.state.name} Created`); }).catch((error) => { - showMessage(`error creating playlist (${error.response.status})`); + showMessage(`Error Creating Playlist (${error.response.status})`); }); }else{ - showMessage('named playlist already exists'); + showMessage('Named Playlist Already Exists'); } }) .catch((error) => { - showMessage(`error getting playlists (${error.response.status})`); + showMessage(`Error Getting Playlists (${error.response.status})`); }); }else{ - showMessage('enter name'); + showMessage('Enter Name'); } } @@ -86,7 +86,7 @@ class NewPlaylist extends Component { -

new playlist

+

New Playlist

@@ -94,8 +94,8 @@ class NewPlaylist extends Component { @@ -105,12 +105,12 @@ class NewPlaylist extends Component { type="text" value={this.state.name} onChange={this.handleInputChange} - placeholder="name"/> + placeholder="Name"/> - + diff --git a/src/js/Playlist/Playlists.js b/src/js/Playlist/Playlists.js index 136ea41..03299dc 100644 --- a/src/js/Playlist/Playlists.js +++ b/src/js/Playlist/Playlists.js @@ -11,8 +11,8 @@ class Playlists extends Component { return (
    -
  • new
  • -
  • play
  • +
  • New
  • +
  • Play
diff --git a/src/js/Playlist/PlaylistsView.js b/src/js/Playlist/PlaylistsView.js index 6dc6fdc..b0035c9 100644 --- a/src/js/Playlist/PlaylistsView.js +++ b/src/js/Playlist/PlaylistsView.js @@ -36,7 +36,7 @@ class PlaylistsView extends Component { }); }) .catch((error) => { - showMessage(`error getting playlists (${error.response.status})`); + showMessage(`Error Getting Playlists (${error.response.status})`); }); } @@ -49,23 +49,23 @@ class PlaylistsView extends Component { showMessage(`${name} ran`); }) .catch((error) => { - showMessage(`error running ${name} (${error.response.status})`); + showMessage(`Error Running ${name} (${error.response.status})`); }); }else{ - showMessage(`link spotify before running`); + showMessage(`Link Spotify Before Running`); } }).catch((error) => { - showMessage(`error running ${this.state.name} (${error.response.status})`); + showMessage(`Error Running ${this.state.name} (${error.response.status})`); }); } handleDeletePlaylist(name, event){ axios.delete('/api/playlist', { params: { name: name } }) .then((response) => { - showMessage(`${name} deleted`); + showMessage(`${name} Deleted`); this.getPlaylists(); }).catch((error) => { - showMessage(`error deleting ${name} (${error.response.status})`); + showMessage(`Error Deleting ${name} (${error.response.status})`); }); } @@ -75,16 +75,16 @@ class PlaylistsView extends Component { if(response.data.spotify_linked == true){ axios.get('/api/playlist/run/user') .then((response) => { - showMessage("all playlists ran"); + showMessage("All Playlists Ran"); }) .catch((error) => { - showMessage(`error running all (${error.response.status})`); + showMessage(`Error Running All (${error.response.status})`); }); }else{ - showMessage(`link spotify before running`); + showMessage(`Link Spotify Before Running`); } }).catch((error) => { - showMessage(`error running ${this.state.name} (${error.response.status})`); + showMessage(`Error Running ${this.state.name} (${error.response.status})`); }); } @@ -108,7 +108,7 @@ function Table(props){ - no playlists + No Playlists @@ -119,7 +119,7 @@ function Table(props){ handleDeletePlaylist={props.handleDeletePlaylist} key={ playlist.name }/>) } - + )} @@ -131,8 +131,8 @@ function Row(props){ return ( - - + + ); } diff --git a/src/js/Playlist/ScratchView.js b/src/js/Playlist/ScratchView.js index 09f33a8..e60c757 100644 --- a/src/js/Playlist/ScratchView.js +++ b/src/js/Playlist/ScratchView.js @@ -86,7 +86,7 @@ class ScratchView extends Component{ }); }) .catch((error) => { - showMessage(`error getting playlists (${error.response.status})`); + showMessage(`Error Getting Playlists (${error.response.status})`); }); } @@ -141,11 +141,11 @@ class ScratchView extends Component{ newPlaylistName: '' }); }else{ - showMessage('playlist already added'); + showMessage('Playlist Already Added'); } }else{ - showMessage('enter playlist name'); + showMessage('Enter Playlist Name'); } } @@ -173,11 +173,11 @@ class ScratchView extends Component{ }); }else{ - showMessage('playlist already added'); + showMessage('Playlist Already Added'); } }else{ - showMessage('no other playlists to add'); + showMessage('No Other Playlists To Add'); } } @@ -218,19 +218,19 @@ class ScratchView extends Component{ add_last_month: this.state.add_last_month }) .then((reponse) => { - showMessage(`played`); + showMessage(`Played`); }) .catch((error) => { - showMessage(`error playing (${error.response.status})`); + showMessage(`Error Playing (${error.response.status})`); }); }else{ - showMessage(`link spotify before running`); + showMessage(`Link Spotify Before Running`); } }).catch((error) => { - showMessage(`error playing (${error.response.status})`); + showMessage(`Error Playing (${error.response.status})`); }); }else{ - showMessage(`add either playlists or parts`); + showMessage(`Add Either Playlists Or Parts`); } } @@ -250,7 +250,7 @@ class ScratchView extends Component{ -

spotify playlist can be the name of either your own created playlist or one you follow, names are case sensitive +

Spotify playlist can be the name of either your own created playlist or one you follow, names are case sensitive @@ -260,10 +260,10 @@ class ScratchView extends Component{ className="full-width" value={this.state.newPlaylistName} onChange={this.handleInputChange} - placeholder="spotify playlist name"> + placeholder="Spotify Playlist Name"> - + @@ -278,12 +278,12 @@ class ScratchView extends Component{ - + - shuffle output? + Shuffle Output - include recommendations? + Include Recommendations - number of recommendations + Recommendation Size - added since (days) + Added Since (Days) - include {thisMonth[date.getMonth()]} playlist + Include {thisMonth[date.getMonth()]} Playlist - include {lastMonth[date.getMonth()]} playlist + Include {lastMonth[date.getMonth()]} Playlist - playlist type + Type @@ -402,7 +402,7 @@ function Row (props) { return ( { props.part } - + ); } diff --git a/src/js/Playlist/View/Count.js b/src/js/Playlist/View/Count.js index 2af87b0..40070a5 100644 --- a/src/js/Playlist/View/Count.js +++ b/src/js/Playlist/View/Count.js @@ -40,24 +40,24 @@ class Count extends Component { isLoading: false }) }else{ - showMessage('no stats for this playlist'); + showMessage('No Stats For This Playlist'); } }) .catch((error) => { - showMessage(`error getting playlist info (${error.response.status})`); + showMessage(`Error Getting Playlist Info (${error.response.status})`); }); } updateStats(){ axios.get(`/api/spotfm/playlist/refresh?name=${ this.state.name }`) .then((response) => { - showMessage('stats refresh queued'); + showMessage('Stats Refresh Queued'); }) .catch((error) => { if(error.response.status == 401){ - showMessage('missing either spotify or last.fm link'); + showMessage('Missing Either Spotify or Last.fm link'); }else{ - showMessage(`error refreshing (${error.response.status})`); + showMessage(`Error Refreshing (${error.response.status})`); } }); } @@ -66,24 +66,24 @@ class Count extends Component { return ( - scrobble count: {this.state.playlist.lastfm_stat_count.toLocaleString()} / {this.state.playlist.lastfm_stat_percent}% + Scrobble Count: {this.state.playlist.lastfm_stat_count.toLocaleString()} / {this.state.playlist.lastfm_stat_percent}% - album count: {this.state.playlist.lastfm_stat_album_count.toLocaleString()} / {this.state.playlist.lastfm_stat_album_percent}% + Album Count: {this.state.playlist.lastfm_stat_album_count.toLocaleString()} / {this.state.playlist.lastfm_stat_album_percent}% - artist count: {this.state.playlist.lastfm_stat_artist_count.toLocaleString()} / {this.state.playlist.lastfm_stat_artist_percent}% + Artist Count: {this.state.playlist.lastfm_stat_artist_count.toLocaleString()} / {this.state.playlist.lastfm_stat_artist_percent}% - last updated {this.state.playlist.lastfm_stat_last_refresh.toLocaleString()} + Last Updated {this.state.playlist.lastfm_stat_last_refresh.toLocaleString()} @@ -92,10 +92,10 @@ class Count extends Component { @@ -104,10 +104,10 @@ class Count extends Component { @@ -115,7 +115,7 @@ class Count extends Component { - + diff --git a/src/js/Playlist/View/Edit.js b/src/js/Playlist/View/Edit.js index 32a06ca..60d886e 100644 --- a/src/js/Playlist/View/Edit.js +++ b/src/js/Playlist/View/Edit.js @@ -106,7 +106,7 @@ class Edit extends Component{ }); })) .catch((error) => { - showMessage(`error getting playlist info (${error.response.status})`); + showMessage(`Error Getting Playlist Info (${error.response.status})`); }); } @@ -152,7 +152,7 @@ class Edit extends Component{ name: this.state.name, day_boundary: parseInt(boundary) }).catch((error) => { - showMessage(`error updating boundary value (${error.response.status})`); + showMessage(`Error Updating Boundary Value (${error.response.status})`); }); } @@ -167,7 +167,7 @@ class Edit extends Component{ name: this.state.name, recommendation_sample: parseInt(sample) }).catch((error) => { - showMessage(`error updating rec. sample value (${error.response.status})`); + showMessage(`Error Updating Rec. Sample Value (${error.response.status})`); }); } @@ -176,7 +176,7 @@ class Edit extends Component{ name: this.state.name, type: sample }).catch((error) => { - showMessage(`error updating type (${error.response.status})`); + showMessage(`Error Updating Type (${error.response.status})`); }); } @@ -188,7 +188,7 @@ class Edit extends Component{ name: this.state.name, shuffle: event.target.checked }).catch((error) => { - showMessage(`error updating shuffle value (${error.response.status})`); + showMessage(`Error Updating Shuffle Value (${error.response.status})`); }); } @@ -200,7 +200,7 @@ class Edit extends Component{ name: this.state.name, add_this_month: event.target.checked }).catch((error) => { - showMessage(`error updating add this month (${error.response.status})`); + showMessage(`Error Updating Add This Month (${error.response.status})`); }); } @@ -212,7 +212,7 @@ class Edit extends Component{ name: this.state.name, add_last_month: event.target.checked }).catch((error) => { - showMessage(`error updating add last month (${error.response.status})`); + showMessage(`Error Updating Add Last Month (${error.response.status})`); }); } @@ -224,7 +224,7 @@ class Edit extends Component{ name: this.state.name, include_recommendations: event.target.checked }).catch((error) => { - showMessage(`error updating rec. value (${error.response.status})`); + showMessage(`Error Updating Rec. Value (${error.response.status})`); }); } @@ -236,7 +236,7 @@ class Edit extends Component{ name: this.state.name, include_library_tracks: event.target.checked }).catch((error) => { - showMessage(`error updating library tracks (${error.response.status})`); + showMessage(`Error Updating Library Tracks (${error.response.status})`); }); } @@ -245,7 +245,7 @@ class Edit extends Component{ name: this.state.name, chart_range: value }).catch((error) => { - showMessage(`error updating chart range (${error.response.status})`); + showMessage(`Error Updating Chart Range (${error.response.status})`); }); } @@ -254,7 +254,7 @@ class Edit extends Component{ name: this.state.name, chart_limit: parseInt(value) }).catch((error) => { - showMessage(`error updating limit (${error.response.status})`); + showMessage(`Error Updating Limit (${error.response.status})`); }); } @@ -282,14 +282,14 @@ class Edit extends Component{ name: this.state.name, parts: parts }).catch((error) => { - showMessage(`error adding part (${error.response.status})`); + showMessage(`Error Adding Part (${error.response.status})`); }); }else{ - showMessage('playlist already added'); + showMessage('Playlist Already Added'); } }else{ - showMessage('enter playlist name'); + showMessage('Enter Playlist Name'); } } @@ -319,15 +319,15 @@ class Edit extends Component{ name: this.state.name, playlist_references: playlist_references }).catch((error) => { - showMessage(`error adding reference (${error.response.status})`); + showMessage(`Error Adding Reference (${error.response.status})`); }); }else{ - showMessage('playlist already added'); + showMessage('Playlist Already Added'); } }else{ - showMessage('no other playlists to add'); + showMessage('No Other Playlists to Add'); } } @@ -346,7 +346,7 @@ class Edit extends Component{ name: this.state.name, parts: parts }).catch((error) => { - showMessage(`error removing part (${error.response.status})`); + showMessage(`Error Removing Part (${error.response.status})`); }); } @@ -365,7 +365,7 @@ class Edit extends Component{ name: this.state.name, playlist_references: playlist_references }).catch((error) => { - showMessage(`error removing reference (${error.response.status})`); + showMessage(`Error Removing Reference (${error.response.status})`); }); } @@ -375,16 +375,16 @@ class Edit extends Component{ if(response.data.spotify_linked == true){ axios.get('/api/playlist/run', {params: {name: this.state.name}}) .then((reponse) => { - showMessage(`${this.state.name} ran`); + showMessage(`${this.state.name} Run`); }) .catch((error) => { - showMessage(`error running ${this.state.name} (${error.response.status})`); + showMessage(`Error Running ${this.state.name} (${error.response.status})`); }); }else{ - showMessage(`link spotify before running`); + showMessage(`Link Spotify Before Running`); } }).catch((error) => { - showMessage(`error running ${this.state.name} (${error.response.status})`); + showMessage(`Error Running ${this.state.name} (${error.response.status})`); }); } @@ -394,14 +394,14 @@ class Edit extends Component{ const table = ( - { this.state.playlist_references.length > 0 && managed } + { this.state.playlist_references.length > 0 && Managed } { this.state.playlist_references.length > 0 && } - { this.state.parts.length > 0 && spotify } + { this.state.parts.length > 0 && Spotify } { this.state.parts.length > 0 && } -

spotify playlist can be the name of either your own created playlist or one you follow, names are case sensitive +

Spotify playlist can be the name of either your own created playlist or one you follow, names are case sensitive @@ -411,10 +411,10 @@ class Edit extends Component{ className="full-width" value={this.state.newPlaylistName} onChange={this.handleInputChange} - placeholder="spotify playlist name"> + placeholder="Spotify Playlist Name"> - + @@ -429,12 +429,12 @@ class Edit extends Component{ - + - shuffle output? + Shuffle Output - include recommendations? + Include Recommendations - include library tracks? + Include Library Tracks - number of recommendations + Recommendation Size - limit + Chart Size - chart range + Chart Range @@ -513,7 +513,7 @@ class Edit extends Component{ { this.state.type == 'recents' && - added since (days) + Added Since (days) - include {thisMonth[date.getMonth()]} playlist + Include {thisMonth[date.getMonth()]} Playlist - include {lastMonth[date.getMonth()]} playlist + Include {lastMonth[date.getMonth()]} Playlist - playlist type + Type - + @@ -577,7 +577,7 @@ class Edit extends Component{ -

loading...

+

Loading...

; @@ -599,7 +599,7 @@ function Row (props) { return ( { props.part } - + ); } diff --git a/src/js/Playlist/View/View.js b/src/js/Playlist/View/View.js index 22f7c3a..1c3ed74 100644 --- a/src/js/Playlist/View/View.js +++ b/src/js/Playlist/View/View.js @@ -18,8 +18,8 @@ class View extends Component{
    -
  • edit
  • -
  • count
  • +
  • Edit
  • +
  • Count
diff --git a/src/js/Settings/ChangePassword.js b/src/js/Settings/ChangePassword.js index f72451b..2cdb810 100644 --- a/src/js/Settings/ChangePassword.js +++ b/src/js/Settings/ChangePassword.js @@ -68,12 +68,12 @@ class ChangePassword extends Component { - + - + - + - + - +

change password

Change Password

current:Current:
new:New:
new again:New Again:
diff --git a/src/js/Settings/LastFM.js b/src/js/Settings/LastFM.js index 88407dd..88174d1 100644 --- a/src/js/Settings/LastFM.js +++ b/src/js/Settings/LastFM.js @@ -69,12 +69,12 @@ class LastFM extends Component { - + - +

last.fm username

Last.fm Username

username:Username: ; - const loadingMessage =

loading...

; + const loadingMessage =

Loading...

; return this.state.isLoading ? loadingMessage : table; } diff --git a/src/js/Settings/Settings.js b/src/js/Settings/Settings.js index 6f0438d..a664e49 100644 --- a/src/js/Settings/Settings.js +++ b/src/js/Settings/Settings.js @@ -11,9 +11,9 @@ class Settings extends Component { return (
    -
  • password
  • -
  • spotify
  • -
  • last.fm
  • +
  • Password
  • +
  • Spotify
  • +
  • Last.fm
diff --git a/src/js/Settings/SpotifyLink.js b/src/js/Settings/SpotifyLink.js index 5abe107..41efe8c 100644 --- a/src/js/Settings/SpotifyLink.js +++ b/src/js/Settings/SpotifyLink.js @@ -32,13 +32,13 @@ class SpotifyLink extends Component { - + @@ -49,18 +49,18 @@ class SpotifyLink extends Component {

spotify link status

Spotify Link

- status: { this.state.spotify_linked ? "linked" : "unlinked" } + Status: { this.state.spotify_linked ? "Linked" : "Unlinked" }
; - const loadingMessage =

loading...

; + const loadingMessage =

Loading...

; return this.state.isLoading ? loadingMessage : table; } } function AuthButton(props) { - return auth; + return Auth; } function DeAuthButton(props) { - return de-auth; + return De-Auth; } export default SpotifyLink; \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js index cde1aaa..0fcdabe 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -1,6 +1,6 @@ import React from "react"; import ReactDOM from "react-dom"; -import PlaylistManager from "./PlaylistManager.js"; +import MusicTools from "./MusicTools"; -ReactDOM.render(, document.getElementById('react')); \ No newline at end of file +ReactDOM.render(, document.getElementById('react')); \ No newline at end of file