diff --git a/.env b/.env index 75ff0ba6..bbd726a3 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ API_ID=1025907 API_HASH=452b0359b988148995f22ff0f4229750 VERSION=0.9.0 -VERSION_FULL=0.9.0 (12) -BUILD=12 +VERSION_FULL=0.9.0 (13) +BUILD=13 diff --git a/src/components/sidebarLeft/tabs/editFolder.ts b/src/components/sidebarLeft/tabs/editFolder.ts index 5be328fe..8410f853 100644 --- a/src/components/sidebarLeft/tabs/editFolder.ts +++ b/src/components/sidebarLeft/tabs/editFolder.ts @@ -20,6 +20,7 @@ import Button from "../../button"; import AppIncludedChatsTab from "./includedChats"; import { i18n, i18n_, LangPackKey } from "../../../lib/langPack"; import { SettingSection } from ".."; +import PopupPeer from "../../popups/peer"; const MAX_FOLDER_NAME_LENGTH = 12; @@ -55,14 +56,24 @@ export default class AppEditFolderTab extends SliderSuperTab { icon: 'delete danger', text: 'FilterMenuDelete', onClick: () => { - deleteFolderButton.element.setAttribute('disabled', 'true'); - appMessagesManager.filtersStorage.updateDialogFilter(this.filter, true).then(bool => { - if(bool) { - this.close(); - } - }).finally(() => { - deleteFolderButton.element.removeAttribute('disabled'); - }); + new PopupPeer('filter-delete', { + titleLangKey: 'ChatList.Filter.Confirm.Remove.Header', + descriptionLangKey: 'ChatList.Filter.Confirm.Remove.Text', + buttons: [{ + langKey: 'Delete', + callback: () => { + deleteFolderButton.element.setAttribute('disabled', 'true'); + appMessagesManager.filtersStorage.updateDialogFilter(this.filter, true).then(bool => { + if(bool) { + this.close(); + } + }).finally(() => { + deleteFolderButton.element.removeAttribute('disabled'); + }); + }, + isDanger: true + }] + }).show(); } }; this.menuBtn = ButtonMenuToggle({}, 'bottom-left', [deleteFolderButton]); diff --git a/src/lang.ts b/src/lang.ts index b72114da..d4338c2b 100644 --- a/src/lang.ts +++ b/src/lang.ts @@ -691,6 +691,8 @@ const lang = { "ChatList.Filter.Archive": "Archived", "ChatList.Filter.Include.LimitReached": "Sorry, you can only add up to 100 individual chats. Try using chat types.", "ChatList.Filter.Exclude.LimitReached": "Sorry, you can only add up to 100 individual chats. Try using chat types.", + "ChatList.Filter.Confirm.Remove.Header": "Remove Folder", + "ChatList.Filter.Confirm.Remove.Text": "Are you sure you want to remove this folder? Your chats will not be deleted.", "Channel.DescriptionHolderDescrpiton": "You can provide an optional description for your channel.", "CreateGroup.NameHolder": "Group Name", "Date.Today": "Today", diff --git a/src/scss/partials/_chatTopbar.scss b/src/scss/partials/_chatTopbar.scss index 67bf537a..e8df3538 100644 --- a/src/scss/partials/_chatTopbar.scss +++ b/src/scss/partials/_chatTopbar.scss @@ -152,8 +152,10 @@ .btn-menu-toggle { .btn-menu { top: calc(100% + 7px); - + max-height: calc(100 * var(--vh) - 4.375rem); + @include respond-to(handhelds) { + max-height: calc(100 * var(--vh) - 3.75rem); top: 29px; } } diff --git a/src/scss/partials/_leftSidebar.scss b/src/scss/partials/_leftSidebar.scss index 8de88498..a583cbb0 100644 --- a/src/scss/partials/_leftSidebar.scss +++ b/src/scss/partials/_leftSidebar.scss @@ -300,6 +300,7 @@ .btn-menu { width: 300px; + max-height: calc(100 * var(--vh) - 3.75rem); .archived-count { justify-self: flex-end; diff --git a/src/scss/partials/_sidebar.scss b/src/scss/partials/_sidebar.scss index 8b0fc60a..9c9b2f59 100644 --- a/src/scss/partials/_sidebar.scss +++ b/src/scss/partials/_sidebar.scss @@ -15,6 +15,10 @@ flex: 0 0 auto; user-select: none; cursor: default; + + .btn-menu { + overflow-y: overlay; + } @include respond-to(handhelds) { padding: 0 .5rem;