Skip to content

Commit 56c5a38

Browse files
committed
fix: refine autostart prompt modal
1 parent 03cbce3 commit 56c5a38

12 files changed

Lines changed: 172 additions & 48 deletions

File tree

static/app-autostart-prompt.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -799,10 +799,10 @@
799799
}
800800
];
801801
if (state.canNeverRemind) {
802-
buttons.unshift({
802+
buttons.push({
803803
value: 'never',
804804
text: translate('autostartPrompt.never', '不再提示'),
805-
variant: 'secondary'
805+
variant: 'link'
806806
});
807807
}
808808
const stopPromptVoice = function () {
@@ -815,14 +815,10 @@
815815
try {
816816
const decision = await window.showDecisionPrompt({
817817
skin: 'autostart-retention',
818-
title: translate('autostartPrompt.title', '要不要让 N.E.K.O 开机自动启动?'),
818+
title: translate('autostartPrompt.title', '要不要让 N.E.K.O. 开机自动启动?'),
819819
message: translate(
820820
'autostartPrompt.message',
821-
'这样下次打开电脑后,N.E.K.O 会自动准备好,不用你再手动启动。'
822-
),
823-
note: translate(
824-
'autostartPrompt.note',
825-
'只会为当前用户开启,之后也可以随时关闭。'
821+
'下次开机,N.E.K.O. 会自动准备好。'
826822
),
827823
dismissValue: null,
828824
closeOnClickOutside: false,

static/common_dialogs.js

Lines changed: 96 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@
614614
.modal-dialog-autostart-retention .exit-retention-cat-paw--right { right: 35px; transform: rotate(-20deg); }
615615
616616
.modal-dialog-autostart-retention .modal-header {
617-
padding: 0;
617+
padding: 22px 0 0;
618618
}
619619
620620
.modal-dialog-autostart-retention .modal-title {
@@ -646,33 +646,101 @@
646646
}
647647
648648
.modal-dialog-autostart-retention .modal-footer {
649-
gap: 24px;
650-
padding: 30px 0 0;
649+
position: relative;
650+
display: flex;
651+
flex-wrap: wrap;
652+
justify-content: center;
653+
gap: 22px;
654+
padding: 38px 0 34px;
651655
}
652656
653657
.modal-dialog-autostart-retention .modal-btn {
654-
min-width: 170px;
658+
min-width: 188px;
655659
min-height: 0;
656-
padding: 16px 42px;
660+
padding: 15px 36px;
657661
border: 0;
658-
border-radius: 30px;
659-
color: #ffffff;
660-
font-size: 18px;
662+
border-radius: 999px;
663+
font-size: 17px;
661664
font-weight: 900;
662665
line-height: 1.2;
663666
letter-spacing: 0;
664667
white-space: nowrap;
665668
cursor: pointer;
666669
position: relative;
667670
overflow: hidden;
668-
transition: transform 0.32s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.22s ease, filter 0.22s ease;
671+
transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease;
672+
}
673+
674+
.modal-dialog-autostart-retention .modal-btn-primary {
675+
color: #ffffff;
676+
background: linear-gradient(135deg, #52aaf3 0%, #85c8ff 100%);
677+
box-shadow: 0 14px 26px rgba(82,170,243,0.34), inset 0 3px 8px rgba(255,255,255,0.42);
678+
}
679+
680+
.modal-dialog-autostart-retention .modal-btn-secondary {
681+
color: #8798ad;
682+
background: rgba(255, 255, 255, 0.86);
683+
border: 1px solid rgba(174, 200, 226, 0.42);
684+
box-shadow: 0 12px 22px rgba(95,135,190,0.10), inset 0 3px 8px rgba(255,255,255,0.76);
685+
}
686+
687+
.modal-dialog-autostart-retention .modal-btn-link {
688+
position: absolute;
689+
right: 0;
690+
bottom: 0;
691+
min-width: 0;
692+
padding: 4px 2px;
693+
border-radius: 0;
694+
color: #5f6d7f;
695+
background: transparent;
696+
box-shadow: none;
697+
font-size: 15px;
698+
font-weight: 700;
699+
}
700+
701+
.modal-dialog-autostart-retention .modal-btn:not(.modal-btn-link):hover,
702+
.modal-dialog-autostart-retention .modal-btn:not(.modal-btn-link):focus-visible {
703+
transform: translateY(-2px);
704+
outline: none;
705+
filter: brightness(1.03);
706+
}
707+
708+
.modal-dialog-autostart-retention .modal-btn-link:hover,
709+
.modal-dialog-autostart-retention .modal-btn-link:focus-visible {
710+
color: #314158;
711+
text-decoration: underline;
712+
outline: none;
669713
}
670714
671-
.modal-dialog-autostart-retention .modal-btn-primary { background: var(--exit-button-stay); box-shadow: 0 15px 30px rgba(107,176,242,0.35), inset 0 4px 8px rgba(255,255,255,0.46); }
672-
.modal-dialog-autostart-retention .modal-btn-secondary { background: var(--exit-button-leave); color: #8fa3c0; box-shadow: 0 10px 20px rgba(0,0,0,0.06), inset 0 4px 8px rgba(255,255,255,0.72); }
673-
.modal-dialog-autostart-retention .modal-btn:hover,
674-
.modal-dialog-autostart-retention .modal-btn:focus-visible { transform: translateY(-6px) scale(1.05); outline: none; filter: brightness(1.04); }
675-
.modal-dialog-autostart-retention .modal-btn:active { transform: scale(0.95); }
715+
.modal-dialog-autostart-retention .modal-btn:active {
716+
transform: translateY(1px) scale(0.98);
717+
}
718+
719+
.modal-dialog-autostart-retention .modal-btn-link:active {
720+
transform: none;
721+
}
722+
723+
@media (max-width: 560px) {
724+
.modal-dialog-autostart-retention .modal-footer {
725+
gap: 12px;
726+
padding-bottom: 26px;
727+
}
728+
729+
.modal-dialog-autostart-retention .modal-btn:not(.modal-btn-link) {
730+
width: 100%;
731+
min-width: 0;
732+
}
733+
734+
.modal-dialog-autostart-retention .modal-btn-link {
735+
right: 50%;
736+
bottom: -6px;
737+
transform: translateX(50%);
738+
}
739+
740+
.modal-dialog-autostart-retention .modal-btn-link:active {
741+
transform: translateX(50%);
742+
}
743+
}
676744
677745
.modal-dialog-autostart-retention.state-curious .exit-retention-cat-head-group { transform: rotate(10deg) translateY(2px); }
678746
.modal-dialog-autostart-retention.state-curious .exit-retention-cat-ear--left { transform: rotate(-8deg); }
@@ -818,9 +886,19 @@
818886
819887
[data-theme="dark"] .modal-dialog-autostart-retention .modal-btn-secondary {
820888
color: #d2deee;
821-
background: rgba(255, 255, 255, 0.10);
889+
background: rgba(255, 255, 255, 0.12);
890+
border-color: rgba(255,255,255,0.12);
822891
box-shadow: 0 10px 20px rgba(0,0,0,0.22), inset 0 4px 8px rgba(255,255,255,0.10);
823892
}
893+
894+
[data-theme="dark"] .modal-dialog-autostart-retention .modal-btn-link {
895+
color: #9dafc6;
896+
}
897+
898+
[data-theme="dark"] .modal-dialog-autostart-retention .modal-btn-link:hover,
899+
[data-theme="dark"] .modal-dialog-autostart-retention .modal-btn-link:focus-visible {
900+
color: #d8e6f7;
901+
}
824902
`;
825903
document.head.appendChild(style);
826904

@@ -1192,7 +1270,9 @@
11921270
const button = document.createElement('button');
11931271
const variant = buttonConfig.variant === 'danger'
11941272
? 'modal-btn-danger'
1195-
: (buttonConfig.variant === 'primary' ? 'modal-btn-primary' : 'modal-btn-secondary');
1273+
: (buttonConfig.variant === 'primary'
1274+
? 'modal-btn-primary'
1275+
: (buttonConfig.variant === 'link' ? 'modal-btn-link' : 'modal-btn-secondary'));
11961276
button.className = 'modal-btn ' + variant;
11971277
button.textContent = String(buttonConfig.text || ('Button ' + (index + 1)));
11981278
if (isAutostartRetentionSkin) {

static/locales/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "Failed to restore default model"
5353
},
5454
"autostartPrompt": {
55-
"title": "Want N.E.K.O to launch at startup?",
56-
"message": "It will be ready automatically the next time you turn on your computer, so you won't need to launch it manually.",
57-
"note": "This only enables launch at login for the current user, and you can turn it off later.",
55+
"title": "Want N.E.K.O. to launch at startup?",
56+
"message": "N.E.K.O. will be ready next time you start your computer.",
57+
"note": "You can turn this off later.",
5858
"startNow": "Enable auto launch",
5959
"later": "Remind me later",
6060
"never": "Don't remind me",

static/locales/es.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "No se pudo restaurar el modelo predeterminado"
5353
},
5454
"autostartPrompt": {
55-
"title": "¿Quieres que N.E.K.O se lance al inicio?",
56-
"message": "Estará listo automáticamente la próxima vez que encienda su computadora, por lo que no necesitará iniciarlo manualmente.",
57-
"note": "Esto solo permite el inicio al iniciar sesión para el usuario actual y puede desactivarlo más tarde.",
55+
"title": "¿Quieres que N.E.K.O. se lance al inicio?",
56+
"message": "N.E.K.O. estará listo la próxima vez que enciendas tu computadora.",
57+
"note": "Puedes desactivarlo más tarde.",
5858
"startNow": "Habilitar el inicio automático",
5959
"later": "Recordármelo más tarde",
6060
"never": "no me lo recuerdes",

static/locales/ja.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "既定のモデルに戻せませんでした"
5353
},
5454
"autostartPrompt": {
55-
"title": "N.E.K.O を起動時に自動起動しますか?",
56-
"message": "次回パソコンを起動したときに N.E.K.O が自動で準備されるので、手動で起動する手間がなくなります",
57-
"note": "現在のユーザーに対してのみ有効になり、後からいつでもオフにできます。",
55+
"title": "N.E.K.O. を起動時に自動起動しますか?",
56+
"message": "次回の起動時に、N.E.K.O. が自動で準備されます",
57+
"note": "後からいつでもオフにできます。",
5858
"startNow": "自動起動を有効にする",
5959
"later": "後で通知",
6060
"never": "今後は表示しない",

static/locales/ko.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "기본 모델로 복원하지 못했습니다"
5353
},
5454
"autostartPrompt": {
55-
"title": "N.E.K.O를 시작 시 자동 실행할까요?",
56-
"message": "다음에 컴퓨터를 켜면 N.E.K.O가 자동으로 준비되어 직접 실행하지 않아도 됩니다.",
57-
"note": "현재 사용자에게만 적용되며 나중에 언제든지 끌 수 있습니다.",
55+
"title": "N.E.K.O.를 시작 시 자동 실행할까요?",
56+
"message": "다음에 컴퓨터를 켜면 N.E.K.O.가 자동으로 준비됩니다.",
57+
"note": "나중에 언제든지 끌 수 있습니다.",
5858
"startNow": "자동 실행 켜기",
5959
"later": "나중에 알려줘",
6060
"never": "다시 묻지 않기",

static/locales/pt.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "Falha ao restaurar o modelo padrão"
5353
},
5454
"autostartPrompt": {
55-
"title": "Quer que o N.E.K.O seja lançado na inicialização?",
56-
"message": "Ele estará pronto automaticamente na próxima vez que você ligar o computador, portanto não será necessário iniciá-lo manualmente.",
57-
"note": "Isso só permite a inicialização no login do usuário atual e você pode desativá-lo mais tarde.",
55+
"title": "Quer que o N.E.K.O. seja lançado na inicialização?",
56+
"message": "O N.E.K.O. estará pronto na próxima vez que ligar o computador.",
57+
"note": "Você pode desativar depois.",
5858
"startNow": "Ativar inicialização automática",
5959
"later": "Lembrar mais tarde",
6060
"never": "Não me lembre",

static/locales/ru.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "Не удалось восстановить модель по умолчанию"
5353
},
5454
"autostartPrompt": {
55-
"title": "Включить автозапуск N.E.K.O. при входе в систему?",
56-
"message": "Когда вы в следующий раз включите компьютер, N.E.K.O. будет готова автоматически, и вам не придется запускать ее вручную.",
57-
"note": "Настройка применяется только к текущему пользователю, и ее можно будет отключить позже.",
55+
"title": "Запускать N.E.K.O. автоматически при старте?",
56+
"message": "N.E.K.O. будет готова при следующем запуске компьютера.",
57+
"note": "Позже это можно отключить.",
5858
"startNow": "Включить автозапуск",
5959
"later": "Напомнить позже",
6060
"never": "Больше не напоминать",

static/locales/zh-CN.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "恢复默认模型失败"
5353
},
5454
"autostartPrompt": {
55-
"title": "要不要让 N.E.K.O 开机自动启动?",
56-
"message": "这样下次打开电脑后,N.E.K.O 会自动准备好,不用你再手动启动",
57-
"note": "只会为当前用户开启,之后也可以随时关闭",
55+
"title": "要不要让 N.E.K.O. 开机自动启动?",
56+
"message": "下次开机,N.E.K.O. 会自动准备好。",
57+
"note": "之后可随时关闭",
5858
"startNow": "开启自启动",
5959
"later": "以后提醒",
6060
"never": "不再提示",

static/locales/zh-TW.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"resetToDefaultFailed": "恢復預設模型失敗"
5353
},
5454
"autostartPrompt": {
55-
"title": "要不要讓 N.E.K.O 開機自動啟動?",
56-
"message": "下次打開電腦後,N.E.K.O 會自動準備好,不需要再手動啟動",
57-
"note": "只會為目前使用者啟用,之後也可以隨時關閉",
55+
"title": "要不要讓 N.E.K.O. 開機自動啟動?",
56+
"message": "下次開機,N.E.K.O. 會自動準備好。",
57+
"note": "之後可隨時關閉",
5858
"startNow": "開啟自啟動",
5959
"later": "以後提醒",
6060
"never": "不再提示",

0 commit comments

Comments
 (0)