Another temp commit

This commit is contained in:
morethanwords 2021-03-21 15:37:33 +04:00
parent 785dca7873
commit 2de727d616
3 changed files with 18 additions and 9 deletions

View File

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

View File

@ -41,11 +41,17 @@ namespace Strings {
export type AccountSettings = 'AccountSettings.Filters' | 'AccountSettings.Notifications' | 'AccountSettings.PrivacyAndSecurity' | 'AccountSettings.Language' | 'AccountSettings.Bio';
export type Telegram = 'Telegram.GeneralSettingsViewController';
export type Telegram = 'Telegram.GeneralSettingsViewController' | 'Telegram.NotificationSettingsViewController';
export type ChatFilters = 'ChatList.Filter.Header' | 'ChatList.Filter.NewTitle' | 'ChatList.Filter.List.Header' | 'ChatList.Filter.Recommended.Header' | 'ChatList.Filter.Recommended.Add' | 'ChatList.Filter.List.Title';
export type LangPackKey = AccountSettings | EditAccount | Telegram | ChatFilters | LoginRegister | Bio | string;
export type AutoDownloadSettings = 'AutoDownloadSettings.TypePrivateChats' | 'AutoDownloadSettings.TypeChannels';
export type DataAndStorage = 'DataAndStorage.CategorySettings.GroupChats';
export type Suggest = 'Suggest.Localization.Other';
export type LangPackKey = string | AccountSettings | EditAccount | Telegram | ChatFilters | LoginRegister | Bio | AutoDownloadSettings | DataAndStorage | Suggest;
}
export type LangPackKey = Strings.LangPackKey;

View File

@ -536,6 +536,8 @@
color: #707579;
font-size: 14px;
line-height: var(--line-height);
max-width: 20rem;
margin: 0 auto;
}
}
@ -562,7 +564,7 @@
}
.btn-primary {
width: 160px;
width: auto;
height: 40px;
align-items: center;
margin: 15px auto 1rem;