Skip to content

Commit 637ea11

Browse files
committed
style: enhance UI components with improved animations, layout, and styling across network activity views
1 parent a0c1315 commit 637ea11

File tree

6 files changed

+257
-93
lines changed

6 files changed

+257
-93
lines changed

packages/extension/src/ui/action/views/network-activity/components/network-activity-action.vue

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -49,75 +49,110 @@ defineEmits<{
4949
}>();
5050
</script>
5151

52-
<style lang="less">
52+
<style lang="less" scoped>
5353
@import '@action/styles/theme.less';
5454
55+
@keyframes fadeInUp {
56+
from {
57+
opacity: 0;
58+
transform: translateY(8px);
59+
}
60+
to {
61+
opacity: 1;
62+
transform: translateY(0);
63+
}
64+
}
65+
5566
.network-activity {
5667
&__action {
57-
padding: 4px 16px 8px 16px;
68+
padding: 4px 20px 12px 20px;
5869
box-sizing: border-box;
70+
animation: fadeInUp 0.3s ease-out;
71+
animation-delay: 50ms;
72+
animation-fill-mode: backwards;
5973
6074
&-wrap {
6175
width: 100%;
6276
height: 72px;
63-
left: 12px;
64-
top: 0px;
65-
border-radius: 12px;
77+
border-radius: 14px;
6678
display: flex;
6779
justify-content: space-between;
6880
align-items: center;
6981
flex-direction: row;
7082
gap: 8px;
71-
button {
83+
background: @white;
84+
padding: 6px;
85+
box-sizing: border-box;
86+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
87+
border: 1px solid rgba(0, 0, 0, 0.06);
88+
89+
button,
90+
a {
7291
color: inherit;
7392
font: inherit;
7493
cursor: pointer;
7594
outline: inherit;
76-
border: inherit;
95+
border: none;
96+
background: transparent;
7797
}
7898
}
99+
79100
&-item {
80-
background: @primary007;
81-
display: block;
101+
background: rgba(0, 0, 0, 0.03);
102+
display: flex;
82103
text-align: center;
83104
text-decoration: none;
84105
font-style: normal;
85-
font-weight: 400;
106+
font-weight: 500;
86107
font-size: 12px;
87108
line-height: 16px;
88-
text-align: center;
89-
letter-spacing: 0.5px;
109+
letter-spacing: 0.3px;
90110
color: @primaryLabel;
91111
cursor: pointer;
92-
height: 72px;
93-
display: flex;
112+
height: 60px;
94113
justify-content: center;
95114
align-items: center;
96115
flex-direction: column;
97116
flex: 1;
98-
min-width: 100px;
117+
min-width: 0;
99118
max-width: 100%;
100-
transition: background 300ms ease-in-out;
101-
border-radius: 12px;
119+
transition: all 0.2s ease-in-out;
120+
border-radius: 10px;
121+
border: none;
102122
103123
&:hover {
104-
background: @black004;
124+
background: rgba(98, 126, 234, 0.1);
125+
}
126+
127+
&:active {
128+
background: rgba(98, 126, 234, 0.15);
105129
}
106130
107131
svg {
108-
margin-bottom: 0;
109-
margin-bottom: 2px;
132+
margin-bottom: 4px;
133+
opacity: 0.85;
110134
}
135+
111136
&:focus {
112-
outline: -webkit-focus-ring-color auto 1px !important;
113-
outline-offset: 2px !important;
137+
outline: none;
138+
}
139+
140+
// Reset any router-link active styles
141+
&.router-link-active,
142+
&.router-link-exact-active {
143+
background: rgba(0, 0, 0, 0.03);
144+
145+
&:hover {
146+
background: rgba(98, 126, 234, 0.1);
147+
}
114148
}
115149
}
150+
116151
&-divider {
117152
height: 48px;
118153
width: 1px;
119-
background: @darkBg;
120-
margin: 0 4px 0 4px;
154+
background: rgba(0, 0, 0, 0.08);
155+
margin: 0 4px;
121156
}
122157
}
123158
}

packages/extension/src/ui/action/views/network-activity/components/network-activity-loading.vue

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,18 @@ defineProps({
1212
isEmpty: Boolean,
1313
});
1414
</script>
15-
<style lang="less">
15+
<style lang="less" scoped>
1616
@import '@action/styles/theme.less';
1717
18+
@keyframes fadeIn {
19+
from {
20+
opacity: 0;
21+
}
22+
to {
23+
opacity: 1;
24+
}
25+
}
26+
1827
.network-activity {
1928
&__loading {
2029
width: 100%;
@@ -25,20 +34,26 @@ defineProps({
2534
flex-direction: column;
2635
padding-bottom: 56px;
2736
box-sizing: border-box;
37+
animation: fadeIn 0.4s ease-out;
2838
2939
svg {
30-
margin-bottom: 8px;
40+
margin-bottom: 12px;
41+
opacity: 0.7;
3142
}
3243
3344
p {
3445
font-style: normal;
35-
font-weight: 400;
46+
font-weight: 500;
3647
font-size: 14px;
37-
line-height: 20px;
38-
letter-spacing: 0.25px;
48+
line-height: 22px;
49+
letter-spacing: 0.2px;
3950
color: @tertiaryLabel;
4051
margin: 0;
4152
text-align: center;
53+
padding: 16px 32px;
54+
background: rgba(0, 0, 0, 0.02);
55+
border-radius: 12px;
56+
border: 1px dashed rgba(0, 0, 0, 0.08);
4257
}
4358
}
4459
}

packages/extension/src/ui/action/views/network-activity/components/network-activity-total.vue

Lines changed: 47 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,58 +67,88 @@ onBeforeMount(() => {
6767
});
6868
</script>
6969

70-
<style lang="less">
70+
<style lang="less" scoped>
7171
@import '@action/styles/theme.less';
7272
73+
@keyframes fadeIn {
74+
from {
75+
opacity: 0;
76+
}
77+
to {
78+
opacity: 1;
79+
}
80+
}
81+
7382
.network-activity {
7483
&__total-error {
75-
padding: 0 20px 12px 20px;
84+
padding: 0 24px 12px 24px;
85+
animation: fadeIn 0.3s ease-out;
7686
7787
h3 {
88+
margin: 0;
89+
font-size: 14px;
90+
line-height: 20px;
91+
7892
span {
7993
color: @error;
94+
font-weight: 500;
8095
}
8196
}
8297
}
98+
8399
&__total {
84-
padding: 0 20px 12px 20px;
100+
padding: 0 24px 12px 24px;
101+
animation: fadeIn 0.3s ease-out;
85102
86103
h3 {
87104
font-style: normal;
88105
font-weight: 700;
89-
font-size: 24px;
90-
line-height: 32px;
91-
color: @primaryLabel;
106+
font-size: 28px;
107+
line-height: 36px;
108+
background: linear-gradient(135deg, #627eea 0%, #8a64dc 100%);
109+
-webkit-background-clip: text;
110+
-webkit-text-fill-color: transparent;
111+
background-clip: text;
92112
margin: 0;
93113
94114
span {
95-
font-variant: small-caps;
115+
font-size: 18px;
116+
font-weight: 600;
117+
background: linear-gradient(
118+
135deg,
119+
rgba(98, 126, 234, 0.7) 0%,
120+
rgba(138, 100, 220, 0.7) 100%
121+
);
122+
-webkit-background-clip: text;
123+
background-clip: text;
96124
}
97125
}
98126
99127
p {
100128
font-style: normal;
101-
font-weight: 400;
102-
font-size: 16px;
103-
line-height: 24px;
129+
font-weight: 500;
130+
font-size: 15px;
131+
line-height: 22px;
104132
color: @secondaryLabel;
105-
margin: 0;
133+
margin: 4px 0 0 0;
106134
}
107135
}
108136
109137
&__loader-one {
110-
width: 100px;
111-
height: 18px;
112-
margin-bottom: 13px;
113-
margin-top: 6px;
138+
width: 120px;
139+
height: 20px;
140+
margin-bottom: 12px;
141+
margin-top: 4px;
114142
display: block !important;
143+
border-radius: 6px;
115144
}
116145
117146
&__loader-two {
118-
width: 70px;
119-
height: 13px;
147+
width: 80px;
148+
height: 14px;
120149
display: block !important;
121150
margin-bottom: 6px;
151+
border-radius: 4px;
122152
}
123153
}
124154
</style>

0 commit comments

Comments
 (0)