morethanwords
4 years ago
28 changed files with 1135 additions and 1717 deletions
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
import { ripple } from "./ripple"; |
||||
|
||||
const Button = (className: string, options: Partial<{noRipple: true, onlyMobile: true, icon: string}> = {}) => { |
||||
const button = document.createElement('button'); |
||||
button.className = className + (options.icon ? ' tgico-' + options.icon : ''); |
||||
if(!options.noRipple) ripple(button); |
||||
if(options.onlyMobile) button.classList.add('only-handhelds'); |
||||
return button; |
||||
}; |
||||
|
||||
export default Button; |
@ -1,10 +1,7 @@
@@ -1,10 +1,7 @@
|
||||
import { ripple } from "./ripple"; |
||||
import Button from "./button"; |
||||
|
||||
const ButtonIcon = (className: string, options: Partial<{noRipple: true, onlyMobile: true}> = {}) => { |
||||
const button = document.createElement('button'); |
||||
button.className = `btn-icon tgico-${className}`; |
||||
if(!options.noRipple) ripple(button); |
||||
if(options.onlyMobile) button.classList.add('only-handhelds'); |
||||
const button = Button('btn-icon', {icon: className, ...options}); |
||||
return button; |
||||
}; |
||||
|
||||
|
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
import appImManager from "../lib/appManagers/appImManager"; |
||||
import AppSelectPeers from "./appSelectPeers"; |
||||
import { PopupElement } from "./popup"; |
||||
|
||||
export default class PopupForward extends PopupElement { |
||||
private selector: AppSelectPeers; |
||||
//private scrollable: Scrollable;
|
||||
|
||||
constructor(mids: number[], onSelect?: () => Promise<void> | void) { |
||||
super('popup-forward', null, {closable: true, body: true}); |
||||
|
||||
this.selector = new AppSelectPeers(this.body, async() => { |
||||
const peerID = this.selector.getSelected()[0]; |
||||
this.closeBtn.click(); |
||||
|
||||
this.selector = null; |
||||
|
||||
await (onSelect ? onSelect() || Promise.resolve() : Promise.resolve()); |
||||
|
||||
appImManager.setPeer(peerID); |
||||
appImManager.chatInputC.initMessagesForward(mids.slice()); |
||||
}, ['dialogs', 'contacts'], () => { |
||||
this.show(); |
||||
}, null, 'send', false); |
||||
|
||||
//this.scrollable = new Scrollable(this.body);
|
||||
|
||||
this.selector.input.placeholder = 'Forward to...'; |
||||
this.title.append(this.selector.input); |
||||
} |
||||
|
||||
} |
File diff suppressed because it is too large
Load Diff
@ -1,25 +1,129 @@
@@ -1,25 +1,129 @@
|
||||
// ! https://icomoon.io/app/#/select |
||||
|
||||
$tgico-font-family: "tgico" !default; |
||||
$tgico-font-path: "assets/fonts" !default; |
||||
|
||||
$tgico-check: "\e900"; |
||||
$tgico-checks: "\e901"; |
||||
$tgico-archive: "\e908"; |
||||
$tgico-back: "\e90d"; |
||||
$tgico-sending: "\e95f"; |
||||
$tgico-close: "\e91b"; |
||||
$tgico-next: "\e94a"; |
||||
$tgico-pin: "\e951"; |
||||
$tgico-largepause: "\e938"; |
||||
$tgico-largeplay: "\e939"; |
||||
$tgico-mute: "\e944"; |
||||
$tgico-readchats: "\e957"; |
||||
$tgico-unmute: "\e96a"; |
||||
$tgico-unread: "\e96c"; |
||||
$tgico-unpin: "\e96b"; |
||||
$tgico-unarchive: "\e968"; |
||||
$tgico-smile: "\e963"; |
||||
$tgico-info2: "\e934"; |
||||
$tgico-keyboard: "\e935"; |
||||
/* |
||||
! CAN RUN IN DEVELOPER TOOLS TO CONVERT FONT TO VARIABLES: |
||||
`.tgico-select:before { |
||||
content: "\e900"; |
||||
}` |
||||
.replace(/([\s])|(_svg)|(1x)/g, '') |
||||
.replace(/\.(.+?):before\{content:"(.+?);\}/g, `$$$1: "\\$2;\n`); |
||||
*/ |
||||
|
||||
$tgico-select: "\e900"; |
||||
$tgico-info2: "\e901"; |
||||
$tgico-clouddownload: "\e902"; |
||||
$tgico-readchats: "\e903"; |
||||
$tgico-noncontacts: "\e904"; |
||||
$tgico-bots: "\e905"; |
||||
$tgico-muted: "\e906"; |
||||
$tgico-favourites: "\e907"; |
||||
$tgico-tip: "\e908"; |
||||
$tgico-loginlogodesktop: "\e909"; |
||||
$tgico-loginlogomobile: "\e90a"; |
||||
$tgico-calendar: "\e90b"; |
||||
$tgico-keyboard: "\e90c"; |
||||
$tgico-gifs: "\e90d"; |
||||
$tgico-stickers: "\e90e"; |
||||
$tgico-deleteleft: "\e90f"; |
||||
$tgico-folder: "\e910"; |
||||
$tgico-revote: "\e911"; |
||||
$tgico-livelocation: "\e912"; |
||||
$tgico-microphone2: "\e913"; |
||||
$tgico-colorize: "\e914"; |
||||
$tgico-poll: "\e915"; |
||||
$tgico-minus: "\e916"; |
||||
$tgico-nosound: "\e917"; |
||||
$tgico-microphone: "\e918"; |
||||
$tgico-largeplay: "\e919"; |
||||
$tgico-largepause: "\e91a"; |
||||
$tgico-newchannel: "\e91b"; |
||||
$tgico-newgroup: "\e91c"; |
||||
$tgico-newprivate: "\e91d"; |
||||
$tgico-chatsplaceholder: "\e91e"; |
||||
$tgico-newchat_filled: "\e91f"; |
||||
$tgico-addmember_filled: "\e920"; |
||||
$tgico-delete: "\e921"; |
||||
$tgico-delete_filled: "\e922"; |
||||
$tgico-send2: "\e923"; |
||||
$tgico-avatar_deletedaccount: "\e924"; |
||||
$tgico-avatar_archivedchats: "\e925"; |
||||
$tgico-avatar_savedmessages: "\e926"; |
||||
$tgico-pinnedchat: "\e927"; |
||||
$tgico-channelviews: "\e928"; |
||||
$tgico-sendingerror: "\e929"; |
||||
$tgico-sending: "\e92a"; |
||||
$tgico-check: "\e92b"; |
||||
$tgico-checks: "\e92c"; |
||||
$tgico-radioon: "\e92d"; |
||||
$tgico-radiooff: "\e92e"; |
||||
$tgico-checkboxempty: "\e92f"; |
||||
$tgico-checkboxblock: "\e930"; |
||||
$tgico-checkboxon: "\e931"; |
||||
$tgico-eye2: "\e932"; |
||||
$tgico-eye1: "\e933"; |
||||
$tgico-FullScreen: "\e934"; |
||||
$tgico-smallscreen: "\e935"; |
||||
$tgico-flag: "\e936"; |
||||
$tgico-lamp: "\e937"; |
||||
$tgico-sport: "\e938"; |
||||
$tgico-car: "\e939"; |
||||
$tgico-eats: "\e93a"; |
||||
$tgico-animals: "\e93b"; |
||||
$tgico-smile: "\e93c"; |
||||
$tgico-unpin: "\e93d"; |
||||
$tgico-send: "\e93e"; |
||||
$tgico-unread: "\e93f"; |
||||
$tgico-settings: "\e940"; |
||||
$tgico-edit: "\e941"; |
||||
$tgico-download: "\e942"; |
||||
$tgico-cameraadd: "\e943"; |
||||
$tgico-camera: "\e944"; |
||||
$tgico-permissions: "\e945"; |
||||
$tgico-admin: "\e946"; |
||||
$tgico-stop: "\e947"; |
||||
$tgico-username: "\e948"; |
||||
$tgico-location: "\e949"; |
||||
$tgico-info: "\e94a"; |
||||
$tgico-deleteuser: "\e94b"; |
||||
$tgico-adduser: "\e94c"; |
||||
$tgico-recent: "\e94d"; |
||||
$tgico-channel: "\e94e"; |
||||
$tgico-document: "\e94f"; |
||||
$tgico-activesessions: "\e950"; |
||||
$tgico-logout: "\e951"; |
||||
$tgico-help: "\e952"; |
||||
$tgico-play: "\e953"; |
||||
$tgico-pause: "\e94d"; |
||||
$tgico-nosound: "\e94c"; |
||||
$tgico-pause: "\e954"; |
||||
$tgico-reply: "\e955"; |
||||
$tgico-forward: "\e956"; |
||||
$tgico-next: "\e957"; |
||||
$tgico-unlock: "\e958"; |
||||
$tgico-lock: "\e959"; |
||||
$tgico-data: "\e95a"; |
||||
$tgico-user: "\e95b"; |
||||
$tgico-group: "\e95c"; |
||||
$tgico-mute: "\e95d"; |
||||
$tgico-unmute: "\e95e"; |
||||
$tgico-photo: "\e95f"; |
||||
$tgico-language: "\e960"; |
||||
$tgico-message: "\e961"; |
||||
$tgico-pin: "\e962"; |
||||
$tgico-attach: "\e963"; |
||||
$tgico-phone: "\e964"; |
||||
$tgico-savedmessages: "\e965"; |
||||
$tgico-checkbox: "\e966"; |
||||
$tgico-copy: "\e967"; |
||||
$tgico-unarchive: "\e968"; |
||||
$tgico-archive: "\e969"; |
||||
$tgico-check1: "\e96a"; |
||||
$tgico-up: "\e96b"; |
||||
$tgico-down: "\e96c"; |
||||
$tgico-close: "\e96d"; |
||||
$tgico-add: "\e96e"; |
||||
$tgico-back: "\e96f"; |
||||
$tgico-more: "\e970"; |
||||
$tgico-menu: "\e971"; |
||||
$tgico-search: "\e972"; |
||||
|
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
.popup-forward { |
||||
$parent: ".popup"; |
||||
|
||||
#{$parent} { |
||||
&-container { |
||||
width: 420px; |
||||
max-width: 420px; |
||||
//padding: 12px 20px 32.5px; |
||||
padding: .75rem 0 0 0; |
||||
max-height: unquote('min(40.625rem, 100%)'); |
||||
height: 40.625rem; |
||||
} |
||||
|
||||
&-header { |
||||
flex: 0 0 auto; |
||||
margin-bottom: 9px; |
||||
padding: 0 .75rem; |
||||
} |
||||
|
||||
&-title { |
||||
flex-grow: 1; |
||||
} |
||||
} |
||||
|
||||
.selector, .chats-container { |
||||
height: auto; |
||||
overflow: hidden; |
||||
display: flex; |
||||
width: 100%; |
||||
flex-direction: row; |
||||
} |
||||
|
||||
.selector { |
||||
&-search-input { |
||||
font-size: 1.25rem; |
||||
padding: .5rem 1.5rem; |
||||
width: 100%; |
||||
} |
||||
|
||||
/* ul li > .rp { |
||||
margin-left: 0; |
||||
} */ |
||||
} |
||||
} |
Loading…
Reference in new issue