38 lines
886 B
JavaScript
38 lines
886 B
JavaScript
|
import PostIndex from './PostIndex';
|
||
|
|
||
|
export default class DashManager {
|
||
|
//--------------------------
|
||
|
// constructor
|
||
|
//--------------------------
|
||
|
constructor() {
|
||
|
this.currentDisplay = '';
|
||
|
this.urlPieces = document.URL.split("/");
|
||
|
this.chooseDisplay(this.urlPieces[5], this.urlPieces[6]);
|
||
|
}
|
||
|
//--------------------------
|
||
|
// methods
|
||
|
//--------------------------
|
||
|
start() {
|
||
|
let self = this;
|
||
|
|
||
|
}
|
||
|
|
||
|
chooseDisplay(section, page) {
|
||
|
this.currentDisplay = '';
|
||
|
switch (section) {
|
||
|
case 'posts':
|
||
|
this.currentDisplay = new PostIndex(page);
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
// just chill
|
||
|
break;
|
||
|
}
|
||
|
this.start();
|
||
|
|
||
|
}
|
||
|
//--------------------------
|
||
|
// event handlers
|
||
|
//--------------------------
|
||
|
|
||
|
}
|