-
-
Notifications
You must be signed in to change notification settings - Fork 65
feat/push2 web #770
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
base: dev
Are you sure you want to change the base?
feat/push2 web #770
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@NikIvv please merge |
Deployed to https://msg-adamant-pr-770.surge.sh 🚀 |
@dvelikiy @bludnic @S-FrontendDev |
@@ -18,9 +18,23 @@ export default mergeConfig( | |||
manifest: manifest, | |||
manifestFilename: 'manifest.json', | |||
workbox: { | |||
globPatterns: ['**/*.{js,css,html,ico,png,svg,wasm}'], |
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.
Why caching of static files was removed?
@@ -189,13 +214,27 @@ | |||
</template> | |||
|
|||
<script> |
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.
Lets convert Options.vue
into Composition API and TypeScript
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.
@S-FrontendDev @skranee
Didn't we do it yet in other pr?
const firebaseConfig = { | ||
apiKey: 'AIzaSyDgtB_hqwL1SS_YMYepRMmXYhmc7154wmU', | ||
authDomain: 'adamant-messenger.firebaseapp.com', | ||
databaseURL: 'https://adamant-messenger.firebaseio.com', | ||
projectId: 'adamant-messenger', | ||
storageBucket: 'adamant-messenger.appspot.com', | ||
messagingSenderId: '987518845753', | ||
appId: '1:987518845753:web:6585b11ca36bac4c251ee8' | ||
} |
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 use same config in the app and in the Service Worker. Let's move the const into another place and import it.
watch(myPK, (newVal, oldVal) => { | ||
if (newVal && !oldVal) { | ||
const channel = new BroadcastChannel('adm_notifications') | ||
channel.postMessage({ isCheckPK: true }) | ||
channel.onmessage = async (event) => { | ||
const data = event.data | ||
if (data && data.isNoPrivateKey) { | ||
const privateKey = newVal | ||
if (privateKey) channel.postMessage({ privateKey }) | ||
} | ||
} |
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.
Seems a little over engineering. Did you try just watching the value of store.state.passphrase
from Vuex?
watch(() => store.state.passphrase, () => {
channel.postMessage(passphrase)
})
Note: You can retrieve the privateKey and publicKey from passphrase.
No description provided.