Skip to content

Commit cf67b43

Browse files
authored
ADD:Validator Individual Options (#698)
* ADD: Indivisual grafiti for validator added * ADD:Indivisual validator remove * REFACTOR: indivusual remove changed * REFACTOR: css changes * ADD:Indivisual exit chain * ADD:stereum current version to setting page
1 parent da0ef33 commit cf67b43

File tree

13 files changed

+979
-734
lines changed

13 files changed

+979
-734
lines changed
15 KB
Loading

launcher/src/components/UI/node-header/UpdatePanel 2.vue

Lines changed: 0 additions & 600 deletions
This file was deleted.

launcher/src/components/UI/server-connection/DeleteModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="modal-opacity" @click="$emit('removeModal')"></div>
44
<div class="remove-modal-content">
55
<div class="title-box">
6-
<img src="../../../../public/img/icon/form-setup/warning.png" alt="" />
6+
<img src="../../../../public/img/icon/the-staking/stereum-error.png" alt="icon" />
77
</div>
88
<div class="update-message">
99
<span>Do you want to remove the saved connection?</span>

launcher/src/components/UI/setting-page/SettingPanel.vue

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import TaskManager from "../task-manager/TaskManager.vue";
6767
import ControlService from "@/store/ControlService";
6868
import SettingItems from "./SettingItems.vue";
6969
import { mapWritableState } from "pinia";
70-
import { useServices } from "@/store/services";
70+
import { useNodeHeader } from "@/store/nodeHeader";
7171
export default {
7272
components: { TaskManager, SettingItems, LanguagePanel },
7373
data() {
@@ -108,7 +108,7 @@ export default {
108108
title: "Stereum Version",
109109
isColor: "alpha",
110110
itemType: "update",
111-
btnValue: "alfa",
111+
btnValue: "ALPHA",
112112
},
113113
114114
{
@@ -135,10 +135,9 @@ export default {
135135
],
136136
};
137137
},
138-
computed: {
139-
...mapWritableState(useServices, {
140-
stereumVersion: "stereumVersion",
141-
}),
138+
mounted() {
139+
this.forceUpdateCheck = true;
140+
this.stereumCurrentVersion();
142141
},
143142
updated() {
144143
this.checkSettings();
@@ -148,12 +147,23 @@ export default {
148147
this.selectror();
149148
this.checkVersion();
150149
},
150+
computed: {
151+
...mapWritableState(useNodeHeader, {
152+
forceUpdateCheck: "forceUpdateCheck",
153+
stereumUpdate: "stereumUpdate",
154+
}),
155+
},
151156
152157
methods: {
158+
checkStereumUpdate() {
159+
if (this.stereumUpdate && this.stereumUpdate.current) {
160+
return true;
161+
}
162+
return false;
163+
},
153164
confirm() {
154165
// confirm method have to write here
155166
// alert("Done!");
156-
alert(this.stereumVersion);
157167
},
158168
selectror() {
159169
if (this.langActive === true) {
@@ -182,11 +192,19 @@ export default {
182192
try {
183193
let stereumVersion = await ControlService.getCurrentStereumVersion();
184194
this.stereumVersion = stereumVersion;
185-
console.log(stereumVersion);
186195
} catch (error) {
187196
console.log("Couldn't fetch versions...\nError:", err.message);
188197
}
189198
},
199+
stereumCurrentVersion() {
200+
this.updateItems.map((item) => {
201+
if (item.title === "Stereum Version" && this.checkStereumUpdate) {
202+
item.btnValue = this.stereumUpdate.current;
203+
} else {
204+
item.btnValue === "ALPHA";
205+
}
206+
});
207+
},
190208
},
191209
};
192210
</script>
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
<template>
2+
<div class="remove-modal-parent">
3+
<div class="modal-opacity" @click="$emit('removeModal')"></div>
4+
<div class="remove-modal-content">
5+
<div class="title-box">
6+
<img
7+
src="../../../../public/img/icon/the-staking/stereum-error.png"
8+
alt="icon"
9+
/>
10+
</div>
11+
<div class="removeMessage">
12+
<span>Are you sure you want to remove</span>
13+
<p>{{ item.key }}</p>
14+
<span>FROM THIS MACHINE?</span>
15+
</div>
16+
<div class="remove-box">
17+
<div class="remove-btn" @click="$emit('deleteKey')">
18+
<span>Remove</span>
19+
</div>
20+
<span class="close">Click outside to close.</span>
21+
</div>
22+
</div>
23+
</div>
24+
</template>
25+
<script>
26+
export default {
27+
props: ["item"],
28+
};
29+
</script>
30+
<style scoped>
31+
.remove-modal-parent {
32+
width: 100%;
33+
height: 100%;
34+
position: fixed;
35+
top: 10%;
36+
left: 0;
37+
z-index: 500;
38+
display: flex;
39+
justify-content: center;
40+
align-items: center;
41+
}
42+
.modal-opacity {
43+
width: 100%;
44+
height: 91%;
45+
background-color: black;
46+
border-radius: 0 20px 0 0;
47+
position: fixed;
48+
left: 0;
49+
bottom: 0;
50+
opacity: .8;
51+
z-index: 501;
52+
}
53+
.remove-modal-content {
54+
width: 40%;
55+
height: 45%;
56+
border-radius: 45px;
57+
border: 3px solid #bfbfbf;
58+
position: absolute;
59+
top: 20%;
60+
left: 30%;
61+
background-color: #336666;
62+
display: flex;
63+
flex-direction: column;
64+
justify-content: space-between;
65+
align-items: center;
66+
box-shadow: 1px 1px 5px 1px rgb(6, 6, 6);
67+
z-index: 502;
68+
}
69+
.title-box {
70+
width: 100%;
71+
height: 35%;
72+
margin-top: 5px;
73+
display: flex;
74+
justify-content: center;
75+
align-items: center;
76+
}
77+
.title-box img {
78+
width: 30%;
79+
height: 100%;
80+
}
81+
.removeMessage {
82+
width: 95%;
83+
height: 40%;
84+
display: flex;
85+
flex-direction: column;
86+
justify-content: flex-start;
87+
align-items: center;
88+
}
89+
.removeMessage p {
90+
width: 85%;
91+
color: rgb(156, 156, 156);
92+
font-size: 0.7rem;
93+
font-weight: 700;
94+
word-break: break-all;
95+
text-align: center;
96+
}
97+
.removeMessage span {
98+
color: rgb(197, 197, 197);
99+
font-size: 1rem;
100+
font-weight: 700;
101+
margin-top: 5px;
102+
text-align: center;
103+
text-transform: uppercase;
104+
}
105+
/* .removeMessage span {
106+
color: rgb(195, 195, 195);
107+
font-size: 1rem;
108+
font-weight: 700;
109+
} */
110+
.remove-box {
111+
width: 100%;
112+
height: 25%;
113+
display: flex;
114+
flex-direction: column;
115+
justify-content: space-between;
116+
align-items: center;
117+
z-index: 502;
118+
}
119+
.remove-btn {
120+
width: 30%;
121+
height: 50%;
122+
border-radius: 10px;
123+
border: 1px solid #8f8f8f;
124+
background-color: #c93d24;
125+
box-shadow: 0 1px 3px 1px rgb(35, 59, 53);
126+
display: flex;
127+
justify-content: center;
128+
align-items: center;
129+
cursor: pointer;
130+
font-size: 0.9rem;
131+
font-weight: 700;
132+
color: rgb(210, 210, 210);
133+
text-transform: uppercase;
134+
}
135+
136+
.remove-btn:hover {
137+
transform: scale(1.08);
138+
transition-duration: 150ms;
139+
box-shadow: 0 1px 5px 1px rgb(35, 59, 53);
140+
}
141+
.remove-btn:active {
142+
transform: scale(1);
143+
box-shadow: none;
144+
}
145+
.close {
146+
color: rgba(136, 6, 6, 0.588);
147+
font-size: 0.6rem;
148+
font-weight: 500;
149+
align-self: center;
150+
}
151+
</style>

0 commit comments

Comments
 (0)