Browse Source

Another temp commit

master
morethanwords 4 years ago
parent
commit
323b37d5e5
  1. 13
      src/components/sidebarLeft/tabs/notifications.ts
  2. 10
      src/lib/langPack.ts
  3. 4
      src/scss/partials/_leftSidebar.scss

13
src/components/sidebarLeft/tabs/notifications.ts

@ -7,16 +7,17 @@ import { SliderSuperTabEventable } from "../../sliderTab"; @@ -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 { @@ -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({

10
src/lib/langPack.ts

@ -41,11 +41,17 @@ namespace Strings { @@ -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;

4
src/scss/partials/_leftSidebar.scss

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

Loading…
Cancel
Save