Compare commits
No commits in common. "master" and "v0.3.1" have entirely different histories.
@ -6,6 +6,7 @@ pipeline:
|
|||||||
build:
|
build:
|
||||||
image: node:16
|
image: node:16
|
||||||
commands:
|
commands:
|
||||||
|
- apt update && apt install -y ruby ruby-dev && gem install sass
|
||||||
- npm install
|
- npm install
|
||||||
- npm run grunt
|
- npm run grunt
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
// Project configuration.
|
// Project configuration.
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
'dart-sass': {
|
sass: {
|
||||||
dist: {
|
dist: {
|
||||||
options: {
|
options: {
|
||||||
style: 'compressed'
|
style: 'compressed'
|
||||||
@ -69,7 +69,7 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
files: ['assets/sass/*.sass'],
|
files: ['assets/sass/*.sass'],
|
||||||
tasks: ['dart-sass'],
|
tasks: ['sass'],
|
||||||
options: {
|
options: {
|
||||||
atBegin: true,
|
atBegin: true,
|
||||||
spawn: false
|
spawn: false
|
||||||
@ -96,12 +96,12 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
// Load task plugins
|
// Load task plugins
|
||||||
grunt.loadNpmTasks('grunt-twig-render');
|
grunt.loadNpmTasks('grunt-twig-render');
|
||||||
grunt.loadNpmTasks('grunt-dart-sass');
|
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||||
grunt.loadNpmTasks('grunt-contrib-coffee');
|
grunt.loadNpmTasks('grunt-contrib-coffee');
|
||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
|
|
||||||
// Default task(s).
|
// Default task(s).
|
||||||
grunt.registerTask('default', ['twigRender', 'dart-sass', 'coffee', 'copy']);
|
grunt.registerTask('default', ['twigRender', 'sass', 'coffee', 'copy']);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,16 +1,3 @@
|
|||||||
shell = require('electron').shell
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () ->
|
|
||||||
links = document.querySelectorAll('a[href^="http"]')
|
|
||||||
i = 0
|
|
||||||
while i < links.length
|
|
||||||
links[i].addEventListener('click', (event) ->
|
|
||||||
event.preventDefault()
|
|
||||||
shell.openExternal(this.href)
|
|
||||||
)
|
|
||||||
i++
|
|
||||||
)
|
|
||||||
|
|
||||||
@openTab = (tab) ->
|
@openTab = (tab) ->
|
||||||
# show the component info that's selected
|
# show the component info that's selected
|
||||||
tabs = document.querySelectorAll('.tab-button')
|
tabs = document.querySelectorAll('.tab-button')
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
$tab-bar-height: 50px
|
$tab-bar-height: 50px
|
||||||
|
|
||||||
$primary-color: #009688
|
|
||||||
$primary-color-light: lighten($primary-color, 10%)
|
|
||||||
$primary-color-dark: darken($primary-color, 10%)
|
|
||||||
|
|
||||||
$default-transition: all 230ms ease-in-out
|
|
||||||
|
|
||||||
body
|
body
|
||||||
margin: 0
|
margin: 0
|
||||||
padding: $tab-bar-height 0 90px
|
padding: $tab-bar-height 0 90px
|
||||||
@ -13,20 +7,20 @@ body
|
|||||||
font-size: 18px
|
font-size: 18px
|
||||||
|
|
||||||
a
|
a
|
||||||
color: $primary-color
|
color: cornflowerblue
|
||||||
transition: $default-transition
|
transition: all 200ms ease-in-out
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
color: $primary-color-light
|
color: darken(cornflowerblue, 10%)
|
||||||
|
|
||||||
input
|
input
|
||||||
transition: $default-transition
|
transition: all 200ms ease-in-out
|
||||||
|
|
||||||
input[type=submit],
|
input[type=submit],
|
||||||
button
|
button
|
||||||
background-color: cornflowerblue
|
background-color: cornflowerblue
|
||||||
color: #f0f0f0
|
color: #f0f0f0
|
||||||
transition: $default-transition
|
transition: all 200ms ease-in-out
|
||||||
|
|
||||||
&:hover
|
&:hover
|
||||||
background-color: darken(cornflowerblue, 10%)
|
background-color: darken(cornflowerblue, 10%)
|
||||||
@ -42,7 +36,6 @@ button
|
|||||||
max-width: 1024px
|
max-width: 1024px
|
||||||
|
|
||||||
.container.fluid
|
.container.fluid
|
||||||
width: 100%
|
|
||||||
max-width: 100%
|
max-width: 100%
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
||||||
@ -62,10 +55,6 @@ button
|
|||||||
border-bottom: 1px solid #bbb
|
border-bottom: 1px solid #bbb
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .25)
|
box-shadow: 0 1px 2px rgba(0, 0, 0, .25)
|
||||||
|
|
||||||
.container.fluid
|
|
||||||
width: 100%
|
|
||||||
margin-right: 0
|
|
||||||
|
|
||||||
.row
|
.row
|
||||||
display: relative
|
display: relative
|
||||||
|
|
||||||
@ -80,10 +69,9 @@ button
|
|||||||
color: #212121
|
color: #212121
|
||||||
font-size: 2rem
|
font-size: 2rem
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
transition: $default-transition
|
transition: all 230ms ease-in-out
|
||||||
|
|
||||||
&.active,
|
&.active
|
||||||
&:hover
|
|
||||||
background-color: white
|
background-color: white
|
||||||
|
|
||||||
.component-display
|
.component-display
|
||||||
@ -154,9 +142,6 @@ table.hardware-info
|
|||||||
p.no-margin
|
p.no-margin
|
||||||
margin-bottom: 0
|
margin-bottom: 0
|
||||||
|
|
||||||
p#version-info
|
|
||||||
text-decoration: underline
|
|
||||||
|
|
||||||
#systemPages
|
#systemPages
|
||||||
> div:nth-child(2n + 3)
|
> div:nth-child(2n + 3)
|
||||||
margin-left: 0
|
margin-left: 0
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
||||||
<title>About Sentry</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<p>This is a test.</p>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -19,8 +19,7 @@
|
|||||||
<div class="container fluid">
|
<div class="container fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns twelve">
|
<div class="columns twelve">
|
||||||
<button class="tab-button active" onclick="openTab('overview')">Overview</button>
|
<button class="tab-button active" onclick="openTab('cpu')">CPU</button>
|
||||||
<button class="tab-button" onclick="openTab('cpu')">CPU</button>
|
|
||||||
<button class="tab-button" onclick="openTab('memory')">Memory</button>
|
<button class="tab-button" onclick="openTab('memory')">Memory</button>
|
||||||
<button class="tab-button" onclick="openTab('storage')">Storage</button>
|
<button class="tab-button" onclick="openTab('storage')">Storage</button>
|
||||||
<button class="tab-button" onclick="openTab('gpu')">GPU</button>
|
<button class="tab-button" onclick="openTab('gpu')">GPU</button>
|
||||||
@ -30,10 +29,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="wrapper" class="container">
|
<div id="wrapper" class="container">
|
||||||
<div class="component-display active" data-component="overview">
|
<div class="component-display active" data-component="cpu">
|
||||||
{% include 'overview.twig' %}
|
|
||||||
</div>
|
|
||||||
<div class="component-display" data-component="cpu">
|
|
||||||
{% include 'cpu.twig' %}
|
{% include 'cpu.twig' %}
|
||||||
</div>
|
</div>
|
||||||
<div class="component-display" data-component="memory">
|
<div class="component-display" data-component="memory">
|
||||||
@ -51,7 +47,7 @@
|
|||||||
<div class="container fluid">
|
<div class="container fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="columns three">
|
<div class="columns three">
|
||||||
<p id="version-info" class="no-margin u-text-center">Sentry v<span id="app-version"></span></p>
|
<p class="faded-text no-margin u-text-center">Sentry v<span id="app-version"></span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns six">
|
<div class="columns six">
|
||||||
<p class="no-margin u-text-center">Developed by Bit Goblin free of charge.</p>
|
<p class="no-margin u-text-center">Developed by Bit Goblin free of charge.</p>
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
<header class="row">
|
|
||||||
<div class="columns twelve u-text-center">
|
|
||||||
<h1>Sentry Overview</h1>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
8
main.js
8
main.js
@ -1,5 +1,5 @@
|
|||||||
// Modules to control application life and create native browser window
|
// Modules to control application life and create native browser window
|
||||||
const { app, BrowserWindow, Menu } = require('electron');
|
const {app, BrowserWindow} = require('electron');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
function createWindow () {
|
function createWindow () {
|
||||||
@ -7,8 +7,6 @@ function createWindow () {
|
|||||||
const mainWindow = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 700,
|
height: 700,
|
||||||
minWidth: 735,
|
|
||||||
minHeight: 600,
|
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
contextIsolation: false,
|
contextIsolation: false,
|
||||||
@ -23,10 +21,6 @@ function createWindow () {
|
|||||||
// mainWindow.webContents.openDevTools()
|
// mainWindow.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the application menu
|
|
||||||
const menu = require('./src/menu').createMenu(app);
|
|
||||||
Menu.setApplicationMenu(menu);
|
|
||||||
|
|
||||||
// This method will be called when Electron has finished
|
// This method will be called when Electron has finished
|
||||||
// initialization and is ready to create browser windows.
|
// initialization and is ready to create browser windows.
|
||||||
// Some APIs can only be used after this event occurs.
|
// Some APIs can only be used after this event occurs.
|
||||||
|
709
package-lock.json
generated
709
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sentry",
|
"name": "sentry",
|
||||||
"version": "0.3.3",
|
"version": "0.3.1",
|
||||||
"description": "Desktop app to view system information and sensors",
|
"description": "Desktop app to view system information and sensors",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -25,12 +25,12 @@
|
|||||||
"grunt": "^1.5.3",
|
"grunt": "^1.5.3",
|
||||||
"grunt-contrib-coffee": "^2.1.0",
|
"grunt-contrib-coffee": "^2.1.0",
|
||||||
"grunt-contrib-copy": "^1.0.0",
|
"grunt-contrib-copy": "^1.0.0",
|
||||||
|
"grunt-contrib-sass": "^2.0.0",
|
||||||
"grunt-contrib-watch": "^1.1.0",
|
"grunt-contrib-watch": "^1.1.0",
|
||||||
"grunt-dart-sass": "^2.0.1",
|
|
||||||
"grunt-twig-render": "^1.8.3"
|
"grunt-twig-render": "^1.8.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"systeminformation": "^5.17.12"
|
"systeminformation": "^5.11.15"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"appId": "tech.bitgoblin.sentry",
|
"appId": "tech.bitgoblin.sentry",
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
const { BrowserWindow } = require('electron');
|
|
||||||
|
|
||||||
exports.about = function() {
|
|
||||||
const aboutWindow = new BrowserWindow({
|
|
||||||
width: 600,
|
|
||||||
height: 400,
|
|
||||||
webPreferences: {
|
|
||||||
nodeIntegration: true,
|
|
||||||
contextIsolation: false
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// and load the about.html of the app.
|
|
||||||
aboutWindow.loadFile('public/about.html');
|
|
||||||
};
|
|
@ -1,30 +0,0 @@
|
|||||||
const electron = require('electron');
|
|
||||||
|
|
||||||
// load event handlers
|
|
||||||
const helpHandlers = require('./help');
|
|
||||||
|
|
||||||
exports.createMenu = function(app) {
|
|
||||||
return electron.Menu.buildFromTemplate([
|
|
||||||
{
|
|
||||||
label: 'File',
|
|
||||||
submenu: [
|
|
||||||
{
|
|
||||||
label: 'Close',
|
|
||||||
click: function() {
|
|
||||||
app.quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
label: 'Help',
|
|
||||||
submenu: [
|
|
||||||
{
|
|
||||||
label: 'About',
|
|
||||||
click: helpHandlers.about
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user