From 5d9f65ce47c0bd4d5500b3d3eb0b0628bf2bd0b9 Mon Sep 17 00:00:00 2001 From: Sanji515 Date: Fri, 21 Jun 2019 23:51:41 +0530 Subject: [PATCH 1/8] Modify the leaderboard page modified the challenge leadeboard page, changed the url by appending the phase split id and by default setted the top phase split id in the url --- .../challengeleaderboard.component.html | 150 ++++- .../challengeleaderboard.component.scss | 11 + .../challengeleaderboard.component.ts | 117 +++- .../challengesubmissions.component.html | 48 +- .../challengesubmissions.component.ts | 29 + .../challengesubmit.component.html | 138 +++- .../challengesubmit.component.ts | 15 + .../selectphase/selectphase.component.html | 60 +- .../selectphase/selectphase.component.ts | 48 ++ src/app/services/api.service.ts | 11 +- src/styles/base.scss | 615 ++++++++++++++++++ 11 files changed, 1154 insertions(+), 88 deletions(-) diff --git a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html index d64c46416..1e73b571c 100644 --- a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html +++ b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html @@ -1,35 +1,119 @@ -
-
- -
-
- - No Results.. -
-
- - - - - - - - - - - - - - -
-
Rank
-
-
Participant Team
-
{{key}}
-
-
Last Submission at - -
-
{{initial_ranking[key.submission__participant_team__team_name]}}
{{key.submission__participant_team__team_name}}
{{score | number : '1.2-2'}}
{{ key.submission__submitted_at_formatted }}
+
+
+
+
+
+ Description +
+
+
+
+
+
+ Page is Outdated, Click to update  +
+
+
+ Please select from following phases! +
+
+
+
+ + +
+
+
+ +
+
+
+
+
No phase selected.
+
+ + B - Baseline submission + +
+ + + + + + + + + + + + + + + + + + +
+ + Rank + + + + + + + + Participant Team + + + + + + + + {{key}} + + + + + + + + Last submission at + + + + + +
{{initial_ranking[key.submission__participant_team__team_name]}}{{key.submission__participant_team__team_name}} + + + B + + + {{score | number : '1.2-2'}}
{{ key.submission__submitted_at_formatted }}
+
+

No results to show!

+
+
+
+
+
+ \ No newline at end of file diff --git a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.scss b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.scss index 4408d6f66..8266a9c83 100644 --- a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.scss +++ b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.scss @@ -71,3 +71,14 @@ } } } + +.ev-card-body { + .row-lr-margin { + margin-bottom: 20px; + } + + .mat-standard-chip { + padding: 3px 5px; + font-size: 16px; + } +} diff --git a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts index 7c2fa135d..7a723d065 100644 --- a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts +++ b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts @@ -58,11 +58,26 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { */ filteredPhaseSplits = []; + /** + * Phase selection type (radio button or select box) + */ + phaseSelectionType = 'selectBox'; + + /** + * Select box list type + */ + phaseSelectionListType = 'phaseSplit'; + /** * Leaderboard entries list */ leaderboard = []; + /** + * Show leaderboard updates + */ + showLeaderboardUpdate = false; + /** * Currently selected phase split's id */ @@ -98,6 +113,15 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { */ entryHighlighted: any = null; + /** + * Challenge phase visibility + */ + challengePhaseVisibility = { + owner_and_host: 1, + host: 2, + public: 3, + }; + /** * Constructor. * @param route ActivatedRoute Injection. @@ -146,21 +170,12 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { */ filterPhases() { if (this.phases.length > 0 && this.phaseSplits.length > 0) { - const TEMPSPLITS = []; - for (let i = 0; i < this.phases.length; i++) { - if (this.phases[i]['leaderboard_public']) { - const TEMP = this.phases[i]; - TEMP['phase_split'] = null; - for (let j = 0; j < this.phaseSplits.length; j++) { - if (this.phaseSplits[j]['challenge_phase'] === TEMP['id'] && this.phaseSplits[j]['visibility'] === 3) { - const TEMP_COPY = Object.assign({}, TEMP); - TEMP_COPY['phase_split'] = this.phaseSplits[j]; - TEMPSPLITS.push(TEMP_COPY); - } - } + for (let i = 0; i < this.phaseSplits.length; i++) { + if (this.phaseSplits[i].visibility !== this.challengePhaseVisibility.public) { + this.phaseSplits[i].showPrivate = true; } } - this.filteredPhaseSplits = TEMPSPLITS; + this.filteredPhaseSplits = this.phaseSplits; setTimeout(() => { this.checkUrlParams(); }, 100); @@ -172,13 +187,12 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { */ checkUrlParams() { this.route.params.subscribe(params => { - console.log(params); if (params['split']) { this.selectedPhaseSplitId = params['split']; this.selectPhaseSplitId(this.selectedPhaseSplitId, this); } else { if (this.filteredPhaseSplits.length > 0) { - this.router.navigate([this.filteredPhaseSplits[0]['phase_split']['id']], {relativeTo: this.route}); + this.router.navigate([this.filteredPhaseSplits[0]['id']], {relativeTo: this.route}); } } }); @@ -192,12 +206,12 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { selectPhaseSplitId(id, self) { let i = 0; for (i = 0; i < self.filteredPhaseSplits.length; i++) { - if (parseInt(id, 10) === self.filteredPhaseSplits[i]['phase_split']['id']) { + if (parseInt(id, 10) === self.filteredPhaseSplits[i]['id']) { self.selectedPhaseSplit = self.filteredPhaseSplits[i]; const checkViewInit = () => { if (self.viewInit) { self.components.map((item) => { - item.selectPhase(self.selectedPhaseSplit); + item.selectPhaseSplit(self.selectedPhaseSplit, 'selectBox', 'phaseSplit'); }); } else { setTimeout(() => { @@ -221,18 +235,18 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { const SELF = this; return (phaseSplit) => { if (SELF.router.url.endsWith('leaderboard')) { - SELF.router.navigate(['../' + phaseSplit['phase_split']['id']], {relativeTo: this.route}); - } else if (SELF.router.url.indexOf(phaseSplit['phase_split']['id']) < 0 && SELF.router.url.split('/').length === 5) { - SELF.router.navigate(['../' + phaseSplit['phase_split']['id']], {relativeTo: this.route}); - } else if (SELF.router.url.indexOf(phaseSplit['phase_split']['id']) < 0 && SELF.router.url.split('/').length === 6) { - SELF.router.navigate(['../../' + phaseSplit['phase_split']['id']], {relativeTo: this.route}); - } else { - SELF.selectedPhaseSplit = phaseSplit; - if (SELF.selectedPhaseSplit['phase_split']) { - SELF.fetchLeaderboard(SELF.selectedPhaseSplit['phase_split']['id']); - } + SELF.router.navigate([phaseSplit['id']], {relativeTo: this.route}); + } else if (SELF.router.url.split('/').length === 5) { + SELF.router.navigate(['../' + phaseSplit['id']], {relativeTo: this.route}); + } else if (SELF.router.url.split('/').length === 6) { + SELF.router.navigate(['../../' + phaseSplit['id']], {relativeTo: this.route}); + } + SELF.selectedPhaseSplit = phaseSplit; + if (SELF.selectedPhaseSplit) { + SELF.fetchLeaderboard(SELF.selectedPhaseSplit['id']); } }; + } /** @@ -261,14 +275,6 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { item['is_highlighted'] = true; } }); - } else { - self.challengeService.currentParticipantTeams.subscribe((teams) => { - teams.map((item) => { - if (self.challenge && item['challenge'] && item['challenge']['id'] === self.challenge['id']) { - self.router.navigate([item['participant_team']['team_name']], {relativeTo: this.route}); - } - }); - }); } }); } @@ -319,7 +325,9 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { const SELF = this; this.apiService.getUrl(API_PATH).subscribe( data => { + console.log(data['results']); SELF.updateLeaderboardResults(data['results'], SELF); + SELF.startLeaderboard(phaseSplitId); }, err => { SELF.globalService.handleApiError(err); @@ -329,4 +337,43 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { } ); } + + startLeaderboard(phaseSplitId) { + const API_PATH = this.endpointsService.challengeLeaderboardURL(phaseSplitId); + const SELF = this; + setInterval(function() { + SELF.apiService.getUrl(API_PATH, true, false).subscribe( + data => { + if (SELF.leaderboard.length !== data['results'].length) { + SELF.showLeaderboardUpdate = true; + } + }, + err => { + SELF.globalService.handleApiError(err); + }, + () => { + console.log('Fetched leaderboard for split:', phaseSplitId); + } + ); + }, 5000); + } + + refreshLeaderboard() { + const API_PATH = this.endpointsService.challengeLeaderboardURL(this.selectedPhaseSplit['id']); + const SELF = this; + SELF.leaderboard = []; + SELF.apiService.getUrl(API_PATH).subscribe( + data => { + SELF.leaderboard = data['results']; + SELF.showLeaderboardUpdate = false; + SELF.startLeaderboard(SELF.selectedPhaseSplit['id']); + }, + err => { + SELF.globalService.handleApiError(err); + }, + () => { + console.log('Fetched leaderboard for split:', SELF.selectedPhaseSplit['id']); + } + ); + } } diff --git a/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html b/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html index ce896dc3a..799fec7de 100644 --- a/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html +++ b/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html @@ -1,8 +1,46 @@ -
-
- -
- Please select a phase. +
+
+
+
+ Page is Outdated, Click to update  +
+
+
+ Please select a phase to get list of submissions! +
+
+
+
+ + +
+
+
+
+ + File + + {{key.name}} + + +
+
+ Download +
+
+
+ + + Total Submissions Done: + + + + {{submissionCount|| 0}} + +
+
+
diff --git a/src/app/components/challenge/challengesubmissions/challengesubmissions.component.ts b/src/app/components/challenge/challengesubmissions/challengesubmissions.component.ts index 3ca323ca6..9e0277a62 100644 --- a/src/app/components/challenge/challengesubmissions/challengesubmissions.component.ts +++ b/src/app/components/challenge/challengesubmissions/challengesubmissions.component.ts @@ -87,6 +87,35 @@ export class ChallengesubmissionsComponent implements OnInit, AfterViewInit { */ submissionHighlighted: any = null; + /** + * Download file types + */ + fileTypes = [{ 'name': 'csv' }]; + + /** + * Selected file type + */ + fileSelected = ''; + + /** + * Phase selection type (radio button or select box) + */ + phaseSelectionType = 'selectBox'; + + /** + * Select box list type + */ + phaseSelectionListType = 'phase'; + + /** + * @param showPagination Is pagination + * @param paginationMessage Pagination message + * @param isPrev Previous page state + * @param isNext Next page state + * @param currentPage Current Page number + */ + paginationDetails: any = {}; + /** * Constructor. * @param route ActivatedRoute Injection. diff --git a/src/app/components/challenge/challengesubmit/challengesubmit.component.html b/src/app/components/challenge/challengesubmit/challengesubmit.component.html index 9073fc49d..4fb56d684 100644 --- a/src/app/components/challenge/challengesubmit/challengesubmit.component.html +++ b/src/app/components/challenge/challengesubmit/challengesubmit.component.html @@ -13,15 +13,135 @@
-
-
Please fill the following fields to submit
-
-
- -
-
- Today's Remaining Submissions: - {{selectedPhaseSubmissions['remaining_submissions_today_count']}} +
+
+ +
+ + Submission limits +

+ + Team name: {{phaseRemainingSubmissions.participant_team}} + + + + + + + + + + + + + + + + + + +
Phase detailsRemaining submissionsSubmission command
{{key.name}} +
+ Start date: {{key.start_date | date:'medium'}} +
+ End date: {{key.end_date | date:'medium'}} +
+ + Today: + + {{key.limits.remaining_submissions_today_count}}
+ + This month: + + {{key.limits.remaining_submissions_this_month_count}}
+ + Total: + + {{key.limits.remaining_submissions_count}} +
+ {{key.limits.message}}
Next submission will be available in
+
+ {{phaseRemainingSubmissionsCountdown[key.id].days}} + Days, {{phaseRemainingSubmissionsCountdown[key.id].hours}} + hours : {{phaseRemainingSubmissionsCountdown[key.id].minutes}} minutes : + {{phaseRemainingSubmissionsCountdown[key.id].seconds}} seconds +
+
+ {{key.limits.message}}
+ + {{key.limits.maxExceededMessage}} + +
+ $ evalai push <image>:<tag> --phase {{key.slug}} + +
+
+ +
+
+ + Please fill the following fields to submit + +
+
+
+
+
    + Select phase: + + +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + {{submissionError}}

    +
    + +
    Total Remaining Submissions: diff --git a/src/app/components/challenge/challengesubmit/challengesubmit.component.ts b/src/app/components/challenge/challengesubmit/challengesubmit.component.ts index cb01ea103..fbbe694d7 100644 --- a/src/app/components/challenge/challengesubmit/challengesubmit.component.ts +++ b/src/app/components/challenge/challengesubmit/challengesubmit.component.ts @@ -66,6 +66,21 @@ export class ChallengesubmitComponent implements OnInit { */ selectedPhase = null; + /** + * Cli version + */ + cliVersion = ''; + + /** + * Auth token + */ + authToken = ''; + + /** + * Phase selection type (radio button or select box) + */ + phaseSelectionType = 'radioButton'; + /** * Submissions remaining for the selected phase */ diff --git a/src/app/components/utility/selectphase/selectphase.component.html b/src/app/components/utility/selectphase/selectphase.component.html index 6c560a3a4..b914407ce 100644 --- a/src/app/components/utility/selectphase/selectphase.component.html +++ b/src/app/components/utility/selectphase/selectphase.component.html @@ -17,5 +17,61 @@
    End Date: {{getFormattedDate(item['end_date'])}}
-
-
+ +
+ + + + + + Phase + + + {{phaseName}} + + + Private + + + + + {{key.name}} + + + Private + + + + + + + + + + Challenge Phase + + + + Phase:{{phaseName}}, + Split: {{splitName}}   + + + + Private + + + + + + Phase:{{key.challenge_phase_name}}, + Split: {{key.dataset_split_name}}   + + + + Private + + + + + + diff --git a/src/app/components/utility/selectphase/selectphase.component.ts b/src/app/components/utility/selectphase/selectphase.component.ts index 6087e0569..dc2c07ca2 100644 --- a/src/app/components/utility/selectphase/selectphase.component.ts +++ b/src/app/components/utility/selectphase/selectphase.component.ts @@ -28,6 +28,40 @@ export class SelectphaseComponent implements OnInit, OnChanges { * Currently selected phase */ selectedPhase: any = null; + /** + * Selected phase split callback + */ + @Input() phaseSplitSelected: any; + + /** + * Phase selection type (radio button or select box) + */ + @Input() phaseSelectionType: string; + + /** + * Phase selection list type (phase or phase split) + */ + @Input () phaseSelectionListType: string; + + /** + * Selected phase name + */ + phaseName = ''; + + /** + * Selected split name + */ + splitName = ''; + + /** + * Selected phase split + */ + selectedPhaseSplit = ''; + + /** + * Selected phase visibility + */ + phaseVisibility = false; /** * Router public instance @@ -94,6 +128,20 @@ export class SelectphaseComponent implements OnInit, OnChanges { this.phaseSelected(phase); } + /** + * Select a particular phase split. + * @param phase phase split to be selected. + */ + selectPhaseSplit(phaseSplit, phaseSelectionType, phaseSelectionListType) { + this.phaseSelectionType = phaseSelectionType; + this.phaseSelectionListType = phaseSelectionListType; + this.selectedPhaseSplit = phaseSplit; + this.phaseName = phaseSplit.challenge_phase_name; + this.splitName = phaseSplit.dataset_split_name; + this.phaseVisibility = phaseSplit.showPrivate; + this.phaseSplitSelected(phaseSplit); + } + /** * Get 12Hour formatted date function. */ diff --git a/src/app/services/api.service.ts b/src/app/services/api.service.ts index 7579776ef..39ab44e49 100644 --- a/src/app/services/api.service.ts +++ b/src/app/services/api.service.ts @@ -42,10 +42,10 @@ export class ApiService { * @param path path of API call. * @param isJson set to false when fetching some non-JSON content. */ - getUrl(path: string, isJson = true) { + getUrl(path: string, isJson = true, isLoader = true) { if (isJson) { this.prepareHttpOptions(); - return this.loadingWrapper(this.http.get(this.API + path, this.HTTP_OPTIONS)); + return this.loadingWrapper(this.http.get(this.API + path, this.HTTP_OPTIONS), isLoader); } else { this.prepareHttpOptions(true); const TEMP = Object.assign({}, this.HTTP_OPTIONS, { observe: 'response', responseType: 'text' }); @@ -107,9 +107,12 @@ export class ApiService { * @param path path of API call. * @param body stringified json body. */ - loadingWrapper(httpCall) { + loadingWrapper(httpCall, isLoader = true) { const SELF = this; - setTimeout(() => {this.globalService.toggleLoading(true); }, 100); + console.log(isLoader); + if (isLoader) { + setTimeout(() => {this.globalService.toggleLoading(true); }, 100); + } let success = (params) => {}; let error = (params) => {}; let final = () => {}; diff --git a/src/styles/base.scss b/src/styles/base.scss index 6b9029278..a2b062b7e 100644 --- a/src/styles/base.scss +++ b/src/styles/base.scss @@ -28,6 +28,15 @@ body { -webkit-animation-fill-mode: forwards; } +.rm-margin { + margin: 0px; +} + +.result-wrn { + margin-top: 15px; + margin-bottom: 20px; +} + @@ -127,6 +136,612 @@ body { } +/* Angular material select styles */ +mat-label { + color: rgba(0,0,0,0.38); + font-size: 15px; +} + +.mat-form-field-appearance-legacy .mat-form-field-underline { + background-color: rgba(0,0,0,0.12) !important; +} + +.phase-select-box { + .mat-form-field-infix { + width: 478px !important; + } +} + +.mat-select-trigger { + line-height: 24px; + letter-spacing: 0.1px; + font-size: 15px; + color: rgba(0, 0, 0, 0.87); +} + +@include screen-medium { + .phase-select-box { + .mat-form-field-infix { + width: 400px !important; + } + } +} + +@include screen-small-medium { + .phase-select-box { + .mat-form-field-infix { + width: 300px !important; + } + } +} + +@include screen-small { + .phase-select-box { + .mat-form-field-infix { + width: 220px !important; + } + } +} + +.file-select-box { + .mat-form-field-infix { + width: 61px !important; + } +} + +.all-submissions-file { + .mat-form-field-infix { + width: 144px !important; + } +} + +.custom-field-export { + .mat-form-field-infix { + width: 311px !important; + } +} + +@include screen-medium { + .download-submissions { + margin-left: 50px; + } + + .custom-field-export { + .mat-form-field-infix { + width: 270px !important; + } + } + + .all-submissions-file { + .mat-form-field-infix { + width: 110px !important; + } + } +} + +@include screen-small-medium { + .download-submissions { + margin-left: 40px; + } + + .custom-field-export { + .mat-form-field-infix { + width: 195px !important; + } + } + + .all-submissions-file { + .mat-form-field-infix { + width: 75px !important; + } + } +} + + +/**Rich text editor styles*/ +.reusable-editor.fr-box.fr-basic .fr-element { + height: 320px; +} + +.edit-phase-editor.fr-box.fr-basic .fr-element { + height: 220px; +} + +.second-toolbar a { + display: none; +} + +.editor-validation-message { + color: $highlight; + margin-bottom: 20px; +} + +/* Chip Styles */ +mat-chip-list { + display: inline-block; +} + +mat-chip { + color: #fff !important; + background: $yellow !important; + border-radius: 2px !important; + min-height: 25px !important; +} + + + +/* Refresh list page */ +.update-page { + display: block; + background: $dark-gray; + width: 100%; + overflow: auto; + padding: 10px; + text-align: center; + color: #fff; + position: absolute; + width: auto; + right: 0; + padding: 10px 30px; + box-shadow: 2px 2px 9px #6d6d6d; + border-radius: 3px 0px 0px 3px; + font-weight: 300; + transition: all 0.2s ease-in-out; + &:hover { + box-shadow: -1px 0px 9px #bbbbbb; + } +} + + +/*card styles*/ + +.ev-card-panel { + position: relative; + display: block; + background-color: #fff; + width: 100%; + height: auto; + border-radius: 10px; + overflow: hidden; + box-shadow: 0px 0px 12px $shadow-black; +} + +.ev-md-container { + padding: 30px 40px 40px 40px; +} + +.bottom-card-container { + padding: 40px; +} + +.card-bt-margin { + margin-bottom: 20px; +} + +.bottom-hr-line { + border-bottom: 1px solid $gray; +} + +.ev-card-body { + padding: 10px 30px; +} + + +/* ul list styles */ + +ul { + list-style-type: none; +} + +.exist-team-card ul.collapsible { + border: 0; + box-shadow: none; +} +.exist-team-card ul.collapsible li { + box-shadow: 0 0 5px #e0e0e0; +} +.exist-team-card ul li { + margin: 20px 0px; + min-height: 40px; +} +.exist-team-card ul li .collapsible-header { + border-bottom: 0; + line-height: initial; + min-height: initial; + padding: 10px 5px; +} +.exist-team-card ul li .collapsible-header i { + display: inline-block; + float: none; + font-size: initial; + line-height: 40px; + margin-right: 0; + text-align: center; + width: 2rem; +} +.exist-team-card ul li .collapsible-body { + background-color: #fafafa; + border-top: 1px solid #e0e0e0; + padding: 10px 40px; +} +.exist-team-card ul li .collapsible-body p { + padding: 3px 0; +} +.exist-team-card i.list-icon { + line-height: 25px; +} + + +/*grad button style*/ + +.grad-btn { + border-radius: 20px; +} + +.grad-rec-btn { + border-radius: 2px !important; +} + +.grad-btn-dark { + background: $med-gray; + font-weight: $fw-regular; + color: #fff; + box-shadow: 0px 4px 8px $gray-dark; + &:hover { + box-shadow: 0px 0px 8px $gray-dark; + } +} + +.grad-btn-light { + background: $highlight; + font-weight: $fw-regular; + color: #fff; + box-shadow: 0px 4px 8px $gray-dark; + &:hover { + box-shadow: 0px 0px 8px $gray-dark; + background: $highlight; + } +} + +.grad-btn-transparent { + background-color: rgba(0,0,0,0) !important; + font-weight: $fw-regular; + color: $med-gray; + border: 1px solid $med-gray !important; + box-shadow: 0px 4px 8px transparent; + &:hover { + box-shadow: 0px 0px 8px $gray-dark !important; + background: $med-gray !important; + color: #fff; + } +} + +.btn-waves-effect { + padding: 13px 33px 13px 33px; + border: none; + position: relative; + cursor: pointer; + display: inline-block; + overflow: hidden; + user-select: none; + -webkit-tap-highlight-color: transparent; + vertical-align: middle; + z-index: 1; + will-change: opacity, transform; + transition: .3s ease-out; +} + +.ev-btn-dark { + background: #252833; +} + +.ev-file-btn-dark { + padding: 0 32px; + border: none; + background: #252833; +} + + .ev-btn-dark:hover { + background: #3c3e49; +} + + +/* checkbox styles */ +[type="checkbox"] + label { + position: relative; + padding-left: 35px; + cursor: pointer; + display: inline-block; + height: 25px; + line-height: 25px; + font-size: 1rem; + -webkit-user-select: none; + -moz-user-select: none; + -khtml-user-select: none; + -ms-user-select: none; +} + +[type="checkbox"]:not(:checked), [type="checkbox"]:checked { + position: absolute; + left: -9999px; + opacity: 0; +} + +input[type="checkbox"] { + box-sizing: border-box; + padding: 0; +} + +input[type=checkbox]+label { + color: $light-gray; + font-size: 0.8em; + font-weight: 400; +} + +input[type=checkbox].filled-in:checked+label:after { + width: 17px; + height: 17px; + border: 1px solid #ffaf4b; + background-color: #ffaf4b; +} + +[type="checkbox"].filled-in:checked + label:after { + top: 0; + width: 20px; + height: 20px; + border: 2px solid #26a69a; + background-color: #26a69a; + z-index: 0; +} + +[type="checkbox"].filled-in:checked + label:before { + top: 0; + left: 1px; + width: 8px; + height: 13px; + border-top: 2px solid transparent; + border-left: 2px solid transparent; + border-right: 2px solid #fff; + border-bottom: 2px solid #fff; + -webkit-transform: rotateZ(37deg); + transform: rotateZ(37deg); + -webkit-transform-origin: 100% 100%; + transform-origin: 100% 100%; +} + +[type="checkbox"].filled-in + label:before, [type="checkbox"].filled-in + label:after { + content: ''; + left: 0; + position: absolute; + transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s; + z-index: 1; +} +[type="checkbox"].filled-in + label:after { + border-radius: 2px; +} + +input[type="checkbox"].filled-in:checked+label:after { + width: 17px; + height: 17px; + border: 1px solid $yellow; + background-color: $yellow; +} + +input[type="checkbox"]+label { + padding-left: 24px; + line-height: 20px; +} + +input[type="checkbox"].filled-in:checked+label:before { + top: 0; + left: 2px; + width: 5px; + height: 11px; +} + +input[type="checkbox"].filled-in:not(:checked)+label:after { + width: 17px; + height: 17px; + border: 1px solid $light-gray; + background-color: transparent; +} + +[type="checkbox"].filled-in:not(:checked) + label:before { + /* width: 0; */ + /* height: 0; */ + border: 3px solid transparent; + /* left: 6px; */ + /* top: 10px; */ + -webkit-transform: rotateZ(37deg); + transform: rotateZ(37deg); + -webkit-transform-origin: 20% 40%; + transform-origin: 100% 100%; +} + +[type="checkbox"].filled-in + label:before, [type="checkbox"].filled-in + label:after { + content: ''; + left: 0; + position: absolute; + transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s; + z-index: 1; +} +[type="checkbox"] + label:before, [type="checkbox"]:not(.filled-in) + label:after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 18px; + height: 18px; + z-index: 0; + border: 2px solid #5a5a5a; + border-radius: 1px; + margin-top: 2px; + transition: .2s; +} +*, *:before, *:after { + box-sizing: inherit; +} +input[type=checkbox].filled-in:not(:checked)+label:after { + width: 17px; + height: 17px; + border: 1px solid #adb4d0; + background-color: transparent; +} +[type="checkbox"].filled-in:not(:checked) + label:after { + height: 20px; + width: 20px; + background-color: transparent; + border: 2px solid #5a5a5a; + top: 0px; + z-index: 0; +} +[type="checkbox"].filled-in + label:before, [type="checkbox"].filled-in + label:after { + content: ''; + left: 0; + position: absolute; + transition: border .25s, background-color .25s, width .20s .1s, height .20s .1s, top .20s .1s, left .20s .1s; + z-index: 1; +} +[type="checkbox"].filled-in + label:after { + border-radius: 2px; +} + + + +/* radio button styles */ +[type=radio]:not(:checked), [type=radio]:checked { + position: absolute; + left: -9999px; + opacity: 0; +} + +[type=radio]:not(:checked) + label, [type=radio]:checked + label { + position: relative; + padding-left: 35px; + cursor: pointer; + display: inline-block; + height: 25px; + line-height: 25px; + font-size: 1rem; + transition: .28s ease; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +label { + font-size: 0.8rem; + color: #9e9e9e; +} + +[type=radio]:checked + label:after, +[type=radio].with-gap:checked + label:before, +[type=radio]:not(:checked) + label:before, +[type=radio]:not(:checked) + label:after { + border: 2px solid #5a5a5a; +} +[type=radio]:not(:checked) + label:before, +[type=radio]:not(:checked) + label:after, +[type=radio].with-gap:checked + label:before, +[type=radio].with-gap:checked + label:after { + border-radius: 50%; +} +[type=radio]:checked + label:before { + border: 2px solid transparent; +} +[type=radio] + label:before, +[type=radio] + label:after { + content: ''; + position: absolute; + left: 0; + top: 0; + margin: 4px; + width: 16px; + height: 16px; + z-index: 0; + transition: .28s ease; +} + +[type=radio].with-gap:checked + label:after { + -webkit-transform: scale(0.5); + transform: scale(0.5); +} + +[type=radio].with-gap:checked + label:after { + background-color: #252833; +} + +[type=radio]:checked + label:after, +[type=radio].with-gap:checked + label:before, +[type=radio].with-gap:checked + label:after { + border: 2px solid #252833; +} + +[type=radio]:checked + label:after { + -webkit-transform: scale(1.02); + transform: scale(1.02); +} + +[type=radio] + label:before, +[type=radio] + label:after { + content: ''; + position: absolute; + left: 0; + top: 0; + margin: 4px; + width: 16px; + height: 16px; + z-index: 0; + transition: .28s ease; +} + +*, *:before, *:after { + box-sizing: inherit; +} + +.radio-button-text { + width: calc(100% - 35px); + float: right; +} + + +/*icon colors*/ + +.red-text { + color: #F44336; +} + +.blue-text { + color: #2196F3 !important; +} + +.green-text { + color: #4CAF50; +} + +.text-highlight { + color: $yellow; +} + +.orange-background { + background-color: #ffaf4b !important; +} + +.submitted, +.finished { + color: #4CAF50; +} + +.running, +.submitting { + color: orange; +} + +.failed, +.cancelled { + color: red; +} /*anchors*/ From 6039fe7da5352ec1fa10216185d06f3570155052 Mon Sep 17 00:00:00 2001 From: Sanji515 Date: Sat, 20 Jul 2019 16:06:07 +0530 Subject: [PATCH 2/8] resolved final conflicts --- .../challengeleaderboard.component.html | 6 +++--- .../challengeleaderboard/challengeleaderboard.component.ts | 4 ---- .../challengesubmissions.component.html | 1 + .../challengesubmit/challengesubmit.component.html | 1 + .../challenge/challengesubmit/challengesubmit.component.ts | 5 +++++ .../challengeviewallsubmissions.component.html | 1 + .../challengeviewallsubmissions.component.ts | 5 +++++ 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html index 1e73b571c..f6bfb339d 100644 --- a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html +++ b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.html @@ -1,11 +1,11 @@
-
+
Description
-
+
@@ -13,7 +13,7 @@ Page is Outdated, Click to update 
-
+
Please select from following phases!
diff --git a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts index 7a723d065..c06e0c964 100644 --- a/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts +++ b/src/app/components/challenge/challengeleaderboard/challengeleaderboard.component.ts @@ -190,10 +190,6 @@ export class ChallengeleaderboardComponent implements OnInit, AfterViewInit { if (params['split']) { this.selectedPhaseSplitId = params['split']; this.selectPhaseSplitId(this.selectedPhaseSplitId, this); - } else { - if (this.filteredPhaseSplits.length > 0) { - this.router.navigate([this.filteredPhaseSplits[0]['id']], {relativeTo: this.route}); - } } }); } diff --git a/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html b/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html index ade5eaf93..5f5731cd2 100644 --- a/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html +++ b/src/app/components/challenge/challengesubmissions/challengesubmissions.component.html @@ -15,6 +15,7 @@
diff --git a/src/app/components/challenge/challengesubmit/challengesubmit.component.html b/src/app/components/challenge/challengesubmit/challengesubmit.component.html index 124da6031..d73f18ac2 100644 --- a/src/app/components/challenge/challengesubmit/challengesubmit.component.html +++ b/src/app/components/challenge/challengesubmit/challengesubmit.component.html @@ -156,6 +156,7 @@