Skip to content

Commit acff3a7

Browse files
committed
chore: remove deadcode
Signed-off-by: Evan Song <theevansong@gmail.com>
1 parent 40c65b2 commit acff3a7

File tree

1 file changed

+0
-60
lines changed
  • apps/frontend/src/pages/servers/manage

1 file changed

+0
-60
lines changed

apps/frontend/src/pages/servers/manage/[id].vue

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -167,26 +167,6 @@ const navLinks = [
167167
},
168168
];
169169
170-
const progress = ref(0);
171-
let progressInterval: ReturnType<typeof setInterval> | null = null;
172-
173-
const startProgress = () => {
174-
progressInterval = setInterval(() => {
175-
if (progress.value < 95) {
176-
progress.value += Math.random() * 5; // Increment progress randomly to simulate realistic progress
177-
} else {
178-
clearInterval(progressInterval!);
179-
}
180-
}, 1000);
181-
};
182-
183-
const completeProgress = () => {
184-
progress.value = 100;
185-
setTimeout(() => {
186-
progress.value = 0;
187-
}, 500); // Transition out after 0.5 seconds
188-
};
189-
190170
const connectWebSocket = () => {
191171
try {
192172
const wsAuth = computed(() => server.ws);
@@ -282,7 +262,6 @@ const handleInstallationResult = (data: WSInstallationResultEvent) => {
282262
if (newLoaderVersion.value) server.general.loader_version = newLoaderVersion.value;
283263
if (newMCVersion.value) server.general.mc_version = newMCVersion.value;
284264
}
285-
completeProgress();
286265
break;
287266
case "err":
288267
console.log("failed to install");
@@ -424,15 +403,10 @@ const stopPolling = () => {
424403
425404
onMounted(() => {
426405
connectWebSocket();
427-
startProgress();
428406
});
429407
430408
onUnmounted(() => {
431409
stopPolling();
432-
socket.value?.close();
433-
if (progressInterval) {
434-
clearInterval(progressInterval);
435-
}
436410
});
437411
438412
watch(
@@ -452,40 +426,6 @@ definePageMeta({
452426
</script>
453427

454428
<style scoped>
455-
.progress-bar-container {
456-
width: 100%;
457-
height: 10px;
458-
background-color: #e0e0e0;
459-
border-radius: 5px;
460-
overflow: hidden;
461-
}
462-
463-
.progress-bar {
464-
height: 100%;
465-
background-color: #76c7c0;
466-
transition: width 0.5s ease;
467-
}
468-
469-
.progress {
470-
animation: progress 1s infinite linear;
471-
}
472-
473-
.left-right {
474-
transform-origin: 0% 50%;
475-
}
476-
477-
@keyframes progress {
478-
0% {
479-
transform: translateX(0) scaleX(0);
480-
}
481-
40% {
482-
transform: translateX(0) scaleX(0.4);
483-
}
484-
100% {
485-
transform: translateX(100%) scaleX(0.5);
486-
}
487-
}
488-
489429
@keyframes server-action-buttons-anim {
490430
0% {
491431
opacity: 0;

0 commit comments

Comments
 (0)