🔨 Refactor: remove privacy policy due to the removal of talkingdata sdk

This commit is contained in:
萌萌哒赫萝
2023-07-21 02:52:01 -07:00
parent bbe4ef709a
commit 7420b3804a
8 changed files with 0 additions and 158 deletions

View File

@@ -1,34 +0,0 @@
import db from '~/main/apis/core/datastore'
import { showMessageBox } from '~/main/utils/common'
import { T } from '~/main/i18n'
class PrivacyManager {
async check () {
if (db.get('settings.privacyEnsure') !== true) {
const res = await this.show(true)
// cancel
if (res.result === 1) {
return false
} else {
db.set('settings.privacyEnsure', true)
}
}
return true
}
async show (showCancel = true) {
const res = await showMessageBox({
type: 'info',
buttons: showCancel ? ['Yes', 'No'] : ['Yes'],
title: T('PRIVACY_AGREEMENT'),
message: T('PRIVACY')
})
return res
}
}
const privacyManager = new PrivacyManager()
export {
privacyManager
}