Last changes

This commit is contained in:
2019-03-02 00:25:42 +01:00
parent 6561a2da58
commit 6dd5fe377f
4 changed files with 9 additions and 14 deletions

View File

@@ -1,12 +1,5 @@
<div class="container" dir="rtl"> <div class="container" dir="rtl">
<h2>تصويت</h2> <h2>تصويت</h2>
<ng-adsense
[adFormat]="'auto'"
[adSlot]="2946645009"
[display]="'inline-block'"
[height]="90"
[width]="180">
</ng-adsense>
<h3>شكون غادي يكون النجم ديال #ستانداب في موسمه الثالث؟🤩🤔🏆</h3> <h3>شكون غادي يكون النجم ديال #ستانداب في موسمه الثالث؟🤩🤔🏆</h3>
<h4>صوتو الآن و كونو نتوما الحكم 📲🤓</h4> <h4>صوتو الآن و كونو نتوما الحكم 📲🤓</h4>
<p class="placeholder">دردشة <p class="placeholder">دردشة
@@ -36,10 +29,11 @@
live video live video
</p> </p>
<ng-adsense <ng-adsense
[adFormat]="'link'" [adFormat]="'auto'"
[adSlot]="4965257893" [adSlot]="2412324748"
[display]="'block'"> [display]="'block'">
</ng-adsense> </ng-adsense>
<br>
<ng-adsense <ng-adsense
[adFormat]="'auto'" [adFormat]="'auto'"
[adSlot]="2412324748" [adSlot]="2412324748"

View File

@@ -19,7 +19,8 @@ export class AppComponent {
} }
vote(candidate: any) { vote(candidate: any) {
if (candidate.id !== this.currentVoteID) { console.log(this.currentVoteID);
if (this.currentVoteID === undefined) {
this.currentVoteID = candidate.id; this.currentVoteID = candidate.id;
candidate.votes++; candidate.votes++;
this.db.doc('/Candidates/' + candidate.id).update(candidate); this.db.doc('/Candidates/' + candidate.id).update(candidate);
@@ -29,8 +30,8 @@ export class AppComponent {
const vote = { const vote = {
candidate: candidate.id, candidate: candidate.id,
timestamp: Date.now(), timestamp: Date.now(),
ip: IPData.query, ip: IPData.ip,
country: IPData.country, country: IPData.country_name,
city: IPData.city city: IPData.city
}; };
this.db.collection('/votes').add(vote); this.db.collection('/votes').add(vote);
@@ -48,7 +49,7 @@ export class AppComponent {
} }
getIP() { getIP() {
return this.http.get('http://ip-api.com/json'); return this.http.get('https://ipapi.co/json');
} }
getVoteClasses(id: any) { getVoteClasses(id: any) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@@ -1,6 +1,6 @@
/* You can add global styles to this file, and also import other style files */ /* You can add global styles to this file, and also import other style files */
body { body {
background: black url(http://standup.ma/wp-content/themes/gdaynews/images/rideau-header-arr.png); background: black url(assets/rideau-header-arr.png);
background-size: cover; background-size: cover;
color: white; color: white;
padding-top: 8px; padding-top: 8px;