|
1 | 1 | <template> |
2 | | - <ul class="group pt-4" :class="{ 'disable-wrap': !softWrap, [size]: true, compact }" data-logs> |
| 2 | + <ul |
| 3 | + class="group pt-4" |
| 4 | + :class="{ 'disable-wrap': !softWrap, [size]: true, compact, 'highlight-errors': highlightErrors }" |
| 5 | + data-logs |
| 6 | + > |
3 | 7 | <li |
4 | 8 | v-for="item in messages" |
5 | 9 | ref="list" |
|
83 | 87 | } |
84 | 88 |
|
85 | 89 | /* Written long-hand rather than as odd:/hover: utilities because the order |
86 | | - below is the whole point: hover beats the zebra, and a level tint beats |
87 | | - both, with its own (stronger) hover on top. */ |
| 90 | + below is the whole point: hover has to beat the zebra, and the error tint |
| 91 | + has to beat both. */ |
88 | 92 | &:nth-child(odd) { |
89 | | - background-color: color-mix(in oklab, var(--color-base-content) 4%, transparent); |
| 93 | + background-color: color-mix(in oklab, var(--color-base-content) 2.5%, transparent); |
90 | 94 | } |
91 | 95 |
|
92 | 96 | &:hover { |
93 | 97 | background-color: color-mix(in oklab, var(--color-base-content) 8%, transparent); |
94 | 98 | } |
95 | 99 |
|
| 100 | + &.log-permalink-target { |
| 101 | + @apply bg-secondary/15; |
| 102 | + animation: log-permalink-pulse 1.4s ease-out; |
| 103 | + } |
| 104 | + } |
| 105 | +
|
| 106 | + /* Severity primarily rides on the level rail in LogLevel.vue, so this is a |
| 107 | + hint rather than the signal, and warn does not get one at all: an orange |
| 108 | + wash on a routine retry line was the noisiest thing in the stream. Off by |
| 109 | + choice for anyone who wants the field completely flat. */ |
| 110 | + &.highlight-errors > li { |
96 | 111 | &[data-log-level="error"], |
97 | 112 | &[data-log-level="fatal"] { |
98 | | - background-color: color-mix(in oklab, var(--color-red) 9%, transparent); |
| 113 | + background-color: color-mix(in oklab, var(--color-red) 5%, transparent); |
99 | 114 | } |
100 | 115 |
|
101 | 116 | &[data-log-level="error"]:hover, |
102 | 117 | &[data-log-level="fatal"]:hover { |
103 | | - background-color: color-mix(in oklab, var(--color-red) 15%, transparent); |
104 | | - } |
105 | | -
|
106 | | - &[data-log-level="warn"] { |
107 | | - background-color: color-mix(in oklab, var(--color-orange) 8%, transparent); |
108 | | - } |
109 | | -
|
110 | | - &[data-log-level="warn"]:hover { |
111 | | - background-color: color-mix(in oklab, var(--color-orange) 14%, transparent); |
112 | | - } |
113 | | -
|
114 | | - &.log-permalink-target { |
115 | | - @apply bg-secondary/15; |
116 | | - animation: log-permalink-pulse 1.4s ease-out; |
| 118 | + background-color: color-mix(in oklab, var(--color-red) 12%, transparent); |
117 | 119 | } |
118 | 120 | } |
119 | 121 |
|
|
0 commit comments