Skip to content

Commit

Permalink
Merge pull request #12 from yadPe/autoUpTest
Browse files Browse the repository at this point in the history
Auto update
  • Loading branch information
yadPe authored Aug 10, 2019
2 parents c91cebe + a255ba8 commit 855e363
Show file tree
Hide file tree
Showing 28 changed files with 156 additions and 99 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ conf.json
src/Bot/conf.js
log.txt
\.idea/
secrets
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Beatconnect client

This App gives you access to all the beatmaps mirrored on [Beatconnect](https://beatconnect.io). You can downloads multiple beatmaps that will be automaticaly imported into osu! </br>
Plus, you can launch an IRC bot from the app that will make all [available commands](./doc/commands.md) usable to peoples pming you and from all the matches chats that the bot is connected to. (how to connect docs soon..)
Plus, you can launch an IRC bot from the app that will make all [available commands](./docs/commands.md) usable to peoples pming you and from all the matches chats that the bot is connected to. (how to connect docs soon..)

<img src="https://cdn.discordapp.com/attachments/414474227710820352/606134985971204096/unknown.png">

Expand Down
95 changes: 82 additions & 13 deletions package-lock.json

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

18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "beatconnect_client",
"productName": "Beatconnect Client",
"version": "0.1.3",
"version": "0.1.4",
"description": "Beatconnect power for osu irc",
"author": "yadpe <petitot.py@gmail.com>",
"license": "GPL-3.0",
Expand All @@ -11,11 +11,12 @@
"start": "node scripts/start.js",
"build": "node scripts/build.js",
"test": "node scripts/test.js",
"lint": "eslint src/App/**",
"go": "electron .",
"dist": "npm run build && npx npx electron-builder --win --linux --ia32",
"dist-win": "npm run build && npx electron-builder build --win --ia32",
"dist-linux": "npm run build && npx electron-builder build --linux --ia32",
"gh-publish": "npm run build && npx electron-builder build -p onTag",
"gh-publish": "npm run build && npx electron-builder build --win --linux --ia32 -p always",
"electron-dev": "set ELECTRON_START_URL=http://localhost:3000 && electron ."
},
"eslintConfig": {
Expand All @@ -33,6 +34,13 @@
},
"build": {
"appId": "io.beatconnect.client",
"publish": [
{
"provider": "github",
"owner": "yadPe",
"repo": "beatconnect_client"
}
],
"files": [
"build/**/*",
"node_modules/**/*"
Expand Down Expand Up @@ -89,6 +97,7 @@
"electron-download-manager": "^2.1.2",
"electron-is-dev": "^1.1.0",
"electron-log": "^3.0.7",
"electron-updater": "^4.1.2",
"eslint": "^5.16.0",
"eslint-config-react-app": "^4.0.1",
"eslint-loader": "2.1.2",
Expand All @@ -97,8 +106,6 @@
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-react": "7.12.4",
"eslint-plugin-react-hooks": "^1.5.0",
"express": "^4.17.1",
"express-prettify": "^0.1.1",
"file-loader": "3.0.1",
"fs-extra": "^7.0.1",
"html-webpack-plugin": "4.0.0-beta.5",
Expand Down Expand Up @@ -143,7 +150,6 @@
},
"devDependencies": {
"electron-builder": "^20.44.4",
"nodemon": "^1.19.1",
"electron": "^5.0.5",
"typescript": "^3.5.3"
},
Expand Down Expand Up @@ -209,4 +215,4 @@
"react-app"
]
}
}
}
19 changes: 5 additions & 14 deletions public/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,19 @@ const defaultProps = {
minWidth: 850,
show: false,
darkTheme: true,
// frame: false
frame: process.env.ELECTRON_START_URL ? true : false
}
};

class Window extends BrowserWindow {
constructor ({ url, ...windowSettings }) {
// calls new BrowserWindow with these props
super({ ...defaultProps, ...windowSettings })

// load the html and open devtools
//this.loadFile(file)
this.loadURL(url)
// this.webContents.openDevTools()

// gracefully show when ready to prevent flickering
super({ ...defaultProps, ...windowSettings });

// this.on('will-move', (e) => this.setOpacity(0.75))
// this.on('moved', () => this.setOpacity(windowSettings.opacity || 1))
this.loadURL(url);

this.once('ready-to-show', () => {
this.show()
})
this.show();
});
}
}

Expand Down
24 changes: 9 additions & 15 deletions public/electron.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
const electron = require('electron');
const { app } = electron;
const { app } = require('electron');
const log = require('electron-log');
const isDev = require('electron-is-dev');
const { autoUpdater } = require('electron-updater');
const DownloadManager = require("electron-download-manager");
const Window = require('./Window');
const path = require('path')
const url = require('url')
const isDev = require('electron-is-dev');
require('update-electron-app')({
repo: 'yadPe/beatconnect_client.git',
logger: require('electron-log')
})

const DownloadManager = require("electron-download-manager");

autoUpdater.on('error', (error) => {
log.warn(`Error: \n ${error == null ? "unknown" : (error.stack || error).toString()}`);
});
autoUpdater.checkForUpdatesAndNotify()
DownloadManager.register({
downloadFolder: app.getPath("downloads") + "/beatconnect"
});


// https://codeburst.io/build-a-todo-app-with-electron-d6c61f58b55a
// https://electronjs.org/docs/api/browser-window
// https://www.freecodecamp.org/news/building-an-electron-application-with-create-react-app-97945861647c/
// https://medium.com/@brockhoff/using-electron-with-react-the-basics-e93f9761f86f


const main = () => {
let mainWindow = null;
console.log('readee')
Expand Down
3 changes: 1 addition & 2 deletions src/App/components/Browse/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useState, useEffect } from 'react';
import React from 'react';
import { connect } from 'react-redux';
import test from '../testSearchResult'
import Beatmap from '../common/Beatmap'
import Search from './Search';
import VizSensor from 'react-visibility-sensor';
Expand Down
Loading

0 comments on commit 855e363

Please sign in to comment.