Merge pull request #31 from JsSucks/ui

Merge
This commit is contained in:
Alexei Stukov 2018-01-21 11:25:23 +02:00 committed by GitHub
commit 7add5afc30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -11,7 +11,7 @@
'use strict';
const styles = require('./styles/index.scss');
const { Global, Logger, Utils, PluginManager, BDIpc, WebpackModules, SocketProxy, Events, CssEditor } = require('./modules');
const { Global, Logger, Utils, PluginManager, BDIpc, WebpackModules, SocketProxy, Events } = require('./modules');
//const { UI } = require('./modules/ui/index.jsx');
class BetterDiscord {
@ -19,7 +19,6 @@ class BetterDiscord {
constructor() {
window.bdUtils = Utils;
window.wpm = WebpackModules;
window.cssEditor = CssEditor;
Events.on('global-ready', e => {
const { UI } = require('./modules/ui/vueui.js');
this.ui = new UI();

View File

@ -1,6 +1,7 @@
<template src="./templates/BdSettings.html"></template>
<script>
const { CssEditor } = require('../../../');
/*Imports*/
import { SidebarView, Sidebar, SidebarItem, ContentColumn } from './sidebar';
import { CoreSettings, UISettings, EmoteSettings, PluginsView } from './bd';
@ -20,6 +21,10 @@
/*Methods*/
function itemOnClick(id) {
if (id === 3) {
CssEditor.show();
return;
}
if (this.animating || id === this.activeIndex) return;
if (this.activeIndex >= 0) this.sidebarItems.find(item => item.id === this.activeIndex).active = false;
this.sidebarItems.find(item => item.id === id).active = true;