Browse Source

Changed main background

New chats pinned icon
master
Eduard Kuzmenko 4 years ago
parent
commit
225622b1e9
  1. 2
      src/components/appMediaViewer.ts
  2. 10
      src/lib/appManagers/appDialogsManager.ts
  3. 2
      src/lib/mtproto/mtprotoworker.ts
  4. 5
      src/scss/partials/_badge.scss
  5. 2
      src/scss/partials/_chat.scss
  6. 23
      src/scss/partials/_chatlist.scss
  7. 1138
      src/scss/partials/_fonts.scss
  8. 283
      src/scss/partials/_ico.scss
  9. 10
      src/scss/partials/_mediaViewer.scss

2
src/components/appMediaViewer.ts

@ -1109,7 +1109,7 @@ class AppMediaViewerBase<ContentAdditionType extends string, ButtonsAdditionType
return cancellablePromise; return cancellablePromise;
}; };
//this.lazyLoadQueue.unshift({load}); this.lazyLoadQueue.unshift({load});
}); });
} }

10
src/lib/appManagers/appDialogsManager.ts

@ -1067,7 +1067,6 @@ export class AppDialogsManager {
} else dom.statusSpan.classList.remove('tgico-check', 'tgico-checks'); } else dom.statusSpan.classList.remove('tgico-check', 'tgico-checks');
dom.unreadMessagesSpan.innerText = ''; dom.unreadMessagesSpan.innerText = '';
dom.unreadMessagesSpan.classList.remove('tgico-pinnedchat', 'tgico');
const filter = appMessagesManager.filtersStorage.filters[this.filterId]; const filter = appMessagesManager.filtersStorage.filters[this.filterId];
let isPinned: boolean; let isPinned: boolean;
@ -1077,15 +1076,18 @@ export class AppDialogsManager {
isPinned = !!dialog.pFlags.pinned; isPinned = !!dialog.pFlags.pinned;
} }
if(isPinned) {
dom.unreadMessagesSpan.classList.add('tgico-chatspinned', 'tgico');
} else {
dom.unreadMessagesSpan.classList.remove('tgico-chatspinned', 'tgico');
}
if(dialog.unread_count || dialog.pFlags.unread_mark) { if(dialog.unread_count || dialog.pFlags.unread_mark) {
//dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count ? formatNumber(dialog.unread_count, 1) : ' '); //dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count ? formatNumber(dialog.unread_count, 1) : ' ');
dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count || ' '); dom.unreadMessagesSpan.innerText = '' + (dialog.unread_count || ' ');
dom.unreadMessagesSpan.classList.add('unread'); dom.unreadMessagesSpan.classList.add('unread');
} else { } else {
dom.unreadMessagesSpan.classList.remove('unread'); dom.unreadMessagesSpan.classList.remove('unread');
if(isPinned) {
dom.unreadMessagesSpan.classList.add('tgico-pinnedchat', 'tgico');
}
} }
} }

2
src/lib/mtproto/mtprotoworker.ts

@ -115,7 +115,7 @@ export class ApiManagerProxy extends CryptoWorkerMethods {
} }
private registerWorker() { private registerWorker() {
return; //return;
const worker = new MTProtoWorker(); const worker = new MTProtoWorker();
worker.addEventListener('message', (e) => { worker.addEventListener('message', (e) => {

5
src/scss/partials/_badge.scss

@ -24,8 +24,11 @@
padding: 0 7.75px; padding: 0 7.75px;
&.tgico { &.tgico {
font-size: 1.5rem;
width: 1.5rem; width: 1.5rem;
&:before {
font-size: 1.5rem;
}
} }
} }

2
src/scss/partials/_chat.scss

@ -570,7 +570,7 @@ $chat-helper-size: 39px;
&:before { &:before {
content: ""; content: "";
display: block; display: block;
background-image: url('assets/img/camomile_blurred.jpg'); background-image: url('assets/img/bg.jpeg');
background-size: cover; background-size: cover;
background-position: center center; background-position: center center;

23
src/scss/partials/_chatlist.scss

@ -217,14 +217,35 @@
.dialog-subtitle-badge { .dialog-subtitle-badge {
margin-top: 4px; margin-top: 4px;
margin-right: -3px; margin-right: -3px;
margin-left: .25rem;
flex: 0 0 auto; flex: 0 0 auto;
} }
.tgico-chatspinned {
background: transparent;
position: relative;
&:before {
color: #a2abb2;
transition: opacity .2s ease-in-out;
opacity: 1;
position: absolute;
top: 0;
left: 0;
}
&.unread {
&:before {
opacity: 0;
}
}
}
.unread, li.is-muted.backwards .unread { .unread, li.is-muted.backwards .unread {
background: $color-green; background: $color-green;
} }
li.is-muted .unread, .tgico-pinnedchat { li.is-muted .unread {
background: #c5c9cc; background: #c5c9cc;
} }

1138
src/scss/partials/_fonts.scss

File diff suppressed because it is too large Load Diff

283
src/scss/partials/_ico.scss

@ -13,144 +13,145 @@ $tgico-font-path: "assets/fonts" !default;
.replace(/\.(.+?):before\{content:"(.+?);\}/g, `$$$1: "\\$2;\n`); .replace(/\.(.+?):before\{content:"(.+?);\}/g, `$$$1: "\\$2;\n`);
*/ */
$tgico-permissions: "\e900"; $tgico-zoomout: "\e900";
$tgico-phone: "\e901"; $tgico-username: "\e901";
$tgico-photo: "\e902"; $tgico-zoomin: "\e902";
$tgico-pin: "\e903"; $tgico-up: "\e903";
$tgico-pinlist: "\e904"; $tgico-user: "\e904";
$tgico-pinned_filled: "\e905"; $tgico-unmute: "\e905";
$tgico-pinnedchat: "\e906"; $tgico-unpin: "\e906";
$tgico-play: "\e907"; $tgico-unread: "\e907";
$tgico-poll: "\e908"; $tgico-unlock: "\e908";
$tgico-previous: "\e909"; $tgico-unarchive: "\e909";
$tgico-radiooff: "\e90a"; $tgico-underline: "\e90a";
$tgico-radioon: "\e90b"; $tgico-textedit: "\e90b";
$tgico-readchats: "\e90c"; $tgico-tip: "\e90c";
$tgico-recent: "\e90d"; $tgico-stop: "\e90d";
$tgico-replace: "\e90e"; $tgico-strikethrough: "\e90e";
$tgico-reply: "\e90f"; $tgico-smile: "\e90f";
$tgico-revote: "\e910"; $tgico-sport: "\e910";
$tgico-savedmessages: "\e911"; $tgico-stickers: "\e911";
$tgico-schedule: "\e912"; $tgico-settings: "\e912";
$tgico-scheduled: "\e913"; $tgico-smallscreen: "\e913";
$tgico-search: "\e914"; $tgico-sendingerror: "\e914";
$tgico-select: "\e915"; $tgico-send: "\e915";
$tgico-send: "\e916"; $tgico-sending: "\e916";
$tgico-send2: "\e917"; $tgico-select: "\e917";
$tgico-sending: "\e918"; $tgico-send2: "\e918";
$tgico-sendingerror: "\e919"; $tgico-scheduled: "\e919";
$tgico-settings: "\e91a"; $tgico-search: "\e91a";
$tgico-smallscreen: "\e91b"; $tgico-revote: "\e91b";
$tgico-smile: "\e91c"; $tgico-savedmessages: "\e91c";
$tgico-sport: "\e91d"; $tgico-schedule: "\e91d";
$tgico-stickers: "\e91e"; $tgico-replace: "\e91e";
$tgico-stop: "\e91f"; $tgico-reply: "\e91f";
$tgico-strikethrough: "\e920"; $tgico-radioon: "\e920";
$tgico-textedit: "\e921"; $tgico-readchats: "\e921";
$tgico-tip: "\e922"; $tgico-recent: "\e922";
$tgico-unarchive: "\e923"; $tgico-radiooff: "\e923";
$tgico-underline: "\e924"; $tgico-poll: "\e924";
$tgico-unlock: "\e925"; $tgico-previous: "\e925";
$tgico-unmute: "\e926"; $tgico-pinned_filled: "\e926";
$tgico-unpin: "\e927"; $tgico-pinnedchat: "\e927";
$tgico-unread: "\e928"; $tgico-play: "\e928";
$tgico-up: "\e929"; $tgico-photo: "\e929";
$tgico-user: "\e92a"; $tgico-pin: "\e92a";
$tgico-username: "\e92b"; $tgico-pinlist: "\e92b";
$tgico-zoomin: "\e92c"; $tgico-permissions: "\e92c";
$tgico-zoomout: "\e92d"; $tgico-phone: "\e92d";
$tgico-check: "\e92e"; $tgico-pause: "\e92e";
$tgico-checks: "\e92f"; $tgico-noncontacts: "\e92f";
$tgico-activesessions: "\e930"; $tgico-nosound: "\e930";
$tgico-add: "\e931"; $tgico-passwordoff: "\e931";
$tgico-addmember_filled: "\e932"; $tgico-newprivate: "\e932";
$tgico-adduser: "\e933"; $tgico-next: "\e933";
$tgico-admin: "\e934"; $tgico-newchat_filled: "\e934";
$tgico-animals: "\e935"; $tgico-newgroup: "\e935";
$tgico-archive: "\e936"; $tgico-muted: "\e936";
$tgico-arrow_back: "\e937"; $tgico-newchannel: "\e937";
$tgico-arrow_down: "\e938"; $tgico-more: "\e938";
$tgico-arrow_next: "\e939"; $tgico-mute: "\e939";
$tgico-attach: "\e93a"; $tgico-microphone: "\e93a";
$tgico-avatar_archivedchats: "\e93b"; $tgico-minus: "\e93b";
$tgico-avatar_deletedaccount: "\e93c"; $tgico-monospace: "\e93c";
$tgico-avatar_savedmessages: "\e93d"; $tgico-message: "\e93d";
$tgico-bold: "\e93e"; $tgico-microphone2: "\e93e";
$tgico-botcom: "\e93f"; $tgico-logout: "\e93f";
$tgico-bots: "\e940"; $tgico-mention: "\e940";
$tgico-calendar: "\e941"; $tgico-menu: "\e941";
$tgico-calendarfilter: "\e942"; $tgico-loginlogomobile: "\e942";
$tgico-camera: "\e943"; $tgico-lock: "\e943";
$tgico-cameraadd: "\e944"; $tgico-loginlogodesktop: "\e944";
$tgico-car: "\e945"; $tgico-livelocation: "\e945";
$tgico-channel: "\e946"; $tgico-location: "\e946";
$tgico-channelviews: "\e947"; $tgico-link: "\e947";
$tgico-chatsplaceholder: "\e948"; $tgico-language: "\e948";
$tgico-check1: "\e949"; $tgico-largepause: "\e949";
$tgico-checkbox: "\e94a"; $tgico-largeplay: "\e94a";
$tgico-checkboxblock: "\e94b"; $tgico-lamp: "\e94b";
$tgico-checkboxempty: "\e94c"; $tgico-keyboard: "\e94c";
$tgico-checkboxon: "\e94d"; $tgico-info: "\e94d";
$tgico-close: "\e94e"; $tgico-italic: "\e94e";
$tgico-clouddownload: "\e94f"; $tgico-group: "\e94f";
$tgico-colorize: "\e950"; $tgico-help: "\e950";
$tgico-comments: "\e951"; $tgico-info2: "\e951";
$tgico-commentssticker: "\e952"; $tgico-forward: "\e952";
$tgico-copy: "\e953"; $tgico-gifs: "\e953";
$tgico-data: "\e954"; $tgico-flag: "\e954";
$tgico-delete_filled: "\e955"; $tgico-folder: "\e955";
$tgico-delete: "\e956"; $tgico-eye1: "\e956";
$tgico-deleteleft: "\e957"; $tgico-eye2: "\e957";
$tgico-deleteuser: "\e958"; $tgico-favourites: "\e958";
$tgico-document: "\e959"; $tgico-edit: "\e959";
$tgico-down: "\e95a"; $tgico-email: "\e95a";
$tgico-download: "\e95b"; $tgico-eats: "\e95b";
$tgico-dragfiles: "\e95c"; $tgico-dragmedia: "\e95c";
$tgico-dragmedia: "\e95d"; $tgico-down: "\e95d";
$tgico-eats: "\e95e"; $tgico-download: "\e95e";
$tgico-edit: "\e95f"; $tgico-dragfiles: "\e95f";
$tgico-email: "\e960"; $tgico-deleteuser: "\e960";
$tgico-eye1: "\e961"; $tgico-document: "\e961";
$tgico-eye2: "\e962"; $tgico-delete_filled: "\e962";
$tgico-favourites: "\e963"; $tgico-delete: "\e963";
$tgico-flag: "\e964"; $tgico-deleteleft: "\e964";
$tgico-folder: "\e965"; $tgico-copy: "\e965";
$tgico-forward: "\e966"; $tgico-data: "\e966";
$tgico-fullscreen: "\e967"; $tgico-commentssticker: "\e967";
$tgico-gifs: "\e968"; $tgico-clouddownload: "\e968";
$tgico-group: "\e969"; $tgico-colorize: "\e969";
$tgico-help: "\e96a"; $tgico-comments: "\e96a";
$tgico-info: "\e96b"; $tgico-checkboxon: "\e96b";
$tgico-info2: "\e96c"; $tgico-close: "\e96c";
$tgico-italic: "\e96d"; $tgico-checkbox: "\e96d";
$tgico-keyboard: "\e96e"; $tgico-checkboxblock: "\e96e";
$tgico-lamp: "\e96f"; $tgico-checkboxempty: "\e96f";
$tgico-language: "\e970"; $tgico-chatsplaceholder: "\e970";
$tgico-largepause: "\e971"; $tgico-check: "\e971";
$tgico-largeplay: "\e972"; $tgico-channel: "\e972";
$tgico-link: "\e973"; $tgico-channelviews: "\e973";
$tgico-livelocation: "\e974"; $tgico-chatspinned: "\e974";
$tgico-location: "\e975"; $tgico-cameraadd: "\e975";
$tgico-lock: "\e976"; $tgico-car: "\e976";
$tgico-loginlogodesktop: "\e977"; $tgico-camera: "\e977";
$tgico-loginlogomobile: "\e978"; $tgico-bots: "\e978";
$tgico-logout: "\e979"; $tgico-calendar: "\e979";
$tgico-mention: "\e97a"; $tgico-calendarfilter: "\e97a";
$tgico-menu: "\e97b"; $tgico-botcom: "\e97b";
$tgico-message: "\e97c"; $tgico-avatar_deletedaccount: "\e97c";
$tgico-microphone: "\e97d"; $tgico-avatar_savedmessages: "\e97d";
$tgico-microphone2: "\e97e"; $tgico-bold: "\e97e";
$tgico-minus: "\e97f"; $tgico-attach: "\e97f";
$tgico-monospace: "\e980"; $tgico-avatar_archivedchats: "\e980";
$tgico-more: "\e981"; $tgico-arrow_next: "\e981";
$tgico-mute: "\e982"; $tgico-arrow_back: "\e982";
$tgico-muted: "\e983"; $tgico-arrow_down: "\e983";
$tgico-newchannel: "\e984"; $tgico-animals: "\e984";
$tgico-newchat_filled: "\e985"; $tgico-archive: "\e985";
$tgico-newgroup: "\e986"; $tgico-adduser: "\e986";
$tgico-newprivate: "\e987"; $tgico-admin: "\e987";
$tgico-next: "\e988"; $tgico-addmember_filled: "\e988";
$tgico-noncontacts: "\e989"; $tgico-activesessions: "\e989";
$tgico-nosound: "\e98a"; $tgico-add: "\e98a";
$tgico-passwordoff: "\e98b"; $tgico-fullscreen: "\e98b";
$tgico-pause: "\e98c"; $tgico-check_svg1: "\e98c";
$tgico-checks: "\e98d";

10
src/scss/partials/_mediaViewer.scss

@ -205,14 +205,18 @@
} }
} }
&-mover, &-canvas { &-mover/* , &-canvas */ {
position: fixed!important; position: fixed!important;
z-index: 4; z-index: 4;
//transition: .5s all; //transition: .5s all;
display: flex;
justify-content: center;
align-items: center; // mb net
min-height: auto!important;
left: 0; left: 0;
top: 0; top: 0;
//transform-origin: top left; transform-origin: top left;
transform-origin: bottom right; //transform-origin: bottom right;
overflow: hidden; overflow: hidden;
// эти значения должны быть такими же, как при установке maxWidth и maxHeight в openMedia! // эти значения должны быть такими же, как при установке maxWidth и maxHeight в openMedia!

Loading…
Cancel
Save