Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
izdwuut committed Feb 17, 2020
2 parents 7748414 + c7f44f8 commit 14f7db3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class RedditConfig:
CLIENT_SECRET = os.environ['GOG_PICKER_REDDIT_CLIENT_SECRET']
USERNAME = os.environ['GOG_PICKER_REDDIT_USERNAME']
PASSWORD = os.environ['GOG_PICKER_REDDIT_PASSWORD']
USER_AGENT = 'python:gog-picker:v0.11.0 (by /u/izdwuut)'
USER_AGENT = 'python:gog-picker:v0.12.0 (by /u/izdwuut)'
NOT_ENTERING = 'not entering'
MIN_KARMA = 300

Expand Down
11 changes: 1 addition & 10 deletions frontend/src/app/thread/thread.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ <h1>Scrapped comments</h1>
<a href="https://steamcommunity.com/profiles/{{ comment.steamProfile.steamId }}/"
target="_blank">Steam profile</a>: {{ getSteamProfile(comment) }}
</div>
<div *ngIf='!comment.steamProfile.steamId'>
Steam profile: {{ getSteamProfile(comment) }}
</div>
</div>
<div><br />Warnings: {{ getWarnings(comment).join(', ') }}</div>
</mat-card-subtitle>
Expand All @@ -63,9 +60,6 @@ <h1>Scrapped comments</h1>
<a href="https://steamcommunity.com/profiles/{{ comment.steamProfile.steamId }}/"
target="_blank">Steam profile</a>: {{ getSteamProfile(comment) }}
</div>
<div *ngIf='!comment.steamProfile.steamId'>
Steam profile: {{ getSteamProfile(comment) }}
</div>
</mat-card-subtitle>
<mat-card-content [innerHTML]="unescapeQuotes(comment.body)"></mat-card-content>
<mat-card-actions>
Expand Down Expand Up @@ -93,14 +87,11 @@ <h1>Scrapped comments</h1>
target="_blank">{{ comment.author.name }}</a>
</mat-card-title>
<mat-card-subtitle>
Comment karma: {{ comment.author.karma }}<span *ngIf='getAge(comment.author.age)'>, age: {{ getAge(comment.author.age) }}</span><br /><br />
Comment karma: {{ comment.author.karma }}<span *ngIf='getAge(comment.author.age)'>, age: {{ getAge(comment.author.age) }}</span><br />
<div *ngIf='comment.steamProfile && comment.steamProfile.steamId'>
<a href="https://steamcommunity.com/profiles/{{ comment.steamProfile.steamId }}/"
target="_blank">Steam profile</a>: {{ getSteamProfile(comment) }}
</div>
<div *ngIf='!comment.steamProfile.steamId'>
Steam profile: {{ getSteamProfile(comment) }}
</div>
<div><br />Errors: {{ getErrors(comment).join(', ') }}</div>
</mat-card-subtitle>
<mat-card-content [innerHTML]="unescapeQuotes(comment.body)"></mat-card-content>
Expand Down
6 changes: 2 additions & 4 deletions frontend/src/app/thread/thread.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
if (comment.author.karma < environment.minKarma) {
errors.push('not enough karma')
}
if (comment.steamProfile == null) {
errors.push('no Steam profile')
} else {
if (comment.steamProfile) {
if (comment.steamProfile.publicProfile) {
if (comment.steamProfile.level < environment.minLevel) {
errors.push('Steam level too low')
Expand Down Expand Up @@ -141,7 +139,7 @@ export class ThreadComponent implements OnInit, OnDestroy {
warnings.push("couldn't scrap comment")
return warnings
}
if (comment.steamProfile && comment.steamProfile.steamId == null) {
if ((comment.steamProfile && comment.steamProfile.steamId == null) || !comment.steamProfile) {
warnings.push('no Steam profile detected')
}
if (comment.steamProfile && comment.steamProfile.gamesCount >= environment.hoarderNumber) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<body>
<app-root></app-root>
<footer class="footer">
Gift of Games Picker for Reddit <a href="https://github.com/izdwuut/gog-picker">v0.11.0</a>.
Gift of Games Picker for Reddit <a href="https://github.com/izdwuut/gog-picker">v0.12.0</a>.
Scripted by <a href="https://reddit.com/u/izdwuut">u/izdwuut</a> and <a href="https://github.com/izdwuut/gog-picker/pulls">friends</a> in open source.
Licensed under <a href="https://github.com/izdwuut/gog-picker/blob/dev/LICENSE">MIT Licence</a>
</footer>
Expand Down

0 comments on commit 14f7db3

Please sign in to comment.