Comparing version 1.0.12 to 1.0.13
{ | ||
"name": "commode", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Electron-Vue based, iTunes like UI, for file tagging, restructuring, processing, and general management.", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -5,2 +5,3 @@ # commode | ||
![](screenshot.png) | ||
![](screenshot-0.png) | ||
![](screenshot-1.png) | ||
@@ -7,0 +8,0 @@ ![](screenshot-2.png) |
const path = require('path'); | ||
const byKey = require('natural-sort-by-key'); | ||
const EventEmitter = require('events'); | ||
class MyEmitter extends EventEmitter {} | ||
const myEmitter = new MyEmitter(); | ||
new Vue({ | ||
@@ -13,5 +21,10 @@ el: '#primary', | ||
sorter: null, | ||
status: null, | ||
selectedItem: null, | ||
selectedAction: null, | ||
filters: [], | ||
sorters: [], | ||
actions: [], | ||
@@ -61,2 +74,10 @@ opened:{}, | ||
selectItem: function (e) { | ||
myEmitter.emit('status', `${e.name}`) | ||
this.selectedItem = e; | ||
}, | ||
selectAction: function (e) { | ||
myEmitter.emit('status', `Selecte ${e.name} Action, press play to apply it to the items below...`) | ||
this.selectedAction = e; | ||
}, | ||
@@ -78,2 +99,3 @@ | ||
this.title = e.name; | ||
myEmitter.emit('status', `Viewing ${this.title}`) | ||
}, | ||
@@ -84,2 +106,4 @@ | ||
this.filter = i => true; | ||
myEmitter.emit('status', `Viewing ${this.title}`) | ||
}, | ||
@@ -89,5 +113,9 @@ | ||
myEmitter.on('status', message => { | ||
this.status = message; | ||
}); | ||
let dir = path.resolve('./sample-database'); | ||
require(path.join(dir,'action.js')).forEach( i => this.actions.push(i) ); | ||
require(path.join(dir,'sort.js')).forEach( i => this.sorters.push(i) ); | ||
@@ -98,2 +126,3 @@ require(path.join(dir,'filter.js')).forEach( i => this.filters.push(i) ); | ||
myEmitter.emit('status', 'System Ready...') | ||
}, | ||
@@ -100,0 +129,0 @@ } |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
382621
15
224
19
4