Fix ESG layout

This commit is contained in:
Eduard Kuzmenko 2023-01-12 18:47:02 +04:00
parent 921c7c2617
commit e207ea088f
8 changed files with 294 additions and 255 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

Binary file not shown.

View File

@ -101,7 +101,7 @@ export default class DialogsContextMenu {
onClick: this.onArchiveClick, onClick: this.onArchiveClick,
verify: () => this.filterId === 1 && this.peerId !== rootScope.myId verify: () => this.filterId === 1 && this.peerId !== rootScope.myId
}, { }, {
icon: 'eye2', icon: 'hide',
text: 'Hide', text: 'Hide',
onClick: this.hideTopic, onClick: this.hideTopic,
verify: async() => { verify: async() => {

View File

@ -232,11 +232,15 @@ export class StickersTabCategory<Item extends StickersTabCategoryItem, Additiona
} }
public setCategoryItemsHeight() { public setCategoryItemsHeight() {
if(this.id === 'Emoji.Recent') {
debugger;
}
const {width: containerWidth} = this.getContainerSize(); const {width: containerWidth} = this.getContainerSize();
const elementSize = this.getElementMediaSize().width; const elementSize = this.getElementMediaSize().width;
let itemsPerRow = containerWidth / elementSize; let itemsPerRow = containerWidth / elementSize;
if(this.gapX) itemsPerRow -= (itemsPerRow - 1) * this.gapX / elementSize; if(this.gapX) itemsPerRow -= Math.floor(itemsPerRow - 1) * this.gapX / elementSize;
itemsPerRow = Math.floor(itemsPerRow); itemsPerRow = Math.floor(itemsPerRow);
const rows = Math.ceil(this.items.length / itemsPerRow); const rows = Math.ceil(this.items.length / itemsPerRow);

View File

@ -159,14 +159,14 @@ export default class PopupNewMedia extends PopupElement {
let target: HTMLElement, isMedia: boolean, item: SendFileParams; let target: HTMLElement, isMedia: boolean, item: SendFileParams;
createContextMenu({ createContextMenu({
buttons: [{ buttons: [{
icon: 'spoiler', icon: 'mediaspoiler',
text: 'EnablePhotoSpoiler', text: 'EnablePhotoSpoiler',
onClick: () => { onClick: () => {
this.applyMediaSpoiler(item); this.applyMediaSpoiler(item);
}, },
verify: () => isMedia && !item.mediaSpoiler verify: () => isMedia && !item.mediaSpoiler
}, { }, {
icon: 'spoiler', icon: 'mediaspoileroff',
text: 'DisablePhotoSpoiler', text: 'DisablePhotoSpoiler',
onClick: () => { onClick: () => {
toggleMediaSpoiler({ toggleMediaSpoiler({

View File

@ -3,9 +3,9 @@
@font-face { @font-face {
font-family: '#{$tgico-font-family}'; font-family: '#{$tgico-font-family}';
src: src:
url('#{$tgico-font-path}/#{$tgico-font-family}.ttf?vqhlcw') format('truetype'), url('#{$tgico-font-path}/#{$tgico-font-family}.ttf?ivbp49') format('truetype'),
url('#{$tgico-font-path}/#{$tgico-font-family}.woff?vqhlcw') format('woff'), url('#{$tgico-font-path}/#{$tgico-font-family}.woff?ivbp49') format('woff'),
url('#{$tgico-font-path}/#{$tgico-font-family}.svg?vqhlcw##{$tgico-font-family}') format('svg'); url('#{$tgico-font-path}/#{$tgico-font-family}.svg?ivbp49##{$tgico-font-family}') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
@ -437,11 +437,26 @@
content: $tgico-group; content: $tgico-group;
} }
} }
.tgico-groupmedia {
&:before {
content: $tgico-groupmedia;
}
}
.tgico-groupmediaoff {
&:before {
content: $tgico-groupmediaoff;
}
}
.tgico-help { .tgico-help {
&:before { &:before {
content: $tgico-help; content: $tgico-help;
} }
} }
.tgico-hide {
&:before {
content: $tgico-hide;
}
}
.tgico-image { .tgico-image {
&:before { &:before {
content: $tgico-image; content: $tgico-image;
@ -567,6 +582,16 @@
content: $tgico-logout; content: $tgico-logout;
} }
} }
.tgico-mediaspoiler {
&:before {
content: $tgico-mediaspoiler;
}
}
.tgico-mediaspoileroff {
&:before {
content: $tgico-mediaspoileroff;
}
}
.tgico-mention { .tgico-mention {
&:before { &:before {
content: $tgico-mention; content: $tgico-mention;

View File

@ -79,128 +79,133 @@ $tgico-gc_microphone: "\e94d";
$tgico-gc_microphoneoff: "\e94e"; $tgico-gc_microphoneoff: "\e94e";
$tgico-gifs: "\e94f"; $tgico-gifs: "\e94f";
$tgico-group: "\e950"; $tgico-group: "\e950";
$tgico-help: "\e951"; $tgico-groupmedia: "\e951";
$tgico-image: "\e952"; $tgico-groupmediaoff: "\e952";
$tgico-info: "\e953"; $tgico-help: "\e953";
$tgico-info2: "\e954"; $tgico-hide: "\e954";
$tgico-italic: "\e955"; $tgico-image: "\e955";
$tgico-keyboard: "\e956"; $tgico-info: "\e956";
$tgico-lamp: "\e957"; $tgico-info2: "\e957";
$tgico-language: "\e958"; $tgico-italic: "\e958";
$tgico-largepause: "\e959"; $tgico-keyboard: "\e959";
$tgico-largeplay: "\e95a"; $tgico-lamp: "\e95a";
$tgico-left: "\e95b"; $tgico-language: "\e95b";
$tgico-limit_chat: "\e95c"; $tgico-largepause: "\e95c";
$tgico-limit_chats: "\e95d"; $tgico-largeplay: "\e95d";
$tgico-limit_file: "\e95e"; $tgico-left: "\e95e";
$tgico-limit_folders: "\e95f"; $tgico-limit_chat: "\e95f";
$tgico-limit_link: "\e960"; $tgico-limit_chats: "\e960";
$tgico-limit_pin: "\e961"; $tgico-limit_file: "\e961";
$tgico-link: "\e962"; $tgico-limit_folders: "\e962";
$tgico-listscreenshare: "\e963"; $tgico-limit_link: "\e963";
$tgico-livelocation: "\e964"; $tgico-limit_pin: "\e964";
$tgico-location: "\e965"; $tgico-link: "\e965";
$tgico-lock: "\e966"; $tgico-listscreenshare: "\e966";
$tgico-lockoff: "\e967"; $tgico-livelocation: "\e967";
$tgico-loginlogodesktop: "\e968"; $tgico-location: "\e968";
$tgico-loginlogomobile: "\e969"; $tgico-lock: "\e969";
$tgico-logout: "\e96a"; $tgico-lockoff: "\e96a";
$tgico-mention: "\e96b"; $tgico-loginlogodesktop: "\e96b";
$tgico-menu: "\e96c"; $tgico-loginlogomobile: "\e96c";
$tgico-message: "\e96d"; $tgico-logout: "\e96d";
$tgico-messageunread: "\e96e"; $tgico-mediaspoiler: "\e96e";
$tgico-microphone: "\e96f"; $tgico-mediaspoileroff: "\e96f";
$tgico-microphone_crossed: "\e970"; $tgico-mention: "\e970";
$tgico-microphone_crossed_filled: "\e971"; $tgico-menu: "\e971";
$tgico-microphone_filled: "\e972"; $tgico-message: "\e972";
$tgico-minus: "\e973"; $tgico-messageunread: "\e973";
$tgico-monospace: "\e974"; $tgico-microphone: "\e974";
$tgico-more: "\e975"; $tgico-microphone_crossed: "\e975";
$tgico-mute: "\e976"; $tgico-microphone_crossed_filled: "\e976";
$tgico-muted: "\e977"; $tgico-microphone_filled: "\e977";
$tgico-newchannel: "\e978"; $tgico-minus: "\e978";
$tgico-newchat_filled: "\e979"; $tgico-monospace: "\e979";
$tgico-newgroup: "\e97a"; $tgico-more: "\e97a";
$tgico-newprivate: "\e97b"; $tgico-mute: "\e97b";
$tgico-next: "\e97c"; $tgico-muted: "\e97c";
$tgico-noncontacts: "\e97d"; $tgico-newchannel: "\e97d";
$tgico-nosound: "\e97e"; $tgico-newchat_filled: "\e97e";
$tgico-passwordoff: "\e97f"; $tgico-newgroup: "\e97f";
$tgico-pause: "\e980"; $tgico-newprivate: "\e980";
$tgico-permissions: "\e981"; $tgico-next: "\e981";
$tgico-phone: "\e982"; $tgico-noncontacts: "\e982";
$tgico-pin: "\e983"; $tgico-nosound: "\e983";
$tgico-pinlist: "\e984"; $tgico-passwordoff: "\e984";
$tgico-pinned_filled: "\e985"; $tgico-pause: "\e985";
$tgico-pinnedchat: "\e986"; $tgico-permissions: "\e986";
$tgico-pip: "\e987"; $tgico-phone: "\e987";
$tgico-play: "\e988"; $tgico-pin: "\e988";
$tgico-playback_05: "\e989"; $tgico-pinlist: "\e989";
$tgico-playback_15: "\e98a"; $tgico-pinned_filled: "\e98a";
$tgico-playback_1x: "\e98b"; $tgico-pinnedchat: "\e98b";
$tgico-playback_2x: "\e98c"; $tgico-pip: "\e98c";
$tgico-plus: "\e98d"; $tgico-play: "\e98d";
$tgico-poll: "\e98e"; $tgico-playback_05: "\e98e";
$tgico-premium_addone: "\e98f"; $tgico-playback_15: "\e98f";
$tgico-premium_double: "\e990"; $tgico-playback_1x: "\e990";
$tgico-premium_lock: "\e991"; $tgico-playback_2x: "\e991";
$tgico-premium_unlock: "\e992"; $tgico-plus: "\e992";
$tgico-previous: "\e993"; $tgico-poll: "\e993";
$tgico-radiooff: "\e994"; $tgico-premium_addone: "\e994";
$tgico-radioon: "\e995"; $tgico-premium_double: "\e995";
$tgico-reactions: "\e996"; $tgico-premium_lock: "\e996";
$tgico-readchats: "\e997"; $tgico-premium_unlock: "\e997";
$tgico-recent: "\e998"; $tgico-previous: "\e998";
$tgico-replace: "\e999"; $tgico-radiooff: "\e999";
$tgico-reply: "\e99a"; $tgico-radioon: "\e99a";
$tgico-reply_filled: "\e99b"; $tgico-reactions: "\e99b";
$tgico-rightpanel: "\e99c"; $tgico-readchats: "\e99c";
$tgico-rotate_left: "\e99d"; $tgico-recent: "\e99d";
$tgico-rotate_right: "\e99e"; $tgico-replace: "\e99e";
$tgico-saved: "\e99f"; $tgico-reply: "\e99f";
$tgico-savedmessages: "\e9a0"; $tgico-reply_filled: "\e9a0";
$tgico-schedule: "\e9a1"; $tgico-rightpanel: "\e9a1";
$tgico-scheduled: "\e9a2"; $tgico-rotate_left: "\e9a2";
$tgico-search: "\e9a3"; $tgico-rotate_right: "\e9a3";
$tgico-select: "\e9a4"; $tgico-saved: "\e9a4";
$tgico-send: "\e9a5"; $tgico-savedmessages: "\e9a5";
$tgico-send2: "\e9a6"; $tgico-schedule: "\e9a6";
$tgico-sending: "\e9a7"; $tgico-scheduled: "\e9a7";
$tgico-sendingerror: "\e9a8"; $tgico-search: "\e9a8";
$tgico-settings: "\e9a9"; $tgico-select: "\e9a9";
$tgico-settings_filled: "\e9aa"; $tgico-send: "\e9aa";
$tgico-sharescreen_filled: "\e9ab"; $tgico-send2: "\e9ab";
$tgico-shipping: "\e9ac"; $tgico-sending: "\e9ac";
$tgico-shuffle: "\e9ad"; $tgico-sendingerror: "\e9ad";
$tgico-smallscreen: "\e9ae"; $tgico-settings: "\e9ae";
$tgico-smile: "\e9af"; $tgico-settings_filled: "\e9af";
$tgico-spoiler: "\e9b0"; $tgico-sharescreen_filled: "\e9b0";
$tgico-sport: "\e9b1"; $tgico-shipping: "\e9b1";
$tgico-star: "\e9b2"; $tgico-shuffle: "\e9b2";
$tgico-stickers: "\e9b3"; $tgico-smallscreen: "\e9b3";
$tgico-stickers_face: "\e9b4"; $tgico-smile: "\e9b4";
$tgico-stop: "\e9b5"; $tgico-spoiler: "\e9b5";
$tgico-strikethrough: "\e9b6"; $tgico-sport: "\e9b6";
$tgico-textedit: "\e9b7"; $tgico-star: "\e9b7";
$tgico-tip: "\e9b8"; $tgico-stickers: "\e9b8";
$tgico-tools: "\e9b9"; $tgico-stickers_face: "\e9b9";
$tgico-topics: "\e9ba"; $tgico-stop: "\e9ba";
$tgico-unarchive: "\e9bb"; $tgico-strikethrough: "\e9bb";
$tgico-underline: "\e9bc"; $tgico-textedit: "\e9bc";
$tgico-unmute: "\e9bd"; $tgico-tip: "\e9bd";
$tgico-unpin: "\e9be"; $tgico-tools: "\e9be";
$tgico-unread: "\e9bf"; $tgico-topics: "\e9bf";
$tgico-up: "\e9c0"; $tgico-unarchive: "\e9c0";
$tgico-user: "\e9c1"; $tgico-underline: "\e9c1";
$tgico-username: "\e9c2"; $tgico-unmute: "\e9c2";
$tgico-videocamera: "\e9c3"; $tgico-unpin: "\e9c3";
$tgico-videocamera_crossed_filled: "\e9c4"; $tgico-unread: "\e9c4";
$tgico-videocamera_filled: "\e9c5"; $tgico-up: "\e9c5";
$tgico-videochat: "\e9c6"; $tgico-user: "\e9c6";
$tgico-volume_down: "\e9c7"; $tgico-username: "\e9c7";
$tgico-volume_mute: "\e9c8"; $tgico-videocamera: "\e9c8";
$tgico-volume_off: "\e9c9"; $tgico-videocamera_crossed_filled: "\e9c9";
$tgico-volume_up: "\e9ca"; $tgico-videocamera_filled: "\e9ca";
$tgico-zoomin: "\e9cb"; $tgico-videochat: "\e9cb";
$tgico-zoomout: "\e9cc"; $tgico-volume_down: "\e9cc";
$tgico-volume_mute: "\e9cd";
$tgico-volume_off: "\e9ce";
$tgico-volume_up: "\e9cf";
$tgico-zoomin: "\e9d0";
$tgico-zoomout: "\e9d1";