Skip to content

Commit

Permalink
1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Polishsuk committed Feb 22, 2021
1 parent 9cbbf60 commit 7d50608
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 58 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ Thanks to <a id="raw-url" href="https://github.com/RosboneMako/MakoCelo">Rosbone

## Updates:

* **version 1.5.1.**
- Small bug fix (in horizontal display, current user team position was some times on wrong side)
* **version 1.5.0.**
- Add horizontal and vertical rankings display possibility for html/txt
- User settings should now presist after updating app
Expand Down
50 changes: 7 additions & 43 deletions localhostFiles/rankings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,17 @@
"teams": {
"team1": [
{
"name": "听雨轩霹雳",
"ranking": "-",
"country": "cn",
"faction": "usa"
},
{
"name": "S I M P",
"ranking": "723",
"country": "us",
"faction": "uk"
},
{
"name": "651393767",
"ranking": "1005",
"country": "cn",
"faction": "usa"
},
{
"name": "破阵子1945",
"ranking": "-",
"country": "cn",
"faction": "uk"
"name": "sepi",
"ranking": "173",
"country": "fi",
"faction": "sov"
}
],
"team2": [
{
"name": "barron24601",
"ranking": "2515",
"country": "cn",
"faction": "okw"
},
{
"name": "sepi",
"ranking": "1343",
"country": "fi",
"faction": "okw"
},
{
"name": "enfieldsquare",
"ranking": "1259",
"country": "vn",
"faction": "wer"
},
{
"name": "Bgoct",
"ranking": "790",
"country": "cn",
"name": "CPU - Easy",
"ranking": "-",
"country": "",
"faction": "wer"
}
]
Expand Down
5 changes: 1 addition & 4 deletions localhostFiles/rankings.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
听雨轩霹雳 CHN - USA OKW 2515 CHN barron24601
S I M P USA 723 UK OKW 1343 FIN sepi
651393767 CHN 1005 USA WER 1259 VNM enfieldsquare
破阵子1945 CHN - UK WER 790 CHN Bgoct
sepi FIN 173 SOV WER - CPU - Easy
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mycelo",
"productName": "myCelo",
"version": "1.5.0",
"version": "1.5.1",
"description": "COH2 ranking displayer",
"license": "MIT",
"engines": {
Expand Down
1 change: 0 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ function App() {
// update rankingsFile location, for cases where app location is
// different
if (newSettings.rankingsFile) {
console.log(newSettings, state.appLocation)
newSettings.rankingsFile = state.appLocation
+ '\\localhostFiles\\rankings.'
+ (newSettings.rankingsHtml ? 'html' : 'txt')
Expand Down
3 changes: 0 additions & 3 deletions src/components/UpdateBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ function UpdateBar() {
.then(x => {
if (x && x.data) {
let newTagName = x.data.tag_name
console.log(settings.ignoreUntil)
console.log(newTagName)
if (settings.ignoreUntil === newTagName) {
return
}
Expand Down Expand Up @@ -90,7 +88,6 @@ function UpdateBar() {
}

const ignore = () => {
console.log('ignore')
const newSettings = {
...settings,
ignoreUntil: update.tagName
Expand Down
2 changes: 1 addition & 1 deletion src/functions/readLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function readLog(fileLocation, callback) {

let lines = data.split('\n')

let currentUser = getCurrentUser(lines)
let currentUser = getCurrentUser(lines)
let arr = getLines(lines)
let info = getPlayersInfo(arr)

Expand Down
9 changes: 4 additions & 5 deletions src/functions/writeRankings.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export function writeRankings(
rankingsHorizontal,
from
) {

let json = {
teams: {
team1: [],
Expand Down Expand Up @@ -66,11 +65,11 @@ export function writeRankings(
ranking = (+ranking).toString()
}
const faction = players[i].faction
const slot = Number(players[i].slot)
const teamSlot = Number(players[i].teamSlot)

const maxNameLength = 20
if (rankingsHorizontal) {
if (slot % 2 === 0) {
if (teamSlot % 2 === 0) {
const text = getLimitedWord(name, maxNameLength, true)
+ " " + countryText(country, true, 5)
+ " " + ranking.padStart(5)
Expand All @@ -91,7 +90,7 @@ export function writeRankings(
+ " " + countryText(country, false, 5)
+ " " + getLimitedWord(name, maxNameLength, false)

if (slot % 2 === 0) {
if (teamSlot % 2 === 0) {
rowsRight.push(text)
} else {
rowsLeft.push(text)
Expand All @@ -100,7 +99,7 @@ export function writeRankings(
}


if (slot % 2 === 0) {
if (teamSlot % 2 === 0) {
json.teams.team1.push({
name,
ranking,
Expand Down

0 comments on commit 7d50608

Please sign in to comment.