« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/ui.js
AgeCommit message (Collapse)Author
2018-12-23Show "unnamed" in "this group:" (and its menu)Florrie
2018-12-22Use cleaner tui-lib require syntaxFlorrie
2018-12-21Fix "this group" listing item causing a crashFlorrie
Somebody remind me to write unit tests...
2018-12-21Make cursor follow selection in queue listingFlorrie
This was already half-done, but the new behavior in this commit feels quite a bit nicer. (Specifically if you use shift-up/down (or n/p) while the queue is selected, the cursor will move to the new selection if it was already on the old selection, whereas before it would never follow when the queue was selected.)
2018-12-21Remove dead codeFlorrie
2018-12-21Move menu behavior out of grouplike item elementsFlorrie
This also makes it so that the selected options in whereControl and orderControl stay the same when you open the context menu on a different item, browse a different group, etc.
2018-12-21"Distribute" optionsFlorrie
E.g. to interweave two groups together.
2018-12-19Revive the old shuffle-groups feature!Florrie
Cool! This was one of my favorite tiny features of http-music.
2018-12-19Make a neater neato nice context menu!Florrie
Not a lot of new potential utility here for now, but it's at the least easier to use and cleaner than the old look! Also.. shuffle-groups soon(TM). Maybe!
2018-12-15Label showing # of items / total items in menuFlorrie
2018-12-15Expand width of ContextMenu items to all be equalFlorrie
2018-12-15Add "this group" option to grouplike listingsFlorrie
Used to access a menu for the playlist that's currently being browsed. Particularly handy for working with the top-level group, since you can't access its menu any other way. Also useful for quickly acting on a group you opened from (for example) a PathElement.
2018-12-15Get rid of unnecessary map() callFlorrie
This doesn't impact performance noticeably, it's just a code nitpick.
2018-12-15Fix remove-from-queue performanceFlorrie
2018-12-08Mouse controls over playback info elementFlorrie
Scroll up/down to seek, click to toggle pause.
2018-12-08Mouse supportFlorrie
'Cuz hey, why not?
2018-12-05Support AnimeFlorrie
2018-11-23Hide context menu when it's unselectedFlorrie
2018-11-23(f) to open menu as well as (m)Florrie
This way you can activate the menu without taking your right hand off the arrow keys (in typical keyboards).
2018-11-12Fix many menu items being missingFlorrie
Oops! I got rid of (well, tweaked) the concepts of "real" and "fake" rows, but forgot to get rid of the now-unnecessary (and disfunctional) isReal checks.
2018-11-11Fix bad comment text from previous commitFlorrie
2018-11-11Clean up and debuggify "fake" listing elementsFlorrie
I.e, the "Up (to group)" button and the "(This group is empty)" pseudo-playlist-item.
2018-10-11Don't bubble escape when it doesn't make senseFlorrie
Specifically, don't bubble escape when it's pressed in ContextMenus or in ListingJumpElements. TL;DR you won't accidentally cancel your currently playing song as much.
2018-10-11Don't queue groups in the wrong order!Florrie
2018-10-11Play up next group containing current track nicelyFlorrie
2018-09-17Allow shift-down/n to auto-queue next trackFlorrie
See #1. Also fixed a bug where shift-up/p wouldn't queue a track at the top of the queue when the top was selected.
2018-09-16Disable automagic track queueing, for now (see #1)Florrie
2018-09-15Don't crash when passing playlistsFlorrie
This happened when the openPlaylistDialog was closed before being opened - Dialog.close would try to select(this.oldSelectedElement), but of course that would be undefined since the dialog had never been opened in the first place.
2018-09-14Fix tab navigating to jump-to elementFlorrie
It's not supposed to do that. (It's supposed to swap between the path element and the listing itself.)
2018-09-13Show preview of "Jump to" resultFlorrie
Also let the user cancel (esc) the "jump to" to restore the selected index to wherever it was before. A neat thing you can do with this: Your cursor will automatically move to whatever the matched result of your query is while typing. If nothing is found, your cursor will stay where it was the last time it found something: so, if you press enter to confirm, AFTER you've queried something but WHILE your query doesn't currently mathc anything, it'll keep the cursor at whatever was most recently matched. So basically, Ctrl-F'ing "excir" will match "Excursions", since "exc" will have matched it already.
2018-09-13Show which item in a listing is selected, even if the listing isn't selectedFlorrie
This is foundation for actively highlighting the result of a jump-to while typing. (Since your focus is on the ListingJumpElement, there needs to be some way to see which item would be selected in the GrouplikeListing. That's what this commit implements.) This also looks pretty nifty when you press M to open the context menu, if I do say so myself.
2018-09-12ctrl-F, '/': jump to an item by entering its nameFlorrie
2018-08-23Refine how path elements are displayedFlorrie
Path elements were and are horizontal scroll forms composed of path item elements. Previously they were separated like this (each "(x)" is a different path item element): (My ~/Music Library >) (C418 >) (72 Minutes Of Fame >) (03 Alive) Now they're separated like this: (In: My ~/Music Libary) (> C418) (> 72 Minutes Of Fame) There are two changes here: * The last item, i.e. the selected item itself, is no longer a part of the path display. In practice this wasn't actually a very useful button, and now the path element is more useful in how it was designed to be used: as a way to jump to the group which a selected track is in. (This is emphasized by the new "In:" label at the start of the first path element.) * The "arrow label" part of the element is now placed on the left of the element instead of the right. Before, all but the last item had a ">" in their arrow label; now, all but the first do. (The first item has the text "In:" instead.) This is so that it's clear when the path element has been scrolled to the right and the first/leftmost items are cut off; if any are cut off, the first visible element will start with ">" instead of "In:".
2018-08-20'Remove from queue' menu optionFlorrie
2018-08-15Fix tab not working in a particular caseFlorrie
The repro: 1. Press tab to select the path element. 2. Press 2 (or 1) to switch to a different grouplike listing. 3. Press 1 (or 2) to switch back. Note that the root.select()'ed element is the grouplike listing's form, i.e. the list of tracks/groups, not the path element. 4. Press tab. Note that the root.select()'ed element does not change. This fixes the issue by setting curIndex to 0, which is the index of the grouplike listing's form. This makes the tab key behave correctly and select the path element in step 4.
2018-08-15Fix path element not working in queue listingFlorrie
2018-08-15Make tab switch between path element and listing, not between listingsFlorrie
Do note the big fat comment. I'm actually pretty happy with this commit. I think there's a fair chance that this is the right behavior, and it simplifies a fair amount of code, e.g. getting rid of manually setting curIndex on this.form and restoring selection after Dialog.close() (that's handled by tui-lib now). It also discards the "hack" I had to do to make the AppElement form capture keyboard input in the first place. (I had to use addChild with the container paneLeft/paneRight elements so that keyboard input on their children, which are the inputs of the AppElement form, could be captured.)
2018-08-15Fix tabber altogether disappearingFlorrie
This basically reverts 2fe1efa0 (and I think one related commit).
2018-08-04Fix playback info not being formated correctlyFlorrie
2018-08-04Fix queue scrollbar not showing up right awayFlorrie
2018-08-03Paste into empty groupFlorrie
2018-08-03Don't show menu if it doesn't contain any itemsFlorrie
2018-08-03Don't crash when an empty group is playedFlorrie
2018-08-03Move Paste into menuFlorrie
2018-08-03Move Mark into menuFlorrie
2018-07-30Clean up remove event codeFlorrie
2018-07-30Clean up space-to-pause codeFlorrie
2018-07-30Clean up select codeFlorrie
2018-07-30More code cleanupFlorrie
2018-07-30Really, really clean up queue event codeFlorrie