Skip to content

Conversation

@NikIvv
Copy link
Collaborator

@NikIvv NikIvv commented Apr 23, 2025

No description provided.

@NikIvv NikIvv requested a review from a team as a code owner April 23, 2025 20:33
@vercel
Copy link

vercel bot commented Apr 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
adamant-im ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 11:34am

@bludnic
Copy link
Member

bludnic commented Apr 24, 2025

@NikIvv please merge dev and fix the conflicts

@github-actions
Copy link

Deployed to https://msg-adamant-pr-770.surge.sh 🚀

@NikIvv
Copy link
Collaborator Author

NikIvv commented Apr 28, 2025

@adamantmm
Copy link
Member

@dvelikiy @bludnic @S-FrontendDev
Please review.

manifest: manifest,
manifestFilename: 'manifest.json',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,wasm}'],
Copy link
Member

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?

</options-wrapper>
</template>

<script>
Copy link
Member

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

Copy link
Member

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?

Comment on lines +5 to +13
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'
}
Copy link
Member

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.

Comment on lines +63 to +73
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 })
}
}
Copy link
Member

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.

@adamantmm
Copy link
Member

@S-FrontendDev
@Linhead

Is this pr outdated and a duplicate of feat: add push notifications for web and android #802?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants