Browse Source

Build

master
Eduard Kuzmenko 4 years ago
parent
commit
7728d82fa2
  1. 2
      src/lib/appManagers/appDialogsManager.ts
  2. 4
      src/lib/appManagers/appPeersManager.ts
  3. 15
      src/lib/appManagers/appProfileManager.ts
  4. 7
      src/scss/partials/_chatBubble.scss
  5. 6
      src/scss/partials/_profile.scss
  6. 12
      src/scss/partials/_rightSidebar.scss

2
src/lib/appManagers/appDialogsManager.ts

@ -837,6 +837,8 @@ export class AppDialogsManager { @@ -837,6 +837,8 @@ export class AppDialogsManager {
}
private onListLengthChange = () => {
return;
const emptyFolder = this.chatList.parentElement.querySelector('.empty-folder');
if(this.scroll.loadedAll.bottom && !this.chatList.childElementCount) {
if(emptyFolder) {

4
src/lib/appManagers/appPeersManager.ts

@ -9,10 +9,10 @@ @@ -9,10 +9,10 @@
* https://github.com/zhukov/webogram/blob/master/LICENSE
*/
import type { ChatPhoto, DialogPeer, InputDialogPeer, InputNotifyPeer, InputPeer, Peer, Update, UserProfilePhoto } from "../../layer";
import type { LangPackKey } from "../langPack";
import { MOUNT_CLASS_TO } from "../../config/debug";
import { isObject } from "../../helpers/object";
import { ChatPhoto, DialogPeer, InputDialogPeer, InputNotifyPeer, InputPeer, Peer, Update, UserProfilePhoto } from "../../layer";
import { LangPackKey } from "../langPack";
import { RichTextProcessor } from "../richtextprocessor";
import rootScope from "../rootScope";
import appChatsManager from "./appChatsManager";

15
src/lib/appManagers/appProfileManager.ts

@ -14,7 +14,7 @@ import { tsNow } from "../../helpers/date"; @@ -14,7 +14,7 @@ import { tsNow } from "../../helpers/date";
import { replaceContent } from "../../helpers/dom";
import renderImageFromUrl from "../../helpers/dom/renderImageFromUrl";
import sequentialDom from "../../helpers/sequentialDom";
import { ChannelParticipantsFilter, ChannelsChannelParticipants, Chat, ChatFull, ChatParticipants, ChatPhoto, ExportedChatInvite, InputChannel, InputFile, InputFileLocation, PhotoSize, UserFull, UserProfilePhoto } from "../../layer";
import { ChannelParticipantsFilter, ChannelsChannelParticipants, Chat, ChatFull, ChatParticipants, ChatPhoto, ExportedChatInvite, InputChannel, InputFile, InputFileLocation, PhotoSize, Update, UserFull, UserProfilePhoto } from "../../layer";
//import apiManager from '../mtproto/apiManager';
import apiManager from '../mtproto/mtprotoworker';
import { RichTextProcessor } from "../richtextprocessor";
@ -376,7 +376,7 @@ export class AppProfileManager { @@ -376,7 +376,7 @@ export class AppProfileManager {
updates: [{
_: 'updateChannel',
channel_id: id
}],
} as Update.updateChannel],
chats: [channel],
users: []
});
@ -426,7 +426,7 @@ export class AppProfileManager { @@ -426,7 +426,7 @@ export class AppProfileManager {
date: tsNow(true),
photo: appUsersManager.getUser(myId).photo,
previous: true
}
} as Update.updateUserPhoto
});
});
}
@ -520,6 +520,10 @@ export class AppProfileManager { @@ -520,6 +520,10 @@ export class AppProfileManager {
}
const renderPromise = loadPromise.then((url) => {
/* if(photo.stripped_thumb) {
url = appPhotosManager.getPreviewURLFromBytes(photo.stripped_thumb);
} */
return new Promise<void>((resolve) => {
renderImageFromUrl(img, url, () => {
callback();
@ -537,7 +541,7 @@ export class AppProfileManager { @@ -537,7 +541,7 @@ export class AppProfileManager {
const size: PeerPhotoSize = 'photo_small';
const avatarAvailable = !!photo;
const avatarRendered = !!div.firstElementChild;
const avatarRendered = div.firstElementChild && !(div.firstElementChild as HTMLElement).classList.contains('emoji');
const myId = rootScope.myId;
@ -573,7 +577,8 @@ export class AppProfileManager { @@ -573,7 +577,8 @@ export class AppProfileManager {
let abbr: string;
if(!title) {
abbr = appPeersManager.getPeer(peerId).initials ?? '';
const peer = appPeersManager.getPeer(peerId);
abbr = peer.initials ?? '';
} else {
abbr = RichTextProcessor.getAbbreviation(title);
}

7
src/scss/partials/_chatBubble.scss

@ -1625,6 +1625,7 @@ $bubble-margin: .25rem; @@ -1625,6 +1625,7 @@ $bubble-margin: .25rem;
.bubble-content {
background-color: transparent;
border-radius: .875rem;
}
.service-msg {
@ -1632,9 +1633,9 @@ $bubble-margin: .25rem; @@ -1632,9 +1633,9 @@ $bubble-margin: .25rem;
//background-color: rgba(0, 0, 0, .24);
background-color: var(--message-highlightning-color);
font-size: .9375rem;
padding: .28125rem .5rem;
line-height: 1.3125;
border-radius: .75rem;
padding: .28125rem .625rem;
line-height: var(--line-height);
border-radius: inherit;
user-select: none;
display: flex;
align-items: center;

6
src/scss/partials/_profile.scss

@ -117,14 +117,14 @@ @@ -117,14 +117,14 @@
flex: 1 1 auto;
border-radius: 4px;
margin: 0 .125rem;
background-color: var(--secondary-color);
opacity: .3;
background-color: #fff;
opacity: .2;
transition: opacity .2s ease-in-out;
//min-width: 1.6875rem;
height: inherit;
&.active {
opacity: 1;
opacity: .6;
}
}
}

12
src/scss/partials/_rightSidebar.scss

@ -19,12 +19,13 @@ @@ -19,12 +19,13 @@
}
@include respond-to(not-handhelds) {
width: var(--right-column-width);
width: calc(var(--right-column-width));
transition: transform var(--transition-standard-out);
position: absolute;
right: 0;
z-index: 3;
transform: translate3d(calc(var(--right-column-width)), 0, 0);
transform: translate3d(var(--right-column-width), 0, 0);
//transform: translate3d(calc(var(--right-column-width) + 1px), 0, 0);
.sidebar-content {
min-width: var(--right-column-width);
@ -47,15 +48,18 @@ @@ -47,15 +48,18 @@
position: absolute;
content: " ";
display: block;
height: 56px;
//height: 56px;
height: 100vh;
width: 1px;
background-color: var(--border-color);
left: -1px;
left: 0px;
top: 0;
} */
}
@include respond-to(medium-screens) {
width: calc(var(--right-column-width) + 1px);
transform: translate3d(calc(var(--right-column-width) + 1px), 0, 0);
border-left: 1px solid var(--border-color);
}

Loading…
Cancel
Save