Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Work on the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
UniBen committed Jan 14, 2020
1 parent f4b5e8e commit ff98e93
Show file tree
Hide file tree
Showing 9 changed files with 58,760 additions and 272 deletions.
16 changes: 16 additions & 0 deletions gulpfile.js
@@ -0,0 +1,16 @@
const gulp = require('gulp');

gulp.task('css', () => {
const postcss = require('gulp-postcss');

return gulp.src('resources/css/app.css')
.pipe(postcss([
require('tailwindcss')('./tailwind.config.js'),
require('autoprefixer'),
]))
.pipe(gulp.dest('webroot/css'))
});

gulp.task('watch', () => {
gulp.watch('resources/**/*.css', gulp.parallel(['css']));
});
86 changes: 46 additions & 40 deletions index.js
@@ -1,5 +1,8 @@
// Auto reloading
require('electron-reload')(__dirname);

const {app, BrowserWindow, ipcMain} = require("electron");
const dbus = new (require("./dbus.js"))();
// const dbus = new (require("./dbus.js"))();

process.title = "streamdeck-editor";

Expand All @@ -10,12 +13,15 @@ function createWindow () {
mainWindow = new BrowserWindow({
width: 1280,
height: 720,
frame: true,
transparent: true,
// titleBarStyle: 'hidden',
webPreferences: {
nodeIntegration: true
}
});

mainWindow.setMenu(null);
// mainWindow.setMenu(null);

mainWindow.loadFile("./webroot/index.html");

Expand All @@ -37,41 +43,41 @@ app.on('activate', function () {
});


ipcMain.on("get-deck-info", (event) => {
dbus.getDeckInfo((info) => {
event.reply("deck-info", info);
});
dbus.listenToPage(page => {
event.reply("page-updated", page);
});
});

ipcMain.on('get-config', (event) => {
dbus.getConfig((config) => {
event.reply("config", config);
})
});

ipcMain.on('set-config', (event, arg) => {
dbus.setConfig(arg, (status) => {
event.reply("status", status);
})
});

ipcMain.on("reload", (event) => {
dbus.reload((status) => {
event.reply("reload", status);
})
});

ipcMain.on("set-page", (event, arg) => {
dbus.setPage(arg, status => {
event.reply("page-set", status);
})
});

ipcMain.on("commit-config", (event, arg) => {
dbus.commitConfig(status => {
event.reply("config-committed", status);
})
});
// ipcMain.on("get-deck-info", (event) => {
// dbus.getDeckInfo((info) => {
// event.reply("deck-info", info);
// });
// dbus.listenToPage(page => {
// event.reply("page-updated", page);
// });
// });
//
// ipcMain.on('get-config', (event) => {
// dbus.getConfig((config) => {
// event.reply("config", config);
// })
// });
//
// ipcMain.on('set-config', (event, arg) => {
// dbus.setConfig(arg, (status) => {
// event.reply("status", status);
// })
// });
//
// ipcMain.on("reload", (event) => {
// dbus.reload((status) => {
// event.reply("reload", status);
// })
// });
//
// ipcMain.on("set-page", (event, arg) => {
// dbus.setPage(arg, status => {
// event.reply("page-set", status);
// })
// });
//
// ipcMain.on("commit-config", (event, arg) => {
// dbus.commitConfig(status => {
// event.reply("config-committed", status);
// })
// });

0 comments on commit ff98e93

Please sign in to comment.