-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bump player dependency, refactor components to separate view from logic
- Loading branch information
Showing
22 changed files
with
214 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env node | ||
|
||
var intel = require('intel'); | ||
intel.addHandler(new intel.handlers.File(process.env.HOME + '/.badtaste-npm-lab.log')); | ||
global.Logger = intel; | ||
|
||
require('babel/register')(); | ||
require('./test/lab'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import blessed from 'blessed'; | ||
|
||
export const Layout = screen => blessed.box({ | ||
parent: screen, | ||
top: 'center', | ||
left: 'center', | ||
width: '90%', | ||
height: '90%', | ||
tags: true, | ||
border: { | ||
type: 'line' | ||
} | ||
}); | ||
|
||
export const FileManager = () => blessed.filemanager({ | ||
border: 'line', | ||
style: { | ||
selected: { | ||
bg: 'blue' | ||
} | ||
}, | ||
height: '100%-3', | ||
label: ' {blue-fg}%path{/blue-fg} ', | ||
cwd: process.env.HOME, | ||
keys: true, | ||
vi: true, | ||
scrollbar: { | ||
bg: 'white', | ||
ch: ' ' | ||
} | ||
}); | ||
|
||
export const Text = () => blessed.text({ | ||
content: 'Press "s" to play directory', | ||
top: '100%-3', | ||
align: 'middle' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import blessed from 'blessed'; | ||
|
||
export const HelpBox = screen => blessed.message({ | ||
parent: screen, | ||
border: 'line', | ||
height: 'shrink', | ||
width: 'half', | ||
top: 'center', | ||
left: 'center', | ||
label: ' {blue-fg}Help{/blue-fg}', | ||
tags: true, | ||
keys: true, | ||
hidden: true, | ||
vi: true | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import blessed from 'blessed'; | ||
|
||
export default (parent, params) => blessed.line({ | ||
...params, | ||
parent: parent, | ||
type: 'line', | ||
orientation: 'horizontal', | ||
top: 0, | ||
style: { | ||
fg: 'green' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import blessed from 'blessed'; | ||
|
||
const basicList = { | ||
top: 1, | ||
bottom: 1, | ||
tags: true, | ||
padding: { | ||
left: 1, | ||
right: 1 | ||
}, | ||
input: true, | ||
scrollable: true, | ||
keys: true, | ||
vi: true, | ||
mouse: true, | ||
alwaysScroll: true, | ||
scrollbar: { | ||
ch: ' ', | ||
inverse: true, | ||
fg: 'red' | ||
}, | ||
style: { | ||
selected: { | ||
fg: 'grey', | ||
bg: 'white' | ||
} | ||
} | ||
}; | ||
|
||
export const LeftPane = parent => blessed.list({ | ||
...basicList, | ||
parent: parent, | ||
left: 0, | ||
width: '30%', | ||
items: ['Loading'] | ||
}); | ||
|
||
export const RightPane = parent => blessed.list({ | ||
...basicList, | ||
parent: parent, | ||
left: '30%', | ||
width: '70%', | ||
items: ['{bold}Loading{/bold}, please wait'] | ||
}); | ||
|
||
export const SelectList = () => blessed.list({ | ||
...basicList, | ||
top: 'center', | ||
left: 'center', | ||
width: '50%', | ||
height: '50%', | ||
border: { | ||
type: 'line' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import blessed from 'blessed'; | ||
|
||
export const Layout = screen => blessed.box({ | ||
parent: screen, | ||
top: 'center', | ||
left: 'center', | ||
width: '50%', | ||
height: '50%', | ||
tags: true, | ||
border: { | ||
type: 'line' | ||
} | ||
}); | ||
|
||
export const TextArea = () => blessed.textarea({ | ||
inputOnFocus: true, | ||
style: { | ||
bg: 'black' | ||
}, | ||
keys: true, | ||
height: '100%-6' | ||
}); | ||
|
||
export const Text = () => blessed.text({ | ||
content: 'Paste tracklist, press esc.\nUnfortunately there is large input lag before text is actually pasted in form, don\'t close it', | ||
top: '100%-6', | ||
align: 'middle' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.