feat(staging): adding support of app-side service and settings app (part 1)
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { gettext } from 'i18n'
|
||||
|
||||
AppSideService({
|
||||
onInit() {
|
||||
console.log(gettext('example'))
|
||||
},
|
||||
|
||||
onRun() {
|
||||
},
|
||||
|
||||
onDestroy() {
|
||||
}
|
||||
})
|
||||
AppSideService(
|
||||
{
|
||||
onInit(){
|
||||
settings.settingsStorage.addListener('change', async ({ key, newValue, oldValue }) => {
|
||||
console.log(key)
|
||||
console.log(newValue)
|
||||
const totps = settings.settingsStorage.getItem('TOTPs')
|
||||
const dataBuffer = Buffer.from(totps)
|
||||
messaging.peerSocket.send(dataBuffer.buffer)
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user