Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow skipping registration when google account already exists #209

Merged
merged 31 commits into from
Apr 28, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8e92e5f
Remove useless if
neketka Apr 25, 2024
677e1f3
Skip register
neketka Apr 25, 2024
6965279
Fix device login url
neketka Apr 25, 2024
1f65485
Fix flutter warnings
neketka Apr 25, 2024
7d81606
Comment out useless code
neketka Apr 25, 2024
104b265
Update api key
neketka Apr 25, 2024
7e6bb78
Fixed room leaks
neketka Apr 25, 2024
5e21c24
Merge branch 'master' into nikita/fix-google-login
neketka Apr 27, 2024
fbfb57a
Fix failing test
neketka Apr 27, 2024
f68a571
Added formatting
neketka Apr 27, 2024
82be479
fix bool
neketka Apr 27, 2024
abfb5e4
Real time leaderboard
neketka Apr 28, 2024
d89826d
Fixed loading issue
neketka Apr 28, 2024
4c3e717
Merge branch 'master' into nikita/fix-google-login
neketka Apr 28, 2024
d1601d4
Ran flutter fix
neketka Apr 28, 2024
30d380e
Fixed formatting
neketka Apr 28, 2024
5de1116
Fixed message
neketka Apr 28, 2024
847ccd8
Fix test failures
neketka Apr 28, 2024
c81190b
Merge branch 'master' into nikita/fix-google-login
neketka Apr 28, 2024
08e2bc8
Fix formatting
neketka Apr 28, 2024
889e678
New google services
neketka Apr 28, 2024
a9e23b5
Merge branch 'master' into nikita/fix-google-login
neketka Apr 28, 2024
5fb5c09
Fix loading for leaderboard
neketka Apr 28, 2024
5d38897
Fix navigator issues
neketka Apr 28, 2024
b8108be
Fixed spam updates
neketka Apr 28, 2024
aa2cdcf
Launcher icons
neketka Apr 28, 2024
de5d505
Set favicon
neketka Apr 28, 2024
8413cca
Fix icon stretch
neketka Apr 28, 2024
c455430
Fix favicon
neketka Apr 28, 2024
80bd877
Update username leaderboard
neketka Apr 28, 2024
a973d42
Change naming
neketka Apr 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ npx prisma studio
npm run updateapi
```

### Format all code files

```
npm run formatall
```

### Start the frontend (for debugging)

```
Expand Down
Binary file modified admin/public/favicon.ico
Binary file not shown.
52 changes: 22 additions & 30 deletions admin/src/all.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ export interface RequestAchievementDataDto {

export interface LoginDto {
idToken: string;
latF: number;
longF: number;
noRegister: boolean;
latF?: number;
longF?: number;
username?: string;
year?: string;
college?: string;
Expand Down Expand Up @@ -152,18 +153,6 @@ export interface SetCurrentChallengeDto {
challengeId: string;
}

export interface LeaderDto {
userId: string;
username: string;
score: number;
}

export interface UpdateLeaderDataDto {
eventId: string;
offset: number;
users: LeaderDto[];
}

export interface UpdateErrorDto {
id: string;
message: string;
Expand All @@ -183,6 +172,25 @@ export interface RequestEventDataDto {
export interface RequestEventLeaderDataDto {
offset: number;
count: number;
eventId?: string;
}

export interface LeaderDto {
userId: string;
username: string;
score: number;
}

export interface UpdateLeaderDataDto {
eventId?: string;
offset: number;
users: LeaderDto[];
}

export interface UpdateLeaderPositionDto {
playerId: string;
newTotalScore: number;
newEventScore: number;
eventId: string;
}

Expand Down Expand Up @@ -295,22 +303,6 @@ export interface UpdateOrganizationDataDto {

export interface CloseAccountDto {}

export interface SetUsernameDto {
newUsername: string;
}

export interface SetCollegeDto {
newCollege: string;
}

export interface SetMajorDto {
newMajor: string;
}

export interface SetGraduationYearDto {
newYear: string;
}

export interface BanUserDto {
userId: string;
isBanned: boolean;
Expand Down
4 changes: 3 additions & 1 deletion admin/src/components/Challenges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ function toForm(challenge: ChallengeDto) {
{
name: "Image URL",
characterLimit: 2048,
value: challenge.imageUrl ?? "https://upload.wikimedia.org/wikipedia/commons/b/b1/Missing-image-232x150.png",
value:
challenge.imageUrl ??
"https://upload.wikimedia.org/wikipedia/commons/b/b1/Missing-image-232x150.png",
},
{
name: "Awarding Distance (meters)",
Expand Down
11 changes: 7 additions & 4 deletions admin/src/components/ServerApi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ export class ServerApi {
this.send("completedChallenge", data);
}

requestGlobalLeaderData(data: dto.RequestGlobalLeaderDataDto) {
this.send("requestGlobalLeaderData", data);
}

updateChallengeData(data: dto.UpdateChallengeDataDto) {
this.send("updateChallengeData", data);
}
Expand Down Expand Up @@ -193,4 +189,11 @@ export class ServerApi {
this.socket.removeAllListeners("updateOrganizationData");
this.socket.on("updateOrganizationData", (data) => callback(data));
}

onUpdateLeaderPosition(
callback: (data: dto.UpdateLeaderPositionDto) => void
) {
this.socket.removeAllListeners("updateLeaderPosition");
this.socket.on("updateLeaderPosition", (data) => callback(data));
}
}
42 changes: 25 additions & 17 deletions game/android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,30 @@
"certificate_hash": "d6e7da6b98f7884510d3826068e668c5bb7ec89b"
}
},
{
"client_id": "757523123677-mdis2048vo39u7bjg7rjtm9r28a1tsto.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.cornellgo.CornellGO",
"certificate_hash": "48942102c610163af43caab359452832e7bdc189"
}
},
{
"client_id": "757523123677-s7lm7n8b1vmppnh92pige13uvp722jma.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.cornellgo.CornellGO",
"certificate_hash": "e8ec9df2de92f3ff018926aba9448be15c464a4e"
}
},
{
"client_id": "757523123677-2nv6haiqnvklhb134cgg5qe8bia4du4q.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDSKPt3T-sBGcaS5vQGw-FDkgOBTryxhUQ"
"current_key": "AIzaSyCNuTQ0eTjwXde0NMNMFaO6c3u5AYlNiXA"
},
{
"current_key": "AIzaSyBBGoQlbjlNCBfxiob-mkm1TCougaHqcu4"
Expand All @@ -42,10 +58,10 @@
"client_type": 3
},
{
"client_id": "757523123677-cso74eimkjqkcuce69nrf4c637k3db6t.apps.googleusercontent.com",
"client_id": "757523123677-5uct36sksguq3v4ngeec8ofc31ipf8hl.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.cornellgo.game"
"bundle_id": "com.cornellgo.CornellGO"
}
}
]
Expand All @@ -61,19 +77,11 @@
},
"oauth_client": [
{
"client_id": "757523123677-lhftm1kuh7k0uqkhc62d378um4nb5e3g.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.cornellgo.game",
"certificate_hash": "d6e7da6b98f7884510d3826068e668c5bb7ec89b"
}
},
{
"client_id": "757523123677-q8o2d3tahsmm9i68j1sf33ka49qsgalq.apps.googleusercontent.com",
"client_id": "757523123677-q8lt36h21g5kcmvvqe07f5krldkb4k4i.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.cornellgo.game",
"certificate_hash": "98efe77cdeb1f8f17e7c3634a8700ae7361aaa08"
"certificate_hash": "e8ec9df2de92f3ff018926aba9448be15c464a4e"
}
},
{
Expand All @@ -83,7 +91,7 @@
],
"api_key": [
{
"current_key": "AIzaSyDSKPt3T-sBGcaS5vQGw-FDkgOBTryxhUQ"
"current_key": "AIzaSyCNuTQ0eTjwXde0NMNMFaO6c3u5AYlNiXA"
},
{
"current_key": "AIzaSyBBGoQlbjlNCBfxiob-mkm1TCougaHqcu4"
Expand All @@ -97,10 +105,10 @@
"client_type": 3
},
{
"client_id": "757523123677-cso74eimkjqkcuce69nrf4c637k3db6t.apps.googleusercontent.com",
"client_id": "757523123677-5uct36sksguq3v4ngeec8ofc31ipf8hl.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.cornellgo.game"
"bundle_id": "com.cornellgo.CornellGO"
}
}
]
Expand All @@ -109,4 +117,4 @@
}
],
"configuration_version": "1"
}
}
2 changes: 1 addition & 1 deletion game/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<application android:label="CornellGO!" android:icon="@mipmap/ic_launcher">
<application android:label="CornellGO!" android:icon="@mipmap/launcher_icon">

<meta-data android:name="com.google.android.geo.API_KEY"
android:value="@string/ANDROID_MAP_API_KEY" />
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified game/assets/images/main_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions game/lib/achievements/achievement_cell.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:game/preview/preview.dart';
import 'package:flutter_svg/flutter_svg.dart';

class LoadingBar extends StatelessWidget {
Expand Down
2 changes: 0 additions & 2 deletions game/lib/achievements/achievements_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import 'package:game/model/event_model.dart';
import 'package:game/model/group_model.dart';
import 'package:game/utils/utility_functions.dart';
import 'package:game/model/tracker_model.dart';
import 'package:game/model/achievement_model.dart';
import 'package:game/model/user_model.dart';
import 'package:provider/provider.dart';

class AchievementCellDto {
Expand Down
Loading
Loading