|
|
@ -7,16 +7,17 @@ import { SliderSuperTabEventable } from "../../sliderTab"; |
|
|
|
import { copy } from "../../../helpers/object"; |
|
|
|
import { copy } from "../../../helpers/object"; |
|
|
|
import rootScope from "../../../lib/rootScope"; |
|
|
|
import rootScope from "../../../lib/rootScope"; |
|
|
|
import { convertKeyToInputKey } from "../../../helpers/string"; |
|
|
|
import { convertKeyToInputKey } from "../../../helpers/string"; |
|
|
|
|
|
|
|
import { LangPackKey } from "../../../lib/langPack"; |
|
|
|
|
|
|
|
|
|
|
|
type InputNotifyKey = Exclude<InputNotifyPeer['_'], 'inputNotifyPeer'>; |
|
|
|
type InputNotifyKey = Exclude<InputNotifyPeer['_'], 'inputNotifyPeer'>; |
|
|
|
|
|
|
|
|
|
|
|
export default class AppNotificationsTab extends SliderSuperTabEventable { |
|
|
|
export default class AppNotificationsTab extends SliderSuperTabEventable { |
|
|
|
protected init() { |
|
|
|
protected init() { |
|
|
|
this.container.classList.add('notifications-container'); |
|
|
|
this.container.classList.add('notifications-container'); |
|
|
|
this.title.innerText = 'Notifications'; |
|
|
|
this.setTitle('Telegram.NotificationSettingsViewController'); |
|
|
|
|
|
|
|
|
|
|
|
const NotifySection = (options: { |
|
|
|
const NotifySection = (options: { |
|
|
|
name: string, |
|
|
|
name: LangPackKey, |
|
|
|
typeText: string, |
|
|
|
typeText: string, |
|
|
|
inputKey: InputNotifyKey, |
|
|
|
inputKey: InputNotifyKey, |
|
|
|
}) => { |
|
|
|
}) => { |
|
|
@ -78,26 +79,26 @@ export default class AppNotificationsTab extends SliderSuperTabEventable { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
NotifySection({ |
|
|
|
NotifySection({ |
|
|
|
name: 'Private Chats', |
|
|
|
name: 'AutoDownloadSettings.TypePrivateChats', |
|
|
|
typeText: 'Notifications for private chats', |
|
|
|
typeText: 'Notifications for private chats', |
|
|
|
inputKey: 'inputNotifyUsers' |
|
|
|
inputKey: 'inputNotifyUsers' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
NotifySection({ |
|
|
|
NotifySection({ |
|
|
|
name: 'Groups', |
|
|
|
name: 'DataAndStorage.CategorySettings.GroupChats', |
|
|
|
typeText: 'Notifications for groups', |
|
|
|
typeText: 'Notifications for groups', |
|
|
|
inputKey: 'inputNotifyChats' |
|
|
|
inputKey: 'inputNotifyChats' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
NotifySection({ |
|
|
|
NotifySection({ |
|
|
|
name: 'Channels', |
|
|
|
name: 'AutoDownloadSettings.TypeChannels', |
|
|
|
typeText: 'Notifications for channels', |
|
|
|
typeText: 'Notifications for channels', |
|
|
|
inputKey: 'inputNotifyBroadcasts' |
|
|
|
inputKey: 'inputNotifyBroadcasts' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
const section = new SettingSection({ |
|
|
|
const section = new SettingSection({ |
|
|
|
name: 'Other' |
|
|
|
name: 'Suggest.Localization.Other' |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const contactsSignUpRow = new Row({ |
|
|
|
const contactsSignUpRow = new Row({ |
|
|
|