Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
add7b06b
Commit
add7b06b
authored
Sep 04, 2017
by
serapath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ADD keeping track of all active filters
parent
51fb91ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
terminal.js
src/app/panels/terminal.js
+22
-18
No files found.
src/app/panels/terminal.js
View file @
add7b06b
...
...
@@ -426,31 +426,35 @@ class Terminal {
}
}
updateJournal
(
filterEvent
)
{
// @TODO: updates `self.data.activeFilters: { commands: {}, input: '' }`
var
self
=
this
var
value
=
filterEvent
.
value
if
(
filterEvent
.
type
===
'select'
)
{
console
.
log
(
value
)
self
.
data
.
activeFilters
.
commands
[
value
]
=
true
// @TODO: add all items with `value === item.cmd`
}
else
if
(
filterEvent
.
type
===
'deselect'
)
{
console
.
log
(
value
)
self
.
data
.
activeFilters
.
commands
[
value
]
=
false
// @TODO: remove all items with `value === item.cmd`
}
else
if
(
filterEvent
.
type
===
'search'
)
{
console
.
log
(
value
)
self
.
data
.
activeFilters
.
input
=
value
// @TODO: filter all active items with not `match(value, item.args)`
// @TODO: implement a `match(query, args)` function
// make use of:
// self._INDEX.all[item.gidx]
// self._INDEX.allMain
// self._INDEX.commands
// self._INDEX.commandsMain
}
}
_keep
(
item
)
{
// @TODO: checks `self.data.activeFilters: { commands: {}, input: '' }`
// @TODO: return false (if item is currently filtered out / irrelevant
// according to `self.data.activeFilters`
// self._INDEX.all[item.gidx]
//
// self._INDEX.allMain
// self._INDEX.commands
// self._INDEX.commandsMain
//
// if ()
// self.updateJournal(
// _INDEX
//
return
true
// false
var
self
=
this
if
(
self
.
data
.
activeFilters
.
commands
[
item
.
root
.
cmd
])
{
var
query
=
self
.
data
.
activeFilters
.
input
// @TODO: filter item if not `match(value, item.args)`
// @TODO: implement a `match(query, args)` function
if
(
item
.
args
===
query
)
return
true
}
}
_appendItem
(
item
)
{
var
self
=
this
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment