Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

出勤・退勤忘却のアラーム機能を追加しました #4

Merged
merged 13 commits into from
Apr 27, 2018

Conversation

kimromi
Copy link
Contributor

@kimromi kimromi commented Apr 25, 2018

@irok 初めまして。便利に使わせていただいています。

使い始めたところ、出勤や退勤を忘れないよう定期的に通知してくれる機能が欲しくなり実装しました。ご確認よろしくお願いします。

修正したところ

オプション画面

以下のような時間設定を追加しました。

image

定期通知処理

chrome alarm APIを使用して5分毎にバックグラウンド実行をしています。

  • 出勤の定期通知の時間設定をしたとき
    • 出勤前かつ出勤通知設定の間の時間にnotificationを実行
  • 退勤の定期通知の時間設定をしたとき
    • 出勤中かつ退勤通知設定の間の時間にnotificationを実行

その他

  • 開発時にvendor/*.jsがなく動作しなかったため、npm run vendorコマンドを追加してvendor/にjsファイルをコピーするようにしました
  • 時間の比較にmoment.jsを使用するため追加しました

@irok irok merged commit d3a3a42 into irok:master Apr 27, 2018
@irok
Copy link
Owner

irok commented Apr 27, 2018

@kimromi PRありがとうございます。
取り込んで公開させていただきました!

@kimromi
Copy link
Contributor Author

kimromi commented Apr 27, 2018

@irok
ご確認ありがとうございます!
動作確認はしていますがまたバグなどありましたらPRさせていただきたいと思います。

@kimromi kimromi deleted the alarm branch April 27, 2018 15:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants