feat: alert UI refactor

This commit is contained in:
Alisa | Side.one 2023-05-07 08:07:19 +08:00
parent dd78fe1218
commit da13d37284
2 changed files with 11 additions and 9 deletions

View File

@ -59,7 +59,7 @@ const statusMap: Record<string, string> = {
: 'text-info' : 'text-info'
" "
> >
<divÏ <div
class="w-1 h-1 rounded-full mr-2" class="w-1 h-1 rounded-full mr-2"
:class=" :class="
statusMap?.[item?.status] === 'PASSED' statusMap?.[item?.status] === 'PASSED'
@ -68,7 +68,7 @@ const statusMap: Record<string, string> = {
? 'bg-no' ? 'bg-no'
: 'bg-info' : 'bg-info'
" "
></divÏ> ></div>
<div class="text-xs"> <div class="text-xs">
{{ statusMap?.[item?.status] || item?.status }} {{ statusMap?.[item?.status] || item?.status }}
</div> </div>

View File

@ -39,7 +39,7 @@ const format = useFormatter();
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="item in store.recents"> <tr v-for="(item,index) of store.recents" :key="index">
<td class="text-sm text-primary"> <td class="text-sm text-primary">
<RouterLink <RouterLink
:to="`/${props.chain}/block/${item.block?.header?.height}`" :to="`/${props.chain}/block/${item.block?.header?.height}`"
@ -70,7 +70,7 @@ const format = useFormatter();
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="item in store.txsInRecents"> <tr v-for="(item,index) of store.txsInRecents" :key="index">
<td> <td>
<RouterLink :to="`/${props.chain}/tx/${item.hash}`">{{ <RouterLink :to="`/${props.chain}/tx/${item.hash}`">{{
item.hash item.hash
@ -82,11 +82,13 @@ const format = useFormatter();
</tbody> </tbody>
</table> </table>
<div class="p-4"> <div class="p-4">
<v-alert <div class="alert relative bg-transparent">
type="info" <div class="alert absolute inset-x-0 inset-y-0 w-full h-full bg-info opacity-10"></div>
text="Only show txs in recent blocks" <div class="text-info">
variant="tonal" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
></v-alert> <span>Only show txs in recent blocks</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>