Skip to content

Commit

Permalink
fix: api-history req method text color
Browse files Browse the repository at this point in the history
  • Loading branch information
buqiyuan committed Aug 9, 2022
1 parent 1a62852 commit 09809d1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<section class="flex-1 px-2 overflow-auto">
<div *ngFor="let item of historyList" class="flex items-center h-8 p-2 text-xs cursor-pointer hover:bg-gray-100"
(click)="gotoTestHistory(item)">
<span class="block w-12 font-light method_type" [ngClass]="methodColor(item.request.method)">{{
<span class="block w-12 font-light method_type" [ngClass]="'method_text_' + item.request.method">{{
item.request.method
}}</span>
<span class="flex-1 overflow-hidden text-gray-600 truncate">{{ item.request.uri }}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
.method_type {
&.green {
color: green
.method_text_GET {
color: var(--BLUE_TAG_BG);
}
&.red {
color: red
.method_text_POST {
color: var(--GREEN_TAG_BG);
}
&.blue {
color: blue
.method_text_DELETE {
color: var(--RED_TAG_BG);
}
&.pink {
color: pink
.method_text_HEAD {
color: var(--YELLOW_TAG_BG);
}
.method_text_PATCH {
color: var(--ORANGE_TAG_BG);
}
.method_text_PUT,
.method_text_OPTIONS {
color: var(--BLACK_TAG_BG);
}
}

.icon {
width: 30px;
Expand All @@ -30,4 +35,4 @@
}
.history-body {
height: calc(100vh - 115px);
}
}

0 comments on commit 09809d1

Please sign in to comment.