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 {
} }
private onListLengthChange = () => { private onListLengthChange = () => {
return;
const emptyFolder = this.chatList.parentElement.querySelector('.empty-folder'); const emptyFolder = this.chatList.parentElement.querySelector('.empty-folder');
if(this.scroll.loadedAll.bottom && !this.chatList.childElementCount) { if(this.scroll.loadedAll.bottom && !this.chatList.childElementCount) {
if(emptyFolder) { if(emptyFolder) {

4
src/lib/appManagers/appPeersManager.ts

@ -9,10 +9,10 @@
* https://github.com/zhukov/webogram/blob/master/LICENSE * 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 { MOUNT_CLASS_TO } from "../../config/debug";
import { isObject } from "../../helpers/object"; 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 { RichTextProcessor } from "../richtextprocessor";
import rootScope from "../rootScope"; import rootScope from "../rootScope";
import appChatsManager from "./appChatsManager"; import appChatsManager from "./appChatsManager";

15
src/lib/appManagers/appProfileManager.ts

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

7
src/scss/partials/_chatBubble.scss

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

6
src/scss/partials/_profile.scss

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

12
src/scss/partials/_rightSidebar.scss

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

Loading…
Cancel
Save