mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-23 09:12:57 +08:00
🔨 Refactor: remove privacy policy due to the removal of talkingdata sdk
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user