From 64cc5e8575fda47b281ae20abf0020e27fc8ce7c Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 5 Oct 2018 15:17:34 +0200 Subject: add webtorrent opt-out settings - add a key in localstorage to remember the opt-out - add a user setting --- shared/models/users/user-update-me.model.ts | 4 +++- shared/models/users/user-webtorrent-policy.type.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 shared/models/users/user-webtorrent-policy.type.ts (limited to 'shared') diff --git a/shared/models/users/user-update-me.model.ts b/shared/models/users/user-update-me.model.ts index bbffe1487..81790377e 100644 --- a/shared/models/users/user-update-me.model.ts +++ b/shared/models/users/user-update-me.model.ts @@ -1,9 +1,11 @@ import { NSFWPolicyType } from '../videos/nsfw-policy.type' +import { WebTorrentPolicyType } from './user-webtorrent-policy.type' export interface UserUpdateMe { displayName?: string description?: string - nsfwPolicy?: NSFWPolicyType + nsfwPolicy?: NSFWPolicyType, + webTorrentPolicy?: WebTorrentPolicyType, autoPlayVideo?: boolean email?: string currentPassword?: string diff --git a/shared/models/users/user-webtorrent-policy.type.ts b/shared/models/users/user-webtorrent-policy.type.ts new file mode 100644 index 000000000..e293f761d --- /dev/null +++ b/shared/models/users/user-webtorrent-policy.type.ts @@ -0,0 +1 @@ +export type WebTorrentPolicyType = 'enable' | 'disable' | 'disable_on_mobile' -- cgit v1.2.3 From ed638e5325096ef580da20f370ac61c59cd48cf7 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 12 Oct 2018 18:12:39 +0200 Subject: move to boolean switch --- shared/models/users/user-update-me.model.ts | 3 +-- shared/models/users/user-webtorrent-policy.type.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 shared/models/users/user-webtorrent-policy.type.ts (limited to 'shared') diff --git a/shared/models/users/user-update-me.model.ts b/shared/models/users/user-update-me.model.ts index 81790377e..10edeee2e 100644 --- a/shared/models/users/user-update-me.model.ts +++ b/shared/models/users/user-update-me.model.ts @@ -1,11 +1,10 @@ import { NSFWPolicyType } from '../videos/nsfw-policy.type' -import { WebTorrentPolicyType } from './user-webtorrent-policy.type' export interface UserUpdateMe { displayName?: string description?: string nsfwPolicy?: NSFWPolicyType, - webTorrentPolicy?: WebTorrentPolicyType, + webTorrentEnabled?: boolean, autoPlayVideo?: boolean email?: string currentPassword?: string diff --git a/shared/models/users/user-webtorrent-policy.type.ts b/shared/models/users/user-webtorrent-policy.type.ts deleted file mode 100644 index e293f761d..000000000 --- a/shared/models/users/user-webtorrent-policy.type.ts +++ /dev/null @@ -1 +0,0 @@ -export type WebTorrentPolicyType = 'enable' | 'disable' | 'disable_on_mobile' -- cgit v1.2.3