-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Notifications for New Matches #1610
base: master
Are you sure you want to change the base?
Conversation
Conflicts: package.json src/components/App/App.jsx src/components/Scenarios/ScenariosColumns.jsx
src/components/App/App.jsx
Outdated
n.onclick = (event) => { | ||
console.log(event); | ||
event.preventDefault(); // prevent the browser from focusing the Notification's tab | ||
window.open(`https://opendota.com/matches/${payload.data.match_id}`, '_blank'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the host be configurable?
src/components/App/App.jsx
Outdated
const n = new Notification( | ||
'Parsed $match'.replace('$match', payload.data.match_id), | ||
{ | ||
body: 'Check out your performance.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how. I was going to ask you. Strings are only within App, and this is an event listener.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you could mount this event listener within componentDidMount in App?
showLoginPrompt: true, | ||
}; | ||
|
||
this.askForNotifiyPermission = this.askForNotifiyPermission.bind(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notify
src/components/App/App.jsx
Outdated
!user && this.state.showLoginPrompt ? | ||
<Prompt> | ||
<img src="/assets/images/icons/icon-72x72.png" alt="logo" style={{ height: '25px', margin: '0 5px' }} /> | ||
<h3 style={{ display: 'inline-block', margin: '0' }}>Get Tracked</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Get Tracked" may be poor phrasing with current concerns about data privacy
@@ -11,8 +11,7 @@ import store from './store'; | |||
import { getMetadata, getStrings, getAbilities, getNeutralAbilities, getAbilityIds } from './actions'; | |||
import App from './components/App'; | |||
import constants from './components/constants'; | |||
// import registerServiceWorker from './registerServiceWorker'; | |||
import { unregister } from './registerServiceWorker'; | |||
import registerServiceWorker from './registerServiceWorker'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we previously had issues with the default CRA service worker. not sure if that's still an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm looks like you changed the path to another SW. I would probably make a copy of that file and change the path there so we can enable the CRA service worker at some later point
Conflicts: package.json
Conflicts: package-lock.json package.json
No description provided.