diff --git a/src/components/sidebarLeft/tabs/notifications.ts b/src/components/sidebarLeft/tabs/notifications.ts index 78ade348..48da17e5 100644 --- a/src/components/sidebarLeft/tabs/notifications.ts +++ b/src/components/sidebarLeft/tabs/notifications.ts @@ -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; 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({ diff --git a/src/lib/langPack.ts b/src/lib/langPack.ts index 99950d4b..717df687 100644 --- a/src/lib/langPack.ts +++ b/src/lib/langPack.ts @@ -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; diff --git a/src/scss/partials/_leftSidebar.scss b/src/scss/partials/_leftSidebar.scss index 1d32b189..c5723f3e 100644 --- a/src/scss/partials/_leftSidebar.scss +++ b/src/scss/partials/_leftSidebar.scss @@ -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;