Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jacobmichels/Boosted
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1.0
Choose a base ref
...
head repository: jacobmichels/Boosted
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Apr 27, 2020

  1. Copy the full SHA
    2a5ecc3 View commit details

Commits on Apr 29, 2020

  1. Copy the full SHA
    1c8331c View commit details

Commits on May 1, 2020

  1. Copy the full SHA
    e25375e View commit details
  2. Bump jquery from 3.4.1 to 3.5.0 in /electron

    Bumps [jquery](https://github.com/jquery/jquery) from 3.4.1 to 3.5.0.
    - [Release notes](https://github.com/jquery/jquery/releases)
    - [Commits](jquery/jquery@3.4.1...3.5.0)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored May 1, 2020
    Copy the full SHA
    59923b3 View commit details
  3. Merge pull request #3 from jacobmichels/dependabot/npm_and_yarn/elect…

    …ron/jquery-3.5.0
    
    Bump jquery from 3.4.1 to 3.5.0 in /electron
    jacobmichels authored May 1, 2020
    Copy the full SHA
    999c9d5 View commit details
  4. Copy the full SHA
    2819922 View commit details
  5. Copy the full SHA
    9442b06 View commit details

Commits on May 2, 2020

  1. Copy the full SHA
    faaa7af View commit details
  2. Copy the full SHA
    bc27eb6 View commit details

Commits on May 4, 2020

  1. Copy the full SHA
    1c720d5 View commit details
  2. Copy the full SHA
    82b6139 View commit details
  3. removed debug alert

    jacobmichels committed May 4, 2020
    Copy the full SHA
    7281d71 View commit details
  4. Copy the full SHA
    15ed15b View commit details
  5. Copy the full SHA
    0612484 View commit details
  6. changed wording

    jacobmichels committed May 4, 2020
    Copy the full SHA
    b493598 View commit details
  7. updated version number

    jacobmichels committed May 4, 2020
    Copy the full SHA
    a43327f View commit details

Commits on Jun 20, 2020

  1. builds with asar:true

    jacobmichels committed Jun 20, 2020
    Copy the full SHA
    9849793 View commit details
  2. Copy the full SHA
    c2e9329 View commit details
  3. Copy the full SHA
    331793d View commit details
  4. Update README.md

    jacobmichels authored Jun 20, 2020
    Copy the full SHA
    b7e4f75 View commit details

Commits on Jul 2, 2020

  1. added tray icon

    jacobmichels committed Jul 2, 2020
    Copy the full SHA
    4173892 View commit details
  2. change version number

    jacobmichels committed Jul 2, 2020
    Copy the full SHA
    a9f16c2 View commit details
  3. Copy the full SHA
    afc4cbc View commit details
  4. minor visual changes

    jacobmichels committed Jul 2, 2020
    Copy the full SHA
    30c3cf9 View commit details
  5. version number

    jacobmichels committed Jul 2, 2020
    Copy the full SHA
    067a4ec View commit details
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# boosted

Simple program that will (eventually) send a notification to your phone through the app Pushed to let you know your league game is ready.
Simple program that will send a notification to your phone through the app Pushed to let you know your league game is ready.
18 changes: 9 additions & 9 deletions electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "boosted-app",
"productName": "boosted-app",
"version": "1.1.0",
"version": "1.2.3",
"description": "League Queue notifications",
"main": "src/index.js",
"scripts": {
@@ -23,7 +23,7 @@
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {},
"packagerConfig": {"asar":true},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
@@ -61,13 +61,13 @@
}
},
"dependencies": {
"bootstrap": "^4.4.1",
"custom-electron-titlebar": "^3.2.2-hotfix62",
"edit-json-file": "^1.4.0",
"electron-squirrel-startup": "^1.0.0",
"jquery": "^3.4.1",
"jquery": "^3.5.0",
"js-base64": "^2.5.2",
"lcu-connector": "^2.1.3",
"materialize-css": "^1.0.0-rc.2",
"postman-request": "^2.88.1-postman.22",
"update-electron-app": "^1.5.0"
},
155 changes: 106 additions & 49 deletions electron/src/config.html
Original file line number Diff line number Diff line change
@@ -2,65 +2,122 @@
<html>

<head>
<meta charset="UTF-8">
<title>Boosted: Configuration</title>
<link rel="stylesheet" href="index.css">
<!-- Google fonts -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- Compiled and minified CSS -->
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"> -->
<link rel="stylesheet" type="text/css" href="../node_modules/materialize-css/dist/css/materialize.css">
<!-- Compiled and minified JavaScript -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script> -->
<script defer src="config.js"></script>
<!-- Font Awesome -->
<script defer src="https://kit.fontawesome.com/1c9144b004.js" crossorigin="anonymous"></script>
<script defer>window.$ = window.jQuery = require('jquery');</script>
<link rel="stylesheet" type="text/css" href="../scss/custom.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8">
<title>Boosted: Configuration</title>
<link rel="stylesheet" href="index.css">
<!-- Google fonts -->
<!-- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> -->

<script defer>window.$ = window.jQuery = require('jquery');</script>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"></script>
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<!-- Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>

<script defer src="config.js"></script>
<!-- Font Awesome -->
<script defer src="https://kit.fontawesome.com/1c9144b004.js" crossorigin="anonymous"></script>


<meta name="viewport" content="width=device-width, initial-scale=1.0" />

</head>

<body>
<div id="all-container">
<div id="background">
<div id="valign" class="valign-wrapper">
<div class="container center-align">
<div class="center-align">
<div class="bg-color card z-depth-4" >
<div class="card-content white-text">
<span id="title" class="card-title">&#127959; Configuration</span>
<p id="message"></p>
</div>
<div class="card-action">
<div class="input-field">
<input id="pushed-id-field" class="white-text" type="text">
<label id="pushed-id-field-label" for="pushed-id-field">Pushed ID</label>
</div>
<div class="input-field">
<input id="interval-field" class="white-text" type="text">
<label id="interval-field-label" for="interval-field">Polling Interval (ms)</label>
</div>
<div class="input-field">
<select id="queue-accept-timing">
<option id='default-option' class="white-text" value="wait" disabled selected>Queue Accept timing (Set to wait)</option>
<option value="asap">Accept as soon as possible</option>
<option value="wait">Wait until last second to accept</option>
</select>
</div>
<a onclick="test()" class="waves-effect red waves-light btn">test pushed id</a>
<a onclick="cancel()" class="waves-effect red waves-light btn">cancel</a>
<a onclick="save()" class="waves-effect red waves-light btn">save and exit</a>
</div>
<div class="container h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="col-12">
<div id="config-card" class="card">
<div class="card-body">
<h3 class="card-title text-center text-white">Configuration</h3>
<p id="message" class="card-text text-center text-white"></p>
<hr>
<div class="text-center">
<form class="text-white">
<div class="form-group">
<label for="pushed-id-field">Pushed ID</label>
<input type="text" class="form-control" id="pushed-id-field" aria-describedby="emailHelp">
<small id="emailHelp" class="form-text"></small>
</div>
<div class="form-group">
<label for="interval-field">Polling Interval</label>
<input type="number" class="form-control" id="interval-field">
</div>
</form>
<div class="dropdown">
<button class="btn btn-dark dropdown-toggle" type="button" id="dropdownMenuButton" data-flip="false" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Queue Accept Timing
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a id="wait-item" onclick="setAccept(this)" class="dropdown-item">Wait for last second</a>
<a id="asap-item" onclick="setAccept(this)" class="dropdown-item">Accept immediately</a>
</div>
</div>
<hr>
<button onclick="test();" class="btn btn-sm btn-dark">Test Pushed ID</button>
<button onclick="save();" class="btn btn-sm btn-dark">Save</button>
<button onclick="cancel();" class="btn btn-sm btn-dark">Cancel</button>
</div>
</div>
</div>
</div>
</div>
</div>





<!-- <div id="all-container">
<div id="background">
<div id="valign" class="valign-wrapper">
<div class="container center-align">
<div class="center-align">
<div class="bg-color card z-depth-4">
<div class="card-content white-text">
<span id="title" class="card-title">&#127959; Configuration</span>
<p id="message"></p>
</div>
<div class="card-action">
<div class="input-field">
<input id="pushed-id-field" class="white-text" type="text">
<label id="pushed-id-field-label" for="pushed-id-field">Pushed ID</label>
</div>
<div class="input-field">
<input id="interval-field" class="white-text" type="text">
<label id="interval-field-label" for="interval-field">Polling Interval (ms)</label>
</div>
<div class="input-field">
<select id="queue-accept-timing">
<option id='default-option' class="white-text" value="wait" disabled selected>Queue Accept timing
(Set to wait)</option>
<option value="asap">Accept as soon as possible</option>
<option value="wait">Wait until last second to accept</option>
</select>
</div>
<a onclick="test()" class="waves-effect red waves-light btn">test pushed id</a>
<a onclick="cancel()" class="waves-effect red waves-light btn">cancel</a>
<a onclick="save()" class="waves-effect red waves-light btn">save and exit</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="../node_modules/materialize-css/dist/js/materialize.js"></script>
<script>M.AutoInit();</script>

</div>
</div>
<script type="text/javascript" src="../node_modules/materialize-css/dist/js/materialize.js"></script>
<script>M.AutoInit();</script> -->

</body>

</html>
32 changes: 24 additions & 8 deletions electron/src/config.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ const jsonEdit = require("edit-json-file");


new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#333333'),
backgroundColor: customTitlebar.Color.fromHex('#121212'),
menu: null,
icon: "../resources/icons/lol-icon.png"
});
@@ -19,6 +19,21 @@ $(document).ready(function(){
readConfig();
});

setAccept = (event) => {
// console.log($(event).html());
let text = $(event).html();
if(text==='Wait for last second'){
accept_timing='wait';
$('#wait-item').addClass('active');
$('#asap-item').removeClass('active');
}
else if(text==='Accept immediately'){
accept_timing='asap';
$('#wait-item').removeClass('active');
$('#asap-item').addClass('active');
}
}

readConfig = () => {
let file = jsonEdit(__dirname+'/../config.json');
id=file.data.pushed_id;
@@ -27,16 +42,15 @@ readConfig = () => {

if(id){
$('#pushed-id-field').val(id);
$('#pushed-id-field-label').addClass('active');
}
if(interval_time){
$('#interval-field').val(interval_time);
$('#interval-field-label').addClass('active');
}
if(accept_timing==='asap'){
$('#default-option').html('Queue Accept timing (Set to accept ASAP)');
$('#default-option').attr('value','asap');
M.AutoInit();
$('#asap-item').addClass('active');
}
else if(accept_timing==='wait'){
$('$wait-item').addClass('active');
}
}

@@ -48,7 +62,9 @@ cancel = () =>{
save = () => { //save id to file
id=$('#pushed-id-field').val();
interval_time=$('#interval-field').val();
accept_timing = $('#queue-accept-timing')[0].value;
if(!accept_timing){
accept_timing='wait';
}

let file = jsonEdit(__dirname+'/../config.json')

@@ -71,7 +87,7 @@ test = () =>{
data: { "id": tempID, "event": "test" },
url: 'https://us-central1-lol-boosted.cloudfunctions.net/sendNotification',
success: function (data) {
$('#message').html('Sent test notification to Pushed ID "'+tempID+'"');
$('#message').html('Test notification sent');
},
error: function (data) {
$('#message').html("error in http request to firebase");
Loading