refactor: improve ErrorModal.vue

This commit is contained in:
2025-07-10 23:12:47 +03:00
parent 3d32640b83
commit f1b67c9584
2 changed files with 125 additions and 69 deletions

View File

@@ -321,9 +321,14 @@ async function onApplyMigrationFix(eol) {
<template v-if="copied"> <CheckIcon class="text-green" /> Copied! </template> <template v-if="copied"> <CheckIcon class="text-green" /> Copied! </template>
<template v-else> <CopyIcon /> Copy debug info </template> <template v-else> <CopyIcon /> Copy debug info </template>
</button> </button>
<ButtonStyled color="brand"> <ButtonStyled class="btn-wrapper neon">
<a href="https://me.astralium.su/get/ar/help" target="_blank" rel="noopener noreferrer"> <a href="https://me.astralium.su/get/ar/help" target="_blank" rel="noopener noreferrer">
<button>Get AstralRinth support</button> Get AstralRinth support
</a>
</ButtonStyled>
<ButtonStyled class="btn-wrapper neon" >
<a href="https://me.astralium.su/get/ar" target="_blank" rel="noopener noreferrer">
Checkout latest releases
</a> </a>
</ButtonStyled> </ButtonStyled>
</ButtonStyled> </ButtonStyled>
@@ -344,10 +349,11 @@ async function onApplyMigrationFix(eol) {
<pre class="m-0 px-4 py-3 bg-bg rounded-none">{{ debugInfo }}</pre> <pre class="m-0 px-4 py-3 bg-bg rounded-none">{{ debugInfo }}</pre>
</Collapsible> </Collapsible>
</div> </div>
<template v-if="errorType === 'state_init'">
<div class="notice"> <div class="notice">
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<h3 v-if="language === 'en'" class="notice__title"> Important Notice </h3> <h3 v-if="language === 'en'" class="notice__title"> Migration Issue Important Notice </h3>
<h3 v-if="language === 'ru'" class="notice__title"> Важное уведомление </h3> <h3 v-if="language === 'ru'" class="notice__title"> Проблема миграции Важное уведомление </h3>
<ButtonStyled> <ButtonStyled>
<button @click="toggleLanguage"> <button @click="toggleLanguage">
{{ language === 'en' ? '📖 Русский' : '📖 English' }} {{ language === 'en' ? '📖 Русский' : '📖 English' }}
@@ -384,9 +390,9 @@ async function onApplyMigrationFix(eol) {
<template v-if="language === 'ru'">Возможное исправление в реальном времени:</template> <template v-if="language === 'ru'">Возможное исправление в реальном времени:</template>
</h2> </h2>
<div class="flex justify-between"> <div class="flex justify-between">
<ul class="flex flex-col gap-3"> <ol class="flex flex-col gap-3">
<li> <li>
<ButtonStyled color="purple"> <ButtonStyled class="btn-wrapper neon">
<button <button
:title="language === 'en' :title="language === 'en'
? 'Convert all line endings in migration files to LF (Unix-style: \\n)' ? 'Convert all line endings in migration files to LF (Unix-style: \\n)'
@@ -399,7 +405,7 @@ async function onApplyMigrationFix(eol) {
</ButtonStyled> </ButtonStyled>
</li> </li>
<li> <li>
<ButtonStyled color="purple"> <ButtonStyled class="btn-wrapper neon">
<button <button
:title="language === 'en' :title="language === 'en'
? 'Convert all line endings in migration files to CRLF (Windows-style: \\r\\n)' ? 'Convert all line endings in migration files to CRLF (Windows-style: \\r\\n)'
@@ -411,9 +417,10 @@ async function onApplyMigrationFix(eol) {
</button> </button>
</ButtonStyled> </ButtonStyled>
</li> </li>
</ul> </ol>
</div> </div>
</template> </template>
</template>
</div> </div>
</ModalWrapper> </ModalWrapper>
<ModalWrapper <ModalWrapper
@@ -468,6 +475,8 @@ async function onApplyMigrationFix(eol) {
</style> </style>
<style scoped lang="scss"> <style scoped lang="scss">
@import '../../../../../packages/assets/styles/neon-button.scss';
.cta-button { .cta-button {
display: flex; display: flex;
align-items: center; align-items: center;

View File

@@ -0,0 +1,47 @@
// [AR] Feature
.btn-wrapper.neon :deep(:is(button, a, .button-like):first-child),
.btn-wrapper.neon :slotted(:is(button, a, .button-like):first-child),
.btn-wrapper.neon :slotted(*) > :is(button, a, .button-like):first-child,
.btn-wrapper.neon :slotted(*) > *:first-child > :is(button, a, .button-like):first-child,
.btn-wrapper.neon
:slotted(*)
> *:first-child
> *:first-child
> :is(button, a, .button-like):first-child {
background-color: transparent;
border: 1px solid #3e8cde;
color: #3e8cde;
text-shadow:
0 0 4px rgba(79, 173, 255, 0.5),
0 0 8px rgba(14, 98, 204, 0.5),
0 0 12px rgba(122, 31, 199, 0.5);
transition:
color 0.25s ease,
box-shadow 0.3s ease,
transform 0.15s ease;
box-shadow: 0 0 4px rgba(79, 173, 255, 0.5);
}
/* Hover */
.btn-wrapper.neon
:deep(:is(button, a, .button-like):first-child):hover:not([disabled]):not(.disabled),
.btn-wrapper.neon
:slotted(:is(button, a, .button-like):first-child):hover:not([disabled]):not(.disabled),
.btn-wrapper.neon
:slotted(*) > :is(button, a, .button-like):first-child:hover:not([disabled]):not(.disabled),
.btn-wrapper.neon
:slotted(*) > *:first-child > :is(button, a, .button-like):first-child:hover:not([disabled]):not(.disabled),
.btn-wrapper.neon
:slotted(*)
> *:first-child
> *:first-child
> :is(button, a, .button-like):first-child:hover:not([disabled]):not(.disabled) {
color: #10fae5;
transform: scale(1.02);
box-shadow:
0 0 4px rgba(16, 250, 229, 0.3),
0 0 8px rgba(16, 250, 229, 0.2);
text-shadow:
0 0 2px rgba(16, 250, 229, 0.4),
0 0 4px rgba(16, 250, 229, 0.25);
}