Browse Source

Button menu overflow

Delete folder popup confirmation
master
morethanwords 3 years ago
parent
commit
c141f24054
  1. 4
      .env
  2. 27
      src/components/sidebarLeft/tabs/editFolder.ts
  3. 2
      src/lang.ts
  4. 4
      src/scss/partials/_chatTopbar.scss
  5. 1
      src/scss/partials/_leftSidebar.scss
  6. 4
      src/scss/partials/_sidebar.scss

4
.env

@ -1,5 +1,5 @@ @@ -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

27
src/components/sidebarLeft/tabs/editFolder.ts

@ -20,6 +20,7 @@ import Button from "../../button"; @@ -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 { @@ -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]);

2
src/lang.ts

@ -691,6 +691,8 @@ const lang = { @@ -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",

4
src/scss/partials/_chatTopbar.scss

@ -152,8 +152,10 @@ @@ -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;
}
}

1
src/scss/partials/_leftSidebar.scss

@ -300,6 +300,7 @@ @@ -300,6 +300,7 @@
.btn-menu {
width: 300px;
max-height: calc(100 * var(--vh) - 3.75rem);
.archived-count {
justify-self: flex-end;

4
src/scss/partials/_sidebar.scss

@ -15,6 +15,10 @@ @@ -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;

Loading…
Cancel
Save