Commit Graph

18 Commits

Author SHA1 Message Date
anatawa12 9845ccec5b
オフライン時の画面にリロードボタンを追加 (#11242)
* feat: オフライン時の画面にリロードボタンを追加

リロードのためのボタンがないとPWAでインターネットが復帰しても何もできなくなるため。

* docs(changelog): add オフライン時の画面にリロードボタンを追加
2023-07-11 18:24:10 +09:00
tamaina 471b836a44 fix(sw): 通知全削除時にread_notification通知が消えないように
通知欄に現れたり消えたりするとうざい
2023-04-18 06:01:18 +00:00
okayurisotto 5002effd65
Refactor sw (#10579)
* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): remove dead code

* refactor(sw): 冗長な部分を変更

* refactor(sw): 使われていない煩雑な機能を削除

* refactor(sw): remove dead code

* refactor(sw): URL文字列の作成に`URL`を使うように

* refactor(sw): 型アサーションの削除とそれに伴い露呈したエラーへの対処

* refactor(sw): `append` -> `set` in `URLSearchParams`

* refactor(sw): `any`の削除とそれに伴い露呈したエラーへの対処

* refactor(sw): 型アサーションの削除とそれに伴い露呈したエラーへの対処

対処と言っても`throw`するだけ。いままでもこの状況ではエラーが投げられていたはずなので、この対処により新たな問題が起きることはないはず。

* refactor(sw): i18n loading

* refactor(sw): 型推論がうまくできる書き方に変更

`codes`が`(string | undefined)[]`から`string[]`になった

* refactor(sw): クエリ文字列の作成に`URLSearchParams`を使うように

* refactor(sw): `findClient`

* refactor(sw): `openClient`における`any`や`as`の書き換え

* refactor(sw): `openPost`における`any`の書き換え

* refactor(sw): `let` -> `const`

* refactor(sw): `any` -> `unknown`

* cleanup(sw): import

* cleanup(sw)

* cleanup(sw): `?.`

* cleanup(sw/.eslintrc.js)

* refactor(sw): `@typescript-eslint/explicit-function-return-type`

* refactor(sw): `@typescript-eslint/no-unused-vars`

* refactor(sw): どうしようもないところに`eslint-disable-next-line`を

* refactor(sw): `import/no-default-export`

* update operations.ts

* throw new Error

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-04-12 01:07:24 +09:00
tamaina 3a90bcc03c
sw: なんかもうめっちゃ変えた (#10570)
* sw: なんかいろいろ

* remove debug code

* never renotify

* update changelog.md
2023-04-11 14:11:39 +09:00
tamaina da64273b43 chore(sw): use PascalCase 2023-04-10 12:10:06 +00:00
syuilo 30d6992684 perf(backend): 通知をRedisに保存するように
Resolve #10168
2023-04-04 14:06:57 +09:00
tamaina 8c883653c9
fix/enhance(sw): プッシュ通知 (バックグラウンドで開いている場合も通知, リアクション通知はノートにつき1つに) (#9977)
* fix(sw): クライアントがあってもpush notificationを無視しない
「プッシュ通知を更新しました」の原因になるため

* enhance(sw): リアクション通知は1つのノートにつき1つしか表示しない
Safari対応で、通知tagは能動的に閉じるように

* revert closeNotificationsByTags
2023-02-18 17:48:20 +09:00
tamaina 36170a11f5 refactor(sw): self => globalThis 2023-02-18 05:16:34 +00:00
syuilo 8caf288ac1
drop group (#9942)
* drop group

* Update operations.ts
2023-02-15 13:37:18 +09:00
syuilo 8f2049bcd2
drop messaging (#9919)
* drop messaging (from backend)

* wip
2023-02-15 13:06:06 +09:00
tamaina 8d4c5deb8d perf(sw): skipWaitingしない 2023-02-12 15:48:56 +00:00
Kagami Sascha Rosylight 9f0e0dc8ce
refactor(sw): Fix type errors in packages/sw (#9909)
* Fix type errors in packages/sw

* mouhitotsu

* @typesは越境しない

* Update packages/sw/src/scripts/create-notification.ts

---------

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
2023-02-13 00:31:37 +09:00
tamaina 867e31c9ff
enhance: Push notification of Antenna note (#9338)
* wip

* wip

* wip

* fix

* fix

* 🎨
2022-12-18 19:50:02 +09:00
Kagami Sascha Rosylight cfd7cf0f1e
refactor(sw): Typecheck the service worker (#9314)
* Typecheck the service worker

Currently the service worker build never typechecks, since esbuild and typescript-eslint don't do such job.

esbuild: https://esbuild.github.io/content-types/#typescript

>However, esbuild does not do any type checking so you will still need to run tsc -noEmit in parallel with esbuild to check types. This is not something esbuild does itself.

typescript-eslint: https://typescript-eslint.io/linting/troubleshooting#why-dont-i-see-typescript-errors-in-my-eslint-output

>TypeScript's compiler (or whatever your build chain may be) is specifically designed and built to validate the correctness of your codebase. Our tooling does not reproduce the errors that TypeScript provides, because doing so would slow down the lint run [1], and duplicate the errors that TypeScript already outputs for you.

Adding this step adds tons of TS errors 😱

* Override lib-webworker with service worker
2022-12-12 22:20:35 +09:00
Kagami Sascha Rosylight 8211893210
Fix lint errors (except `@typescript-eslint/prefer-nullish-coalescing`) (#9311)
* `yarn workspace client run lint --fix`

* `eslint-disable-next-line no-var` for service worker self

* A few more manual sw fixes

* word change
2022-12-12 19:27:47 +09:00
rinsuki e60a6cc621
chore(sw): only proxies HTML requests (#9070)
* chore(sw): only proxies HTML requests

もはやHTMLじゃなさそうなリクエストにはSWで関与しないようにする

こうするといろいろな面倒事が解決するはず…たぶん

Resolve #9037
Resolve #9038

* align code style

* Update packages/sw/src/sw.ts

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-09-10 19:25:32 +09:00
tamaina 83ebe79a3f
enhance(sw): If receiving a push notification issued more than a day, ignore it. (#8980)
* enhance(sw): ignore old push notification

* ✌️

* 半日

* !==

* 1日
2022-07-10 15:15:21 +09:00
tamaina 766559c6e9
feat: Improve Push Notification (#7667)
* clean up

* ev => data

* refactor

* clean up

* add type

* antenna

* channel

* fix

* add Packed type

* add PackedRef

* fix lint

* add emoji schema

* add reversiGame

* add reversiMatching

* remove signin schema (use Signin entity)

* add schemas refs, fix Packed type

* wip PackedHoge => Packed<'Hoge'>

* add Packed type

* note-reaction

* user

* user-group

* user-list

* note

* app, messaging-message

* notification

* drive-file

* drive-folder

* following

* muting

* blocking

* hashtag

* page

* app (with modifying schema)

* import user?

* channel

* antenna

* clip

* gallery-post

* emoji

* Packed

* reversi-matching

* update stream.ts

* https://github.com/misskey-dev/misskey/pull/7769#issuecomment-917542339

* fix lint

* clean up?

* add app

* fix

* nanka iroiro

* wip

* wip

* fix lint

* fix loginId

* fix

* refactor

* refactor

* remove follow action

* clean up

* Revert "remove follow action"

This reverts commit defbb416480905af2150d1c92f10d8e1d1288c0a.

* Revert "clean up"

This reverts commit f94919cb9cff41e274044fc69c56ad36a33974f2.

* remove fetch specification

* renoteの条件追加

* apiFetch => cli

* bypass fetch?

* fix

* refactor: use path alias

* temp: add submodule

* remove submodule

* enhane: unison-reloadに指定したパスに移動できるように

* null

* null

* feat: ログインするアカウントのIDをクエリ文字列で指定する機能

* null

* await?

* rename

* rename

* Update read.ts

* merge

* get-note-summary

* fix

* swパッケージに

* add missing packages

* fix getNoteSummary

* add webpack-cli

* ✌️

* remove plugins

* sw-inject分離したがテストしてない

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix notification.vue

* remove a blank line

* disconnect intersection observer

* disconnect2

* fix

* ✌️

* clean up config

* typesを戻した

* Update packages/client/src/components/notification.vue

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

* disconnect

* oops

* Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた

* truncate notification

* Update packages/client/src/ui/_common_/common.vue

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* clean up

* clean up

* キャッシュ対策

* Truncate push notification message

* クライアントがあったらストリームに接続しているということなので通知しない判定の位置を修正

* components/drive-file-thumbnail.vue

* components/drive-select-dialog.vue

* components/drive-window.vue

* merge

* fix

* Service Workerのビルドにesbuildを使うようにする

* return createEmptyNotification()

* fix

* i18n.ts

* update

* ✌️

* remove ts-loader

* fix

* fix

* enhance: Service Workerを常に登録するように

* pollEnded

* URLをsw.jsに戻す

* clean up

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-04-30 21:52:07 +09:00