From 82e1e3d1c27604838569a4e2e613ff34f1b88cef Mon Sep 17 00:00:00 2001 From: Henrik Friedrichsen Date: Sat, 20 Apr 2019 14:49:44 +0200 Subject: [PATCH] update bindings, indicate that saving a queue can overwrite playlist closes #60 --- README.md | 7 +++---- src/authentication.rs | 11 +++++++++-- src/ui/queue.rs | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3623a31..3fea5e3 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,6 @@ future. Contributions welcome, but please be kind ;) ## Usage * Build using `cargo build --release` -* The initial screen is the debug log. Press `F1` for the queue and `F2` to - search for a track. More key bindings are described below. * For debugging, pass a debug log filename, e.g. `ncspot -d debug.log` ### Key Bindings @@ -40,11 +38,12 @@ have them configurable. * `F1`: Queue * `c` clears the entire queue * `d` deletes the currently selected track - * `s` opens a dialog to save the queue to a playlist + * `Ctrl-s` opens a dialog to save the queue to a playlist * `F2`: Search - * `F3`: Playlists + * `F3`: Library * `d` deletes the currently selected playlist * Tracks and playlists can be played using `Return` and queued using `Space` +* `s` will save or remove the currently selected track to your library * `Shift-p` toggles playback of a track * `Shift-s` stops a track * `Shift-r` updates the playlist cache diff --git a/src/authentication.rs b/src/authentication.rs index 0d64355..4e44ece 100644 --- a/src/authentication.rs +++ b/src/authentication.rs @@ -1,5 +1,6 @@ use std::path::Path; +use cursive::traits::Boxable; use cursive::view::Identifiable; use cursive::views::*; use cursive::{CbSink, Cursive}; @@ -20,10 +21,16 @@ pub fn create_credentials(path: &Path) -> Result { .title("Spotify login") .content( ListView::new() - .child("Username", EditView::new().with_id("spotify_user")) + .child( + "Username", + EditView::new().with_id("spotify_user").fixed_width(18), + ) .child( "Password", - EditView::new().secret().with_id("spotify_password"), + EditView::new() + .secret() + .with_id("spotify_password") + .fixed_width(18), ), ) .button("Login", |s| { diff --git a/src/ui/queue.rs b/src/ui/queue.rs index 416b02e..78b6873 100644 --- a/src/ui/queue.rs +++ b/src/ui/queue.rs @@ -75,7 +75,7 @@ impl QueueView { }); let dialog = Dialog::new() - .title("Save to existing or new playlist?") + .title("Create new or overwrite existing playlist?") .dismiss_button("Cancel") .padding((1, 1, 1, 0)) .content(ScrollView::new(list_select));