Browse Source

Markup tooltip: added spoiler button

master
Eduard Kuzmenko 2 years ago
parent
commit
11a5574770
  1. 2
      src/components/chat/input.ts
  2. 4
      src/components/chat/markupTooltip.ts
  3. 4
      src/scss/partials/_chatMarkupTooltip.scss
  4. 16
      src/scss/partials/_fonts.scss
  5. 214
      src/scss/partials/_ico.scss
  6. 2
      tweb-design

2
src/components/chat/input.ts

@ -1424,7 +1424,7 @@ export default class ChatInput {
executed.push(document.execCommand('styleWithCSS', false, 'true')); executed.push(document.execCommand('styleWithCSS', false, 'true'));
if(type === 'monospace') { if(type === 'monospace' || type === 'spoiler') {
let haveThisType = false; let haveThisType = false;
//executed.push(document.execCommand('styleWithCSS', false, 'true')); //executed.push(document.execCommand('styleWithCSS', false, 'true'));

4
src/components/chat/markupTooltip.ts

@ -49,7 +49,7 @@ export default class MarkupTooltip {
tools1.classList.add('markup-tooltip-tools'); tools1.classList.add('markup-tooltip-tools');
tools2.classList.add('markup-tooltip-tools'); tools2.classList.add('markup-tooltip-tools');
const arr = ['bold', 'italic', 'underline', 'strikethrough', 'monospace', 'link'] as (keyof MarkupTooltip['buttons'])[]; const arr = ['bold', 'italic', 'underline', 'strikethrough', 'monospace', 'spoiler', 'link'] as (keyof MarkupTooltip['buttons'])[];
arr.forEach(c => { arr.forEach(c => {
const button = ButtonIcon(c, {noRipple: true}); const button = ButtonIcon(c, {noRipple: true});
tools1.append(this.buttons[c] = button); tools1.append(this.buttons[c] = button);
@ -417,4 +417,4 @@ export default class MarkupTooltip {
} }
}); });
} }
} }

4
src/scss/partials/_chatMarkupTooltip.scss

@ -5,7 +5,7 @@
*/ */
.markup-tooltip { .markup-tooltip {
$widthRegular: 218px; $widthRegular: 252px;
$widthLink: 420px; $widthLink: 420px;
$padding: 7px; $padding: 7px;
@ -132,4 +132,4 @@
pointer-events: all; pointer-events: all;
} }
} }
} }

16
src/scss/partials/_fonts.scss

@ -9,9 +9,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?onwvlx') format('truetype'), url('#{$tgico-font-path}/#{$tgico-font-family}.ttf?ee3u9s') format('truetype'),
url('#{$tgico-font-path}/#{$tgico-font-family}.woff?onwvlx') format('woff'), url('#{$tgico-font-path}/#{$tgico-font-family}.woff?ee3u9s') format('woff'),
url('#{$tgico-font-path}/#{$tgico-font-family}.svg?onwvlx#tgico') format('svg'); url('#{$tgico-font-path}/#{$tgico-font-family}.svg?ee3u9s#tgico') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: block; font-display: block;
@ -327,6 +327,11 @@
content: $tgico-endcall_filled; content: $tgico-endcall_filled;
} }
} }
.tgico-endcall {
&:before {
content: $tgico-endcall;
}
}
.tgico-enter { .tgico-enter {
&:before { &:before {
content: $tgico-enter; content: $tgico-enter;
@ -757,6 +762,11 @@
content: $tgico-smile; content: $tgico-smile;
} }
} }
.tgico-spoiler {
&:before {
content: $tgico-spoiler;
}
}
.tgico-sport { .tgico-sport {
&:before { &:before {
content: $tgico-sport; content: $tgico-sport;

214
src/scss/partials/_ico.scss

@ -77,109 +77,111 @@ $tgico-eats: "\e936";
$tgico-edit: "\e937"; $tgico-edit: "\e937";
$tgico-email: "\e938"; $tgico-email: "\e938";
$tgico-endcall_filled: "\e939"; $tgico-endcall_filled: "\e939";
$tgico-enter: "\e93a"; $tgico-endcall: "\e93a";
$tgico-eye1: "\e93b"; $tgico-enter: "\e93b";
$tgico-eye2: "\e93c"; $tgico-eye1: "\e93c";
$tgico-favourites: "\e93d"; $tgico-eye2: "\e93d";
$tgico-flag: "\e93e"; $tgico-favourites: "\e93e";
$tgico-folder: "\e93f"; $tgico-flag: "\e93f";
$tgico-fontsize: "\e940"; $tgico-folder: "\e940";
$tgico-forward_filled: "\e941"; $tgico-fontsize: "\e941";
$tgico-forward: "\e942"; $tgico-forward_filled: "\e942";
$tgico-fullscreen: "\e943"; $tgico-forward: "\e943";
$tgico-gc_microphone: "\e944"; $tgico-fullscreen: "\e944";
$tgico-gc_microphoneoff: "\e945"; $tgico-gc_microphone: "\e945";
$tgico-gifs: "\e946"; $tgico-gc_microphoneoff: "\e946";
$tgico-group: "\e947"; $tgico-gifs: "\e947";
$tgico-help: "\e948"; $tgico-group: "\e948";
$tgico-image: "\e949"; $tgico-help: "\e949";
$tgico-info: "\e94a"; $tgico-image: "\e94a";
$tgico-info2: "\e94b"; $tgico-info: "\e94b";
$tgico-italic: "\e94c"; $tgico-info2: "\e94c";
$tgico-keyboard: "\e94d"; $tgico-italic: "\e94d";
$tgico-lamp: "\e94e"; $tgico-keyboard: "\e94e";
$tgico-language: "\e94f"; $tgico-lamp: "\e94f";
$tgico-largepause: "\e950"; $tgico-language: "\e950";
$tgico-largeplay: "\e951"; $tgico-largepause: "\e951";
$tgico-left: "\e952"; $tgico-largeplay: "\e952";
$tgico-link: "\e953"; $tgico-left: "\e953";
$tgico-listscreenshare: "\e954"; $tgico-link: "\e954";
$tgico-livelocation: "\e955"; $tgico-listscreenshare: "\e955";
$tgico-location: "\e956"; $tgico-livelocation: "\e956";
$tgico-lock: "\e957"; $tgico-location: "\e957";
$tgico-lockoff: "\e958"; $tgico-lock: "\e958";
$tgico-loginlogodesktop: "\e959"; $tgico-lockoff: "\e959";
$tgico-loginlogomobile: "\e95a"; $tgico-loginlogodesktop: "\e95a";
$tgico-logout: "\e95b"; $tgico-loginlogomobile: "\e95b";
$tgico-mention: "\e95c"; $tgico-logout: "\e95c";
$tgico-menu: "\e95d"; $tgico-mention: "\e95d";
$tgico-message: "\e95e"; $tgico-menu: "\e95e";
$tgico-messageunread: "\e95f"; $tgico-message: "\e95f";
$tgico-microphone: "\e960"; $tgico-messageunread: "\e960";
$tgico-minus: "\e961"; $tgico-microphone: "\e961";
$tgico-monospace: "\e962"; $tgico-minus: "\e962";
$tgico-more: "\e963"; $tgico-monospace: "\e963";
$tgico-mute: "\e964"; $tgico-more: "\e964";
$tgico-muted: "\e965"; $tgico-mute: "\e965";
$tgico-newchannel: "\e966"; $tgico-muted: "\e966";
$tgico-newchat_filled: "\e967"; $tgico-newchannel: "\e967";
$tgico-newgroup: "\e968"; $tgico-newchat_filled: "\e968";
$tgico-newprivate: "\e969"; $tgico-newgroup: "\e969";
$tgico-next: "\e96a"; $tgico-newprivate: "\e96a";
$tgico-noncontacts: "\e96b"; $tgico-next: "\e96b";
$tgico-nosound: "\e96c"; $tgico-noncontacts: "\e96c";
$tgico-passwordoff: "\e96d"; $tgico-nosound: "\e96d";
$tgico-pause: "\e96e"; $tgico-passwordoff: "\e96e";
$tgico-permissions: "\e96f"; $tgico-pause: "\e96f";
$tgico-phone: "\e970"; $tgico-permissions: "\e970";
$tgico-pin: "\e971"; $tgico-phone: "\e971";
$tgico-pinlist: "\e972"; $tgico-pin: "\e972";
$tgico-pinned_filled: "\e973"; $tgico-pinlist: "\e973";
$tgico-pinnedchat: "\e974"; $tgico-pinned_filled: "\e974";
$tgico-play: "\e975"; $tgico-pinnedchat: "\e975";
$tgico-plus: "\e976"; $tgico-play: "\e976";
$tgico-poll: "\e977"; $tgico-plus: "\e977";
$tgico-previous: "\e978"; $tgico-poll: "\e978";
$tgico-radiooff: "\e979"; $tgico-previous: "\e979";
$tgico-radioon: "\e97a"; $tgico-radiooff: "\e97a";
$tgico-readchats: "\e97b"; $tgico-radioon: "\e97b";
$tgico-recent: "\e97c"; $tgico-readchats: "\e97c";
$tgico-replace: "\e97d"; $tgico-recent: "\e97d";
$tgico-reply_filled: "\e97e"; $tgico-replace: "\e97e";
$tgico-reply: "\e97f"; $tgico-reply_filled: "\e97f";
$tgico-rightpanel: "\e980"; $tgico-reply: "\e980";
$tgico-saved: "\e981"; $tgico-rightpanel: "\e981";
$tgico-savedmessages: "\e982"; $tgico-saved: "\e982";
$tgico-schedule: "\e983"; $tgico-savedmessages: "\e983";
$tgico-scheduled: "\e984"; $tgico-schedule: "\e984";
$tgico-search: "\e985"; $tgico-scheduled: "\e985";
$tgico-select: "\e986"; $tgico-search: "\e986";
$tgico-send: "\e987"; $tgico-select: "\e987";
$tgico-send2: "\e988"; $tgico-send: "\e988";
$tgico-sending: "\e989"; $tgico-send2: "\e989";
$tgico-sendingerror: "\e98a"; $tgico-sending: "\e98a";
$tgico-settings_filled: "\e98b"; $tgico-sendingerror: "\e98b";
$tgico-settings: "\e98c"; $tgico-settings_filled: "\e98c";
$tgico-sharescreen_filled: "\e98d"; $tgico-settings: "\e98d";
$tgico-smallscreen: "\e98e"; $tgico-sharescreen_filled: "\e98e";
$tgico-smile: "\e98f"; $tgico-smallscreen: "\e98f";
$tgico-sport: "\e990"; $tgico-smile: "\e990";
$tgico-stickers: "\e991"; $tgico-spoiler: "\e991";
$tgico-stop: "\e992"; $tgico-sport: "\e992";
$tgico-strikethrough: "\e993"; $tgico-stickers: "\e993";
$tgico-textedit: "\e994"; $tgico-stop: "\e994";
$tgico-tip: "\e995"; $tgico-strikethrough: "\e995";
$tgico-tools: "\e996"; $tgico-textedit: "\e996";
$tgico-unarchive: "\e997"; $tgico-tip: "\e997";
$tgico-underline: "\e998"; $tgico-tools: "\e998";
$tgico-unmute: "\e999"; $tgico-unarchive: "\e999";
$tgico-unpin: "\e99a"; $tgico-underline: "\e99a";
$tgico-unread: "\e99b"; $tgico-unmute: "\e99b";
$tgico-up: "\e99c"; $tgico-unpin: "\e99c";
$tgico-user: "\e99d"; $tgico-unread: "\e99d";
$tgico-username: "\e99e"; $tgico-up: "\e99e";
$tgico-videocamera_filled: "\e99f"; $tgico-user: "\e99f";
$tgico-videocamera: "\e9a0"; $tgico-username: "\e9a0";
$tgico-videochat: "\e9a1"; $tgico-videocamera_filled: "\e9a1";
$tgico-zoomin: "\e9a2"; $tgico-videocamera: "\e9a2";
$tgico-zoomout: "\e9a3"; $tgico-videochat: "\e9a3";
$tgico-zoomin: "\e9a4";
$tgico-zoomout: "\e9a5";

2
tweb-design

@ -1 +1 @@
Subproject commit d10c87ef1aec54cdd2e506fcd980ea848e60eedc Subproject commit 2c4d08587b77a388d4beb8bc018dcb56ebd8a589
Loading…
Cancel
Save