Skip to content

Commit cc33af2

Browse files
committed
refactor: remove unused code and prevent icon resizing
1 parent 7a054fc commit cc33af2

1 file changed

Lines changed: 24 additions & 35 deletions

File tree

contentcuration/contentcuration/frontend/shared/views/StudioOfflineAlert.vue

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
:style="computedstyle"
55
data-test="studio-offline-alert"
66
>
7-
<div class="alert-content">
87
<KIcon
98
icon="disconnected"
10-
class="mx-3"
9+
class="kicon-style"
1110
/>
12-
<span class="notranslate">{{ $tr('offlineText') }}</span>
11+
<span>{{ $tr('offlineText') }}</span>
1312
</div>
14-
</div>
1513
</KTransition>
1614
</template>
1715

@@ -32,30 +30,22 @@ export default {
3230
return { sendPoliteMessage };
3331
},
3432
computed: {
35-
...mapState({
36-
offline: state => !state.connection.online,
37-
}),
38-
libraryMode() {
39-
return window.libraryMode;
40-
},
41-
computed: {
42-
...mapState({
43-
offline: state => !state.connection.online,
44-
}),
45-
libraryMode() {
46-
return window.libraryMode;
47-
},
48-
computedstyle() {
49-
return {
50-
position: 'fixed',
51-
top: `${this.offset}px`,
52-
left: '0',
53-
right: '0',
54-
backgroundColor: this.$themeTokens.surface,
55-
zIndex: 16,
56-
};
57-
},
58-
},
33+
...mapState({
34+
offline: state => !state.connection.online,
35+
}),
36+
libraryMode() {
37+
return window.libraryMode;
38+
},
39+
computedstyle() {
40+
return {
41+
position: 'fixed',
42+
top: `${this.offset}px`,
43+
left: '0',
44+
right: '0',
45+
backgroundColor: this.$themeTokens.surface,
46+
zIndex: 16,
47+
};
48+
},
5949
},
6050
watch: {
6151
offline(newVal) {
@@ -81,12 +71,11 @@ export default {
8171
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
8272
}
8373
84-
.alert-content {
85-
display: flex;
86-
align-items: center;
74+
.kicon-style {
75+
margin-left: 3px;
76+
margin-right: 6px;
77+
flex-shrink: 0;
8778
}
8879
89-
.alert-content span {
90-
vertical-align: bottom;
91-
}
92-
</style>
80+
81+
</style>

0 commit comments

Comments
 (0)