🔨 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

@@ -18,7 +18,6 @@ import logger from '@core/picgo/logger'
import { T } from '~/main/i18n'
import fse from 'fs-extra'
import path from 'path'
import { privacyManager } from '~/main/utils/privacyManager'
import writeFile from 'write-file-atomic'
import { CLIPBOARD_IMAGE_FOLDER } from '~/universal/utils/static'
@@ -131,10 +130,6 @@ class Uploader {
async upload (img?: IUploadOption): Promise<ImgInfo[]|false> {
try {
const privacyCheckRes = await privacyManager.check()
if (!privacyCheckRes) {
throw Error(T('PRIVACY_TIPS'))
}
const output = await picgo.upload(img)
if (Array.isArray(output) && output.some((item: ImgInfo) => item.imgUrl)) {
output.forEach((item: ImgInfo) => {

View File

@@ -6,7 +6,6 @@ import picgo from '@core/picgo'
import {
uploadClipboardFiles
} from '~/main/apis/app/uploader/apis'
import { privacyManager } from '~/main/utils/privacyManager'
import pkg from 'root/package.json'
import GuiApi from 'apis/gui'
import { PICGO_CONFIG_PLUGIN, PICGO_HANDLE_PLUGIN_DONE, PICGO_HANDLE_PLUGIN_ING, PICGO_TOGGLE_PLUGIN, SHOW_MAIN_PAGE_DONATION, SHOW_MAIN_PAGE_QRCODE } from '~/universal/events/constants'
@@ -130,12 +129,6 @@ const buildMainPageMenu = (win: BrowserWindow) => {
click () {
win?.webContents?.openDevTools()
}
},
{
label: T('PRIVACY_AGREEMENT'),
click () {
privacyManager.show(false)
}
}
]
// @ts-ignore

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
}

View File

@@ -2,7 +2,6 @@ export const SHOW_INPUT_BOX = 'SHOW_INPUT_BOX'
export const SHOW_INPUT_BOX_RESPONSE = 'SHOW_INPUT_BOX_RESPONSE'
export const TOGGLE_SHORTKEY_MODIFIED_MODE = 'TOGGLE_SHORTKEY_MODIFIED_MODE'
export const C1N = 'WjJoeFdWWklhVTlXYVRKTU5EUmFOVkEwUlVRPQ=='
export const SHOW_PRIVACY_MESSAGE = 'SHOW_PRIVACY_MESSAGE'
export const PICGO_SAVE_CONFIG = 'PICGO_SAVE_CONFIG'
export const PICGO_GET_CONFIG = 'PICGO_GET_CONFIG'
export const PICGO_GET_DB = 'PICGO_GET_DB'

View File

@@ -5,7 +5,6 @@ interface ILocales {
OPEN_MINI_WINDOW: string
CHOOSE_DEFAULT_PICBED: string
OPEN_UPDATE_HELPER: string
PRIVACY_AGREEMENT: string
RELOAD_APP: string
UPLOAD_SUCCEED: string
UPLOAD_FAILED: string
@@ -836,8 +835,6 @@ interface ILocales {
TIPS_FIND_NEW_VERSION: string
UPDATE_DOWNLOADED: string
TIPS_UPDATE_DOWNLOADED: string
PRIVACY: string
PRIVACY_TIPS: string
QUIT: string
}
type ILocalesKey = keyof ILocales