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

More changes required for rust apiview #9808

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@
background: url(/icons/typespec-original.svg) center center no-repeat;
}

.icon-rust {
@extend .icon-language;
background: var(--rust-icon)
}

.icon-comments {
cursor: pointer;
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
--java-anotation-name-color: #9E880D;
--java-string-literal-color: #067D17;
--java-number-color: #1750EB;
--rust-icon: url(/icons/rust-original.svg) center center no-repeat;
--alert-success-color: #0a3622;
--alert-success-bg: #d1e7dd;
--alert-success-border-color: #a3cfbb;
Expand Down Expand Up @@ -151,6 +152,7 @@
--java-anotation-name-color: #BBB529;
--java-string-literal-color: #6A8759;
--java-number-color: #6897BB;
--rust-icon: url(/icons/rust-light-original.svg) center center no-repeat;
--alert-success-color: #75b798;
--alert-success-bg: #051b11;
--alert-success-border-color: #0f5132;
Expand Down Expand Up @@ -244,6 +246,7 @@
--java-anotation-name-color: #BBB529;
--java-string-literal-color: #6A8759;
--java-number-color: #6897BB;
--rust-icon: url(/icons/rust-light-original.svg) center center no-repeat;
--alert-success-color: #75b798;
--alert-success-bg: #051b11;
--alert-success-border-color: #0f5132;
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.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[style]="{ height: 'calc(100vh - 80px)', border: '0px' }">
<ng-template pTemplate>
<div class="col flex align-items-center justify-content-center border rounded-start overflow-hidden">
<app-reviews-list (reviewEmitter)="getRevisions($event)"></app-reviews-list>
<app-reviews-list [userProfile]="userProfile" (reviewEmitter)="getRevisions($event)"></app-reviews-list>
</div>
</ng-template>
<ng-template pTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<p-multiSelect [ngModel]="value" [appendTo]="reviewsTable" [options]="languages" [filter]="false" [(ngModel)]="selectedLanguages" (onChange)="filter($event.value)" optionLabel="label">
<ng-template let-option pTemplate="item">
<div class="inline-block vertical-align-middle">
<img [alt]="" src="{{assetsPath}}/images/{{ option.label | languageNames }}-original.svg" width="24" class="vertical-align-middle" />
<img [alt]="" src="{{assetsPath}}/images/{{ option.label | languageNames: userProfile?.preferences?.theme }}-original.svg" width="24" class="vertical-align-middle" />
<span class="mx-2 mt-1">{{ option.label }}</span>
</div>
</ng-template>
Expand All @@ -63,7 +63,7 @@
<ng-template pTemplate="body" let-review>
<tr [pContextMenuRow]="review" [pSelectableRow]="review">
<td>
<img class="ms-3" src="{{assetsPath}}/images/{{ review.language | languageNames }}-original.svg" alt="{{review.language}}" width="25">
<img class="ms-3" src="{{assetsPath}}/images/{{ review.language | languageNames: userProfile?.preferences?.theme }}-original.svg" alt="{{review.language}}" width="25">
</td>
<td style="word-wrap: break-word; max-width: 10ch">{{ review.packageName }} <i *ngIf="review.isApproved" class="fas fa-check-circle text-success"></i></td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ElementRef, EventEmitter, OnInit, AfterViewInit, Output, ViewChild, ChangeDetectorRef } from '@angular/core';
import { Component, ElementRef, EventEmitter, OnInit, AfterViewInit, Output, ViewChild, ChangeDetectorRef, Input } from '@angular/core';

import { FirstReleaseApproval, Review, SelectItemModel } from 'src/app/_models/review';
import { ReviewsService } from 'src/app/_services/reviews/reviews.service';
Expand All @@ -7,13 +7,15 @@ import { Table, TableFilterEvent, TableLazyLoadEvent, TableRowSelectEvent } from
import { MenuItem, SortEvent } from 'primeng/api';
import { environment } from 'src/environments/environment';
import { CookieService } from 'ngx-cookie-service';
import { UserProfile } from 'src/app/_models/userProfile';

@Component({
selector: 'app-reviews-list',
templateUrl: './reviews-list.component.html',
styleUrls: ['./reviews-list.component.scss']
})
export class ReviewsListComponent implements OnInit, AfterViewInit {
@Input() userProfile: UserProfile | undefined;
@Output() reviewEmitter : EventEmitter<Review> = new EventEmitter<Review>();
@ViewChild("reviewsTable") reviewsTable!: Table;
@ViewChild("firstReleaseApprovalAllCheck") firstReleaseApprovalAllCheck!: ElementRef<HTMLInputElement>;
Expand Down Expand Up @@ -136,6 +138,7 @@ export class ReviewsListComponent implements OnInit, AfterViewInit {
{ label: "Json", data: "Json" },
{ label: "Kotlin", data: "Kotlin" },
{ label: "Python", data: "Python" },
{ label: "Rust", data: "Rust" },
{ label: "Swagger", data: "Swagger" },
{ label: "Swift", data: "Swift" },
{ label: "TypeSpec", data: "TypeSpec" },
Expand Down
Loading