fix: test push errors, skip heartbeat notify, stale 5h (0.9.2)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 17:25:16 +10:00
parent 5e9f0f8110
commit f9baf96d88
7 changed files with 69 additions and 7 deletions
+8 -1
View File
@@ -206,9 +206,10 @@
v-if="device.is_active && device.has_fcm_token"
type="button"
class="secondary"
:disabled="testingPushDeviceId === device.id"
@click="testDevicePush(device.id)"
>
Тест push
{{ testingPushDeviceId === device.id ? "Отправка…" : "Тест push" }}
</button>
<button
v-if="device.is_active"
@@ -506,6 +507,7 @@ const creatingCode = ref(false);
const testingTelegram = ref(false);
const testingWebhook = ref(false);
const testingEmail = ref(false);
const testingPushDeviceId = ref<number | null>(null);
const error = ref("");
const success = ref("");
const telegramLoaded = ref<TelegramSettings | null>(null);
@@ -782,11 +784,16 @@ async function revokeDevice(deviceId: number) {
async function testDevicePush(deviceId: number) {
error.value = "";
success.value = "";
testingPushDeviceId.value = deviceId;
try {
const res = await testMobileDevicePush(deviceId);
success.value = res.message;
window.scrollTo({ top: 0, behavior: "smooth" });
} catch (e) {
error.value = e instanceof Error ? e.message : "Ошибка push";
window.scrollTo({ top: 0, behavior: "smooth" });
} finally {
testingPushDeviceId.value = null;
}
}