-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco
committed
Sep 14, 2015
0 parents
commit c7e9847
Showing
23 changed files
with
978 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
src/app/lib/ | ||
.static | ||
cache | ||
release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
'use strict'; | ||
/* jshint node:true */ | ||
|
||
var electron = require('gulp-electron'); | ||
var gulp = require('gulp'); | ||
var util = require('gulp-util'); | ||
|
||
var packageJson = require('./src/package.json'); | ||
|
||
process.NODE_ENV = 'test'; | ||
|
||
gulp.task('package', function() { | ||
|
||
gulp.src("") | ||
.pipe(electron({ | ||
src: './src', | ||
packageJson: packageJson, | ||
release: './release', | ||
cache: './cache', | ||
version: 'v0.32.2', | ||
rebuild: false, | ||
packaging: true, | ||
asar: true, | ||
platforms: ['win32-ia32', 'win32-x64', 'darwin-x64'], | ||
platformResources: { | ||
darwin: { | ||
CFBundleDisplayName: "AnalyzeOrFeed", | ||
CFBundleIdentifier: "AnalyzeOrFeed", | ||
CFBundleName: "AnalyzeOrFeed", | ||
CFBundleVersion: packageJson.version, | ||
icon: 'src/app/icons/aof.icns' | ||
}, | ||
win: { | ||
"version-string": packageJson.version, | ||
"file-version": packageJson.version, | ||
"product-version": packageJson.version, | ||
"icon": 'src/app/icons/aof.ico' | ||
} | ||
} | ||
})) | ||
.pipe(gulp.dest("")); | ||
}); | ||
|
||
gulp.task('default', ['package']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "aof-replay-client-setup", | ||
"version": "0.1.0", | ||
"main": "gulpfile.js", | ||
"scripts": { | ||
"postinstall": "cd src; npm install", | ||
"start": "./node_modules/.bin/electron ./src", | ||
"build": "./node_modules/.bin/gulp" | ||
}, | ||
"author": "Analyze Or Feed", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"electron-prebuilt": "^0.32.1", | ||
"gulp": "^3.9.0", | ||
"gulp-electron": "0.0.9", | ||
"gulp-util": "^3.0.6" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# AnalyzeOrFeed Replay Client | ||
|
||
The aof.gg Replay Client is built using Electron. This means the app is compatible with both Windows and Mac. You can download the packaged files here: | ||
|
||
[aof.gg](http://aof.gg/download/) | ||
|
||
--- | ||
|
||
If you would like to contribute to our client, here is how you get this repository working on your own computer: | ||
|
||
First, make sure you have the latest version of [node.js](http://nodejs.org) and [bower](http://bower.io) installed. Then clone the repository. | ||
|
||
````shell | ||
$ git clone https://github.com/AnalyzeOrFeed/aof-replay-client.git aof-replay-client | ||
```` | ||
|
||
Afterwards, you need to run | ||
````shell | ||
$ npm install | ||
```` | ||
in the root directory **AND** in the source directory. | ||
|
||
In the src/app directory, run | ||
````shell | ||
bower install | ||
```` | ||
|
||
That's it! You should be able to test the app by running | ||
````shell | ||
npm start | ||
```` | ||
|
||
If you want to package the app, run | ||
````shell | ||
npm run build | ||
```` | ||
**Note:** On Windows, you need to have 7zip command line version installed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "aof-replay-client", | ||
"version": "0.1.0", | ||
"authors": [ | ||
"AnalyzeOrFeed <admin@aof.com>" | ||
], | ||
"description": "AnalyzeOrFeed Replay Client", | ||
"license": "MIT", | ||
"homepage": "http://www.aof.gg", | ||
"dependencies": { | ||
"angular": "*", | ||
"angular-material": "*", | ||
"angular-route": "*", | ||
"material-design-icons-iconfont": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
body { | ||
color: #333333; | ||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; | ||
font-size: 1em; | ||
-webkit-font-smoothing: antialiased; | ||
line-height: 1.5em; | ||
display: inline-block; | ||
position: relative; | ||
min-height: 100%; | ||
width: 100%; | ||
margin: 0; | ||
} | ||
|
||
.aof { | ||
background-color: #3598db; | ||
} | ||
|
||
.aof.md-button { | ||
position: absolute; | ||
left: 3px; | ||
} | ||
|
||
.content { | ||
margin-top: 50px; | ||
} | ||
|
||
.client-found-true { | ||
color: green; | ||
} | ||
|
||
.client-found-false { | ||
color: red; | ||
} | ||
|
||
.title { | ||
font-size: 1.3em; | ||
} | ||
|
||
.load-file { | ||
|
||
} | ||
|
||
.play-replay { | ||
|
||
} | ||
|
||
.spell1 { | ||
position: relative; | ||
left: 0px; | ||
top: 0px; | ||
width: 23px; | ||
height: 23px; | ||
} | ||
|
||
.spell2 { | ||
position: relative; | ||
left: 0px; | ||
top: 2px; | ||
width: 23px; | ||
height: 23px; | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
angular.module('app', | ||
[ | ||
"ngAnimate", | ||
"ngAria", | ||
"ngMaterial", | ||
"ngRoute", | ||
"app.controllers", | ||
"app.directives", | ||
"app.services", | ||
"app.routes" | ||
]) | ||
|
||
.config(function($mdThemingProvider) { | ||
$mdThemingProvider.definePalette('amazingPaletteName', { | ||
'50': 'ffebee', | ||
'100': 'ffcdd2', | ||
'200': 'ef9a9a', | ||
'300': 'e57373', | ||
'400': 'ef5350', | ||
'500': '3598db', | ||
'600': 'e53935', | ||
'700': 'd32f2f', | ||
'800': 'c62828', | ||
'900': 'b71c1c', | ||
'A100': 'ff8a80', | ||
'A200': 'ff5252', | ||
'A400': 'ff1744', | ||
'A700': 'd50000', | ||
'contrastDefaultColor': 'light', // whether, by default, text (contrast) | ||
// on this palette should be dark or light | ||
'contrastDarkColors': ['50', '100', //hues which contrast should be 'dark' by default | ||
'200', '300', '400', 'A100'], | ||
'contrastLightColors': undefined // could also specify this if default was 'dark' | ||
}); | ||
$mdThemingProvider.theme('default') | ||
.primaryPalette('amazingPaletteName') | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
var app = angular.module('app.controllers', []); | ||
|
||
app.controller('MainController', ['$scope', '$rootScope', '$mdDialog', | ||
function($scope, $rootScope, $mdDialog) { | ||
|
||
var ipc = require('ipc'); | ||
|
||
$scope.hasReplay = false; | ||
$scope.replay = null; | ||
$scope.leagueClientFound = false; | ||
$scope.leagueClientVersion = ""; | ||
$scope.staticDataReady = false; | ||
$scope.aofClientInfo = {}; | ||
|
||
$scope.settings = [ { id: 1, name: "Select LoL Client" }, { id: 2, name: "Client info" } ]; | ||
|
||
$scope.showAofClientInfo = function(ev) { | ||
var updateText = ""; | ||
if ($scope.aofClientInfo.newVersion) { | ||
updateText = "<br /><br /><strong>New Version avaliable (" + $scope.aofClientInfo.newVersion + ")</strong><br />" + $scope.aofClientInfo.msg; | ||
} | ||
|
||
$mdDialog.show( | ||
$mdDialog.alert() | ||
.parent(angular.element(document.querySelector('#popupContainer'))) | ||
.clickOutsideToClose(true) | ||
.title('Client info') | ||
.content('v' + $scope.aofClientInfo.currVersion + updateText) | ||
.ariaLabel('Client info') | ||
.ok('ok') | ||
.targetEvent(ev) | ||
); | ||
}; | ||
|
||
$scope.announceClick = function(index) { | ||
if (index == 0) { | ||
$scope.selectClient(); | ||
} | ||
if (index == 1) { | ||
$scope.showAofClientInfo(); | ||
} | ||
}; | ||
|
||
$scope.openFile = function() { | ||
ipc.send("openReplay"); | ||
}; | ||
|
||
$scope.selectClient = function() { | ||
ipc.send("selectClient"); | ||
}; | ||
|
||
$scope.playReplay = function() { | ||
console.log("playing"); | ||
ipc.send("play"); | ||
}; | ||
|
||
ipc.on("clientInfo", function(obj) { | ||
$scope.$apply(function() { | ||
$scope.leagueClientFound = obj.found; | ||
$scope.leagueClientVersion = obj.version; | ||
}); | ||
}); | ||
|
||
ipc.on("parsedReplayFile", function(arg) { | ||
$scope.$apply(function() { | ||
$scope.replay = arg; | ||
$scope.hasReplay = true; | ||
}); | ||
}); | ||
|
||
ipc.on("staticData", function(arg) { | ||
$scope.$apply(function() { | ||
$scope.staticDataReady = arg; | ||
}); | ||
}); | ||
|
||
ipc.on("update", function(arg) { | ||
$scope.$apply(function() { | ||
$scope.aofClientInfo = arg; | ||
}); | ||
}); | ||
|
||
ipc.send("ready"); | ||
} | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
angular.module('app.directives', []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
angular.module('app.routes', []) | ||
.config(['$routeProvider', | ||
function($routeProvider) { | ||
$routeProvider | ||
.when('/', { | ||
templateUrl: "app/tpl/main.html" | ||
}) | ||
.otherwise('/'); | ||
} | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
angular.module('app.services', []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<md-toolbar> | ||
<div class="md-toolbar-tools"> | ||
<span id="md-toolbar-title">AnalyzeOrFeed Replay Client</span> | ||
<span flex></span> | ||
<span ng-show="aofClientInfo.newVersion" ng-click="showAofClientInfo($event)">Update available!</span> | ||
<md-menu> | ||
<md-button aria-label="Open demo menu" class="md-icon-button" ng-click="$mdOpenMenu($event)"> | ||
<md-icon>settings</md-icon> | ||
</md-button> | ||
<md-menu-content width="3"> | ||
<md-menu-item ng-repeat="item in settings"> | ||
<md-button ng-click="announceClick($index)"> | ||
<md-icon>folder</md-icon> | ||
{{item.name}} | ||
</md-button> | ||
</md-menu-item> | ||
</md-menu-content> | ||
</md-menu> | ||
</div> | ||
</md-toolbar> |
Oops, something went wrong.