fix some bugs from accounting 7
This commit is contained in:
@@ -6,3 +6,18 @@ export function getConfigApp(key: string) {
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export function isBoursecuProject() {
|
||||
const name = String(getConfigApp('name') || '').toLowerCase()
|
||||
return name === 'boursecu' || name === 'boursemes'
|
||||
}
|
||||
|
||||
export function isTWA() {
|
||||
if (typeof sessionStorage === 'undefined') return false
|
||||
if (sessionStorage.getItem('appMode') === 'twa') return true
|
||||
if (typeof document !== 'undefined' && document.referrer.startsWith('android-app://')) {
|
||||
sessionStorage.setItem('appMode', 'twa')
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user