diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2025-09-13 08:33:14 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-13 08:33:14 +0900 |
| commit | 5b4115e21a6822a434a9bfbbd53f22b3ca961239 (patch) | |
| tree | eaac22e870a95feccc47ccc2693b794d0ccd299f /packages/frontend/src/components/MkPushNotificationAllowButton.vue | |
| parent | Update CHANGELOG.md (diff) | |
| download | misskey-5b4115e21a6822a434a9bfbbd53f22b3ca961239.tar.gz misskey-5b4115e21a6822a434a9bfbbd53f22b3ca961239.tar.bz2 misskey-5b4115e21a6822a434a9bfbbd53f22b3ca961239.zip | |
refactor(frontend): フロントエンドの型エラー解消(途中まで) (#16539)
* fix(frontend): FormLinkをボタンとして使用した際にエラーが出る問題を修正
* refactor(frontend): フロントエンドの型エラー解消
* remove unused ts-expect-error
* migrate
* remove unrelated changes
* fix lint
* more type fixes
Diffstat (limited to 'packages/frontend/src/components/MkPushNotificationAllowButton.vue')
| -rw-r--r-- | packages/frontend/src/components/MkPushNotificationAllowButton.vue | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkPushNotificationAllowButton.vue b/packages/frontend/src/components/MkPushNotificationAllowButton.vue index 9c37eb5e72..697346020c 100644 --- a/packages/frontend/src/components/MkPushNotificationAllowButton.vue +++ b/packages/frontend/src/components/MkPushNotificationAllowButton.vue @@ -90,7 +90,7 @@ function subscribe() { publickey: encode(subscription.getKey('p256dh')), }); }, async err => { // When subscribe failed - // 通知が許可されていなかったとき + // 通知が許可されていなかったとき if (err?.name === 'NotAllowedError') { console.info('User denied the notification permission request.'); return; @@ -114,14 +114,13 @@ async function unsubscribe() { if ($i && accounts.length >= 2) { apiWithDialog('sw/unregister', { - i: $i.token, endpoint, - }); + }, $i.token); } else { pushSubscription.value.unsubscribe(); apiWithDialog('sw/unregister', { endpoint, - }); + }, null); pushSubscription.value = null; } } @@ -134,7 +133,7 @@ function encode(buffer: ArrayBuffer | null) { * Convert the URL safe base64 string to a Uint8Array * @param base64String base64 string */ -function urlBase64ToUint8Array(base64String: string): Uint8Array { +function urlBase64ToUint8Array(base64String: string): BufferSource { const padding = '='.repeat((4 - base64String.length % 4) % 4); const base64 = (base64String + padding) .replace(/-/g, '+') |