Another temp commit
This commit is contained in:
parent
945acf5df0
commit
323b37d5e5
@ -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({
|
||||||
|
@ -41,11 +41,17 @@ namespace Strings {
|
|||||||
|
|
||||||
export type AccountSettings = 'AccountSettings.Filters' | 'AccountSettings.Notifications' | 'AccountSettings.PrivacyAndSecurity' | 'AccountSettings.Language' | 'AccountSettings.Bio';
|
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 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;
|
export type LangPackKey = Strings.LangPackKey;
|
||||||
|
@ -536,6 +536,8 @@
|
|||||||
color: #707579;
|
color: #707579;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: var(--line-height);
|
line-height: var(--line-height);
|
||||||
|
max-width: 20rem;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,7 +564,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
width: 160px;
|
width: auto;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 15px auto 1rem;
|
margin: 15px auto 1rem;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user