Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
roshansyed committed Mar 26, 2020
2 parents 2c4bb7f + 8803a78 commit a5f6bf0
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 25 deletions.
28 changes: 28 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
*~
*.sw[mnpcod]
.tmp
*.tmp
*.tmp.*
*.sublime-project
*.sublime-workspace
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
$RECYCLE.BIN/

*.log
log.txt
npm-debug.log*

/.idea
/.ionic
/.sass-cache
/.sourcemaps
/.versions
/.vscode
/coverage
/dist
/node_modules
/platforms
/plugins
/www
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ npm-debug.log*
/platforms
/plugins
/www

package-lock.json
28 changes: 28 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
stages:
- build
- deploy

build:
image: node:12
stage: build
script:
- npm install
- npm run build
cache:
paths:
- www
artifacts:
paths:
- www
tags:
- docker

deployToDev:
stage: deploy
script:
- cp -R ./www/* /var/www/Couch-Potato
- deployGUI
only:
- develop
tags:
- cp-dev
14 changes: 14 additions & 0 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:12

# Create app directory
WORKDIR /couch-potato

# Install app dependencies
COPY package*.json ./
RUN npm install

# Bundle app source
COPY . .

EXPOSE 8100
CMD [ "npm", "start" ]
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "couch-potato",
"version": "0.0.1",
"version": "1.0.0",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
Expand Down
5 changes: 5 additions & 0 deletions src/app/modules/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ export class DataComponent{
.map( data => this.result = data);
}

getActiveState(userid: string){
return this.http.get(this.url + "get_active_state.php", {params:{userid: userid}})
.map( data => this.result = data);
}

getLeagueDataByName(league: string){
return this.http.get(this.url + "get_league_data_by_name.php", {params:{league: league}})
.map( data => this.result = data);
Expand Down
1 change: 1 addition & 0 deletions src/app/modules/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export class UserComponent {
username: string = '';
salt: string = '';
password: string = '';
active: string = 'false';
}

export class Notifications{
Expand Down
9 changes: 0 additions & 9 deletions src/assets/config-new.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/assets/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"api_url": "http://35.182.190.80/",
"api_url": "https://localhost/couch-potato/",
"notifications":
{
"delay": 2000,
Expand All @@ -11,4 +11,4 @@
"title2": "Potato",
"logolarge": "/assets/imgs/couch-potato-main.png",
"logosmall": "/assets/imgs/couch-potato.png"
}
}
28 changes: 27 additions & 1 deletion src/assets/server_ip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,30 @@ localhost/couch-potato
{
"url": "http://bmint.bookie.host/trigger",
"group": "beatricechain"
}
}

{
"url": "https://beatrice-bos-sj7smflasyfg.blckchnd.com/trigger",
"group": "blckchndbeatricechain"
}

{
"url": "https://ptb.blockveritas.co/ptb/trigger",
"group": "taconatorbeatricechain"
}

{
"url": "http://beatrice-bos.spacemx.tech:8010/trigger",
"group": "spacecryptbeatricechain"
}

{
"url": "https://bos-beatrice01.eifos.org/trigger",
"group": "eifosbeatricechain"
}

{
"url": "http://159.69.223.206:8010/trigger",
"group": "alexpubeatricechain"
}

22 changes: 11 additions & 11 deletions src/components/selector/selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
Game
</ion-col>
<ion-col style="max-width: 7%;font-size: 9pt;">
Home Score
Away Score
</ion-col>
<ion-col style="max-width: 4%">

</ion-col>
<ion-col style="max-width: 7%;font-size: 9pt;">
Away Score
Home Score
</ion-col>
<ion-col style="max-width: 15%">
Actions
Expand All @@ -59,18 +59,18 @@
{{getLocalStartTime(event)}}
</ion-col>
<ion-col [class]="isSelected(event) ? 'col-teams-selected' : 'col-teams'" >
<img class="teams" [src]="getTeamIcon(event.hometeam)">
{{event.hometeam}} v {{event.awayteam}}
<img class="teams" [src]="getTeamIcon(event.awayteam)" >
<img class="teams" [src]="getTeamIcon(event.awayteam)">
{{event.awayteam}} v {{event.hometeam}}
<img class="teams" [src]="getTeamIcon(event.hometeam)" >
</ion-col >
<ion-col style="max-width: 6%;">
<ion-input [(ngModel)] = "event.homescore" no-padding type="tel" pattern="[0-9]" maxlength="3" [class] = "getCanScore(event)" [disabled] = !scoreDisabled(event)></ion-input>
<ion-input [(ngModel)] = "event.awayscore" no-padding type="tel" pattern="[0-9]" maxlength="3" [class] = "getCanScore(event)" [disabled] = !scoreDisabled(event)></ion-input>
</ion-col>
<ion-col style="max-width: 5%; text-align: center">
<ion-icon style="padding-top: 20px; padding-right: 10px" name="remove"></ion-icon>
</ion-col>
<ion-col style="max-width: 6%">
<ion-input [(ngModel)] = "event.awayscore" type="tel" pattern="[0-9]" maxlength="3" [class] = "getCanScore(event)" [disabled] = !scoreDisabled(event)></ion-input>
<ion-input [(ngModel)] = "event.homescore" type="tel" pattern="[0-9]" maxlength="3" [class] = "getCanScore(event)" [disabled] = !scoreDisabled(event)></ion-input>
</ion-col>
<ion-col style="max-width: 10%; text-align:center">
<div *ngIf="isVisible(event) == false">
Expand Down Expand Up @@ -107,8 +107,8 @@
<ion-col col-4 style="padding-top: 15px">
<ion-list>
<ion-item no-lines class="team-item">
<ion-label style="max-width:80px; color:black; font-size: 10pt;" no-padding >Home Team:</ion-label>
<ion-select [(ngModel)] = "hometeam" interface="action-sheet" class="team-input">
<ion-label style="max-width:80px; color:black; font-size: 10pt;" no-padding >Away Team:</ion-label>
<ion-select [(ngModel)] = "awayteam" interface="action-sheet" class="team-input">
<ion-option *ngFor="let team of teams">
{{team.name}}
</ion-option>
Expand All @@ -120,8 +120,8 @@
<ion-col col-4 style="padding-top: 15px">
<ion-list>
<ion-item no-lines class="team-item">
<ion-label class="ion-text-wrap" style="max-width:80px; color:black; font-size: 10pt;">Away Team:</ion-label>
<ion-select [(ngModel)] = "awayteam" interface="action-sheet" class="team-input">
<ion-label class="ion-text-wrap" style="max-width:80px; color:black; font-size: 10pt;">Home Team:</ion-label>
<ion-select [(ngModel)] = "hometeam" interface="action-sheet" class="team-input">
<ion-option *ngFor="let team of teams">
{{team.name}}
</ion-option>
Expand Down
1 change: 1 addition & 0 deletions src/components/selector/selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export class SelectorComponent {
// lose the last precision
putData.start_time = putData.start_time.substring(0,19) +"Z";
this.putData.start_time = putData.start_time;

this._data.addGame(putData).subscribe(result =>{
retval = result;
if(retval.status != "200"){ // error
Expand Down
6 changes: 6 additions & 0 deletions src/pages/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export class MainPage {
return;
}
else{
// is the user active yet
if(userdata[0].active == 'False'){
this._alert.showError("Error", "Account is not yet active")
return;
}

// encrypt password with salt and compare.
this._user.salt = userdata[0].salt;
var password1 = userdata[0].password;
Expand Down

0 comments on commit a5f6bf0

Please sign in to comment.