v2.1.0.3
@ -3,44 +3,44 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>{{title}}</title>
|
<title>{{title}}</title>
|
||||||
<meta name="description" content="{{description}}">
|
<meta name="description" content="{{description}}" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no,viewport-fit=cover">
|
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,shrink-to-fit=no,viewport-fit=cover" />
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
<meta name="mobile-web-app-title" content="{{title}}">
|
<meta name="mobile-web-app-title" content="{{title}}" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-title" content="{{title}}">
|
<meta name="apple-mobile-web-app-title" content="{{title}}" />
|
||||||
<meta name="application-name" content="{{title}}">
|
<meta name="application-name" content="{{title}}" />
|
||||||
<meta name="msapplication-TileColor" content="#2d89ef">
|
<meta name="msapplication-TileColor" content="#2d89ef" />
|
||||||
<meta name="msapplication-TileImage" content="assets/img/mstile-144x144.png?v=jw3mK7G9Ry">
|
<meta name="msapplication-TileImage" content="assets/img/mstile-144x144.png?v=20240818" />
|
||||||
<meta name="msapplication-config" content="browserconfig.xml?v=jw3mK7G9Ry">
|
<meta name="msapplication-config" content="browserconfig.xml?v=20240818" />
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff" />
|
||||||
<meta name="color-scheme" content="light">
|
<meta name="color-scheme" content="light" />
|
||||||
<meta name="google" content="notranslate">
|
<meta name="google" content="notranslate" />
|
||||||
<!-- <meta name="robots" content="noindex"> -->
|
<!-- <meta name="robots" content="noindex"> -->
|
||||||
|
|
||||||
<!-- Open Graph / Facebook -->
|
<!-- Open Graph / Facebook -->
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:url" content="{{url}}">
|
<meta property="og:url" content="{{url}}" />
|
||||||
<meta property="og:title" content="{{title}}">
|
<meta property="og:title" content="{{title}}" />
|
||||||
<meta property="og:description" content="{{description}}">
|
<meta property="og:description" content="{{description}}" />
|
||||||
<meta property="og:image" content="assets/img/android-chrome-192x192.png?v=jw3mK7G9Ry">
|
<meta property="og:image" content="assets/img/android-chrome-192x192.png?v=20240818" />
|
||||||
|
|
||||||
<!-- Twitter -->
|
<!-- Twitter -->
|
||||||
<meta property="twitter:card" content="summary_large_image">
|
<meta property="twitter:card" content="summary_large_image" />
|
||||||
<meta property="twitter:url" content="{{url}}">
|
<meta property="twitter:url" content="{{url}}" />
|
||||||
<meta property="twitter:title" content="{{title}}">
|
<meta property="twitter:title" content="{{title}}" />
|
||||||
<meta property="twitter:description" content="{{description}}">
|
<meta property="twitter:description" content="{{description}}" />
|
||||||
<meta property="twitter:image" content="assets/img/android-chrome-192x192.png?v=jw3mK7G9Ry">
|
<meta property="twitter:image" content="assets/img/android-chrome-192x192.png?v=20240818" />
|
||||||
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="assets/img/apple-touch-icon.png?v=jw3mK7G9Ry">
|
<link rel="apple-touch-icon" sizes="180x180" href="assets/img/apple-touch-icon.png?v=20240818" />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png?v=jw3mK7G9Ry">
|
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/favicon-16x16.png?v=20240818" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png?v=jw3mK7G9Ry">
|
<link rel="icon" type="image/png" sizes="32x32" href="assets/img/favicon-32x32.png?v=20240818" />
|
||||||
<link rel="icon" type="image/png" sizes="192x192" href="assets/img/android-chrome-192x192.png?v=jw3mK7G9Ry">
|
<link rel="icon" type="image/png" sizes="192x192" href="assets/img/android-chrome-192x192.png?v=20240818" />
|
||||||
<link rel="alternate icon" href="assets/img/favicon.ico?v=jw3mK7G9Ry" type="image/x-icon">
|
<link rel="alternate icon" href="assets/img/favicon.ico?v=20240818" type="image/x-icon" />
|
||||||
<!-- <link rel="mask-icon" href="assets/img/logo_filled.svg?v=jw3mK7G9Ry" color="#3390ec"> -->
|
<!-- <link rel="mask-icon" href="assets/img/logo_filled.svg?v=20240818" color="#3390ec" /> -->
|
||||||
<link rel="canonical" href="{{origin}}">
|
<link rel="canonical" href="{{origin}}" />
|
||||||
|
|
||||||
<link rel="manifest" id="manifest">
|
<link rel="manifest" id="manifest" />
|
||||||
</head>
|
</head>
|
||||||
<body class="animation-level-2">
|
<body class="animation-level-2">
|
||||||
<!--[if IE]>
|
<!--[if IE]>
|
||||||
@ -59,7 +59,6 @@
|
|||||||
<stop class="topic-icon-gradient-stop-2" offset="100%" />
|
<stop class="topic-icon-gradient-stop-2" offset="100%" />
|
||||||
</linearGradient> -->
|
</linearGradient> -->
|
||||||
<path id="message-tail" d="M1.00002881,1.03679295e-14 L7,0 L7,17 C6.8069969,14.1607017 6.12380234,11.2332513 4.95041634,8.21764872 C4.04604748,5.89342034 2.50413132,3.73337411 0.324667862,1.73751004 L0.324652538,1.73752677 C-0.0826597201,1.36452676 -0.110475289,0.731958677 0.262524727,0.324646419 C0.451952959,0.117792698 0.719544377,1.0985861e-14 1.00002881,1.04360964e-14 Z" />
|
<path id="message-tail" d="M1.00002881,1.03679295e-14 L7,0 L7,17 C6.8069969,14.1607017 6.12380234,11.2332513 4.95041634,8.21764872 C4.04604748,5.89342034 2.50413132,3.73337411 0.324667862,1.73751004 L0.324652538,1.73752677 C-0.0826597201,1.36452676 -0.110475289,0.731958677 0.262524727,0.324646419 C0.451952959,0.117792698 0.719544377,1.0985861e-14 1.00002881,1.04360964e-14 Z" />
|
||||||
<path id="logo" fill-rule="evenodd" d="M80,0 C124.18278,0 160,35.81722 160,80 C160,124.18278 124.18278,160 80,160 C35.81722,160 0,124.18278 0,80 C0,35.81722 35.81722,0 80,0 Z M114.262551,46.4516129 L114.123923,46.4516129 C111.089589,46.5056249 106.482806,48.0771432 85.1289541,56.93769 L81.4133571,58.4849956 C72.8664779,62.0684477 57.2607933,68.7965125 34.5963033,78.66919 C30.6591745,80.2345564 28.5967328,81.765936 28.4089783,83.2633288 C28.0626453,86.0254269 31.8703852,86.959903 36.7890378,88.5302703 L38.2642674,89.0045258 C42.3926354,90.314406 47.5534685,91.7248852 50.3250916,91.7847532 C52.9151948,91.8407003 55.7944784,90.8162976 58.9629426,88.7115451 L70.5121776,80.9327422 C85.6657026,70.7535853 93.6285785,65.5352892 94.4008055,65.277854 L94.6777873,65.216416 C95.1594319,65.1213105 95.7366278,65.0717596 96.1481181,65.4374337 C96.6344248,65.8695939 96.5866185,66.6880224 96.5351057,66.9075859 C96.127514,68.6448691 75.2839361,87.6143392 73.6629144,89.2417998 L73.312196,89.6016896 C68.7645143,94.2254793 63.9030972,97.1721503 71.5637945,102.355193 L73.3593638,103.544598 C79.0660342,107.334968 82.9483395,110.083813 88.8107882,113.958377 L90.3875424,114.996094 C95.0654739,118.061953 98.7330313,121.697601 103.562866,121.253237 C105.740839,121.052855 107.989107,119.042224 109.175465,113.09692 L109.246762,112.727987 C112.002037,98.0012935 117.417883,66.09303 118.669527,52.9443975 C118.779187,51.7924073 118.641237,50.318088 118.530455,49.6708963 L118.474159,49.3781963 C118.341081,48.7651315 118.067967,48.0040758 117.346762,47.4189793 C116.412565,46.6610871 115.002114,46.4638844 114.262551,46.4516129 Z"/>
|
|
||||||
<path id="poll-line" d="M4.47,5.33v13.6c0,4.97,4.03,9,9,9h458.16"/>
|
<path id="poll-line" d="M4.47,5.33v13.6c0,4.97,4.03,9,9,9h458.16"/>
|
||||||
<path id="check" fill="none" d="M 4.7071 12.2929 l 5 5 c 0.3905 0.3905 1.0237 0.3905 1.4142 0 l 11 -11" />
|
<path id="check" fill="none" d="M 4.7071 12.2929 l 5 5 c 0.3905 0.3905 1.0237 0.3905 1.4142 0 l 11 -11" />
|
||||||
<path id="verified-icon-background" fill-rule="evenodd" clip-rule="evenodd" d="m14.378741 1.509638 1.818245 1.818557c.365651.365716.861601.571194 1.378741.571259l2.574273.000312c1.01361.000117 1.846494.773578 1.940861 1.762436l.008905.187798-.000312 2.5727c-.000065.517322.205439 1.013454.571259 1.379222l1.819649 1.819337c.714441.713427.759174 1.843179.134563 2.609139l-.134797.148109-1.819181 1.8182502c-.365963.3657823-.571558.8620196-.571493 1.3794456l.000312 2.5737972c.000559 1.0136048-.772668 1.846676-1.7615 1.9412861l-.188266.0084786-2.573792-.0003107c-.517426-.0000624-1.013675.2055248-1.379456.5714956l-1.818245 1.8191823c-.71331.7145515-1.843049.7594886-2.609113.1349998l-.148135-.1347645-1.8193435-1.8196542c-.3657628-.3658252-.8618987-.5713214-1.3792103-.571259l-2.5727052.0003107c-1.0136048.0001222-1.846676-.7731321-1.9412861-1.761968l-.0089492-.1877967-.0003107-2.5742678c-.0000624-.5171478-.2055495-1.0130926-.571259-1.3787397l-1.8185622-1.8182515c-.7139886-.713869-.758706-1.843647-.1340846-2.609607l.1338493-.148109 1.8190328-1.81935c.3655665-.365625.5709613-.861471.5710237-1.378494l.0003107-2.573181c.0006006-1.076777.8734635-1.949636 1.9502353-1.950234l2.5731758-.000312c.5170321-.000065 1.0128768-.205452 1.3785044-.571025l1.8193448-1.819038c.761592-.761449 1.996254-.761345 2.757716.000247zm3.195309 8.047806c-.426556-.34125-1.032655-.306293-1.417455.060333l-.099151.108173-4.448444 5.55815-1.7460313-1.74707-.1104961-.096564c-.4229264-.32188-1.0291801-.289692-1.4154413.096564-.3862612.386269-.4184492.992511-.0965653 1.41544l.0965653.1105 2.5999987 2.5999987.109876.0961467c.419874.320359 1.015131.2873897 1.397071-.0773773l.098579-.107692 5.2-6.4999961.083772-.120484c.273208-.455884.174278-1.054885-.252278-1.396122z" />
|
<path id="verified-icon-background" fill-rule="evenodd" clip-rule="evenodd" d="m14.378741 1.509638 1.818245 1.818557c.365651.365716.861601.571194 1.378741.571259l2.574273.000312c1.01361.000117 1.846494.773578 1.940861 1.762436l.008905.187798-.000312 2.5727c-.000065.517322.205439 1.013454.571259 1.379222l1.819649 1.819337c.714441.713427.759174 1.843179.134563 2.609139l-.134797.148109-1.819181 1.8182502c-.365963.3657823-.571558.8620196-.571493 1.3794456l.000312 2.5737972c.000559 1.0136048-.772668 1.846676-1.7615 1.9412861l-.188266.0084786-2.573792-.0003107c-.517426-.0000624-1.013675.2055248-1.379456.5714956l-1.818245 1.8191823c-.71331.7145515-1.843049.7594886-2.609113.1349998l-.148135-.1347645-1.8193435-1.8196542c-.3657628-.3658252-.8618987-.5713214-1.3792103-.571259l-2.5727052.0003107c-1.0136048.0001222-1.846676-.7731321-1.9412861-1.761968l-.0089492-.1877967-.0003107-2.5742678c-.0000624-.5171478-.2055495-1.0130926-.571259-1.3787397l-1.8185622-1.8182515c-.7139886-.713869-.758706-1.843647-.1340846-2.609607l.1338493-.148109 1.8190328-1.81935c.3655665-.365625.5709613-.861471.5710237-1.378494l.0003107-2.573181c.0006006-1.076777.8734635-1.949636 1.9502353-1.950234l2.5731758-.000312c.5170321-.000065 1.0128768-.205452 1.3785044-.571025l1.8193448-1.819038c.761592-.761449 1.996254-.761345 2.757716.000247zm3.195309 8.047806c-.426556-.34125-1.032655-.306293-1.417455.060333l-.099151.108173-4.448444 5.55815-1.7460313-1.74707-.1104961-.096564c-.4229264-.32188-1.0291801-.289692-1.4154413.096564-.3862612.386269-.4184492.992511-.0965653 1.41544l.0965653.1105 2.5999987 2.5999987.109876.0961467c.419874.320359 1.015131.2873897 1.397071-.0773773l.098579-.107692 5.2-6.4999961.083772-.120484c.273208-.455884.174278-1.054885-.252278-1.396122z" />
|
||||||
@ -89,6 +88,13 @@
|
|||||||
<div class="whole" id="auth-pages" style="display: none;">
|
<div class="whole" id="auth-pages" style="display: none;">
|
||||||
<div class="scrollable scrollable-y">
|
<div class="scrollable scrollable-y">
|
||||||
<div class="tabs-container auth-pages__container" data-animation="tabs">
|
<div class="tabs-container auth-pages__container" data-animation="tabs">
|
||||||
|
<div class="tabs-tab page-landing">
|
||||||
|
<div class="container">
|
||||||
|
<div class="auth-image">
|
||||||
|
<img src="assets/img/android-chrome-256x256.png" style="width: 100%;"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="tabs-tab page-signImport">
|
<div class="tabs-tab page-signImport">
|
||||||
<div class="container center-align"></div>
|
<div class="container center-align"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -151,5 +157,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="stories-viewer"></div>
|
<div id="stories-viewer"></div>
|
||||||
<script src="src/index.ts" type="module"></script>
|
<script src="src/index.ts" type="module"></script>
|
||||||
|
<noscript class="no-js-warning"><div style="text-align: center;"><video src="/a/nojs.mp4" class="nojs-video" muted="true" loop="true" autoplay="true" playsinline="true" disablepictureinpicture="true"></video><h1>Spaccogram Web</h1><p>Please, enable JavaScript to open the app.</p></div></noscript>
|
||||||
|
<script> document.querySelector('.no-js-warning').remove(); </script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1012 B After Width: | Height: | Size: 530 B |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 9.4 KiB |
@ -1 +0,0 @@
|
|||||||
You can see the full list of new features and improvements here: https://t.me/c/2149281820/6 (https://t.me/+ujaob63Vy705Mzgx).
|
|
@ -4928,6 +4928,12 @@ export default class ChatBubbles {
|
|||||||
newBubble.dataset.peerId = '' + message.peerId;
|
newBubble.dataset.peerId = '' + message.peerId;
|
||||||
newBubble.dataset.timestamp = '' + message.date;
|
newBubble.dataset.timestamp = '' + message.date;
|
||||||
|
|
||||||
|
// octt: add extra data to message bubble
|
||||||
|
newBubble.dataset.fromId = `${message.fromId}`;
|
||||||
|
if(this.chat.isAnyGroup && (await this.managers.appProfileManager.isUserBlocked(message.fromId))) {
|
||||||
|
newBubble.classList.add('user-blocked');
|
||||||
|
}
|
||||||
|
|
||||||
// const bubbleNew: Bubble = this.bubblesNew[message.mid] ??= {
|
// const bubbleNew: Bubble = this.bubblesNew[message.mid] ??= {
|
||||||
// bubble: newBubble,
|
// bubble: newBubble,
|
||||||
// mids: new Set(),
|
// mids: new Set(),
|
||||||
|
@ -71,6 +71,7 @@ export default class PeerProfile {
|
|||||||
private name: HTMLDivElement;
|
private name: HTMLDivElement;
|
||||||
private subtitle: HTMLDivElement;
|
private subtitle: HTMLDivElement;
|
||||||
private bio: Row;
|
private bio: Row;
|
||||||
|
private chatId: Row;
|
||||||
private username: Row;
|
private username: Row;
|
||||||
private phone: Row;
|
private phone: Row;
|
||||||
private notifications: Row;
|
private notifications: Row;
|
||||||
@ -209,6 +210,27 @@ export default class PeerProfile {
|
|||||||
|
|
||||||
this.bio.title.classList.add('pre-wrap');
|
this.bio.title.classList.add('pre-wrap');
|
||||||
|
|
||||||
|
// octt: new fields
|
||||||
|
this.chatId = new Row({
|
||||||
|
title: ' ',
|
||||||
|
subtitleLangKey: 'ChatId',
|
||||||
|
icon: 'tag',
|
||||||
|
clickable: () => {
|
||||||
|
copyTextToClipboard(this.chatId.title.textContent);
|
||||||
|
toast(I18n.format('ChatIdCopied', true));
|
||||||
|
},
|
||||||
|
listenerSetter: this.listenerSetter,
|
||||||
|
contextMenu: {
|
||||||
|
buttons: [{
|
||||||
|
icon: 'copy',
|
||||||
|
text: 'Text.CopyLabel_ChatId',
|
||||||
|
onClick: () => {
|
||||||
|
simulateClickEvent(this.chatId.container);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.username = new Row({
|
this.username = new Row({
|
||||||
title: ' ',
|
title: ' ',
|
||||||
subtitleLangKey: 'Username',
|
subtitleLangKey: 'Username',
|
||||||
@ -344,6 +366,7 @@ export default class PeerProfile {
|
|||||||
this.businessLocation.container.classList.add('business-location');
|
this.businessLocation.container.classList.add('business-location');
|
||||||
|
|
||||||
this.section.content.append(
|
this.section.content.append(
|
||||||
|
this.chatId.container,
|
||||||
this.phone.container,
|
this.phone.container,
|
||||||
this.username.container,
|
this.username.container,
|
||||||
this.location.container,
|
this.location.container,
|
||||||
@ -531,6 +554,7 @@ export default class PeerProfile {
|
|||||||
public cleanupHTML() {
|
public cleanupHTML() {
|
||||||
[
|
[
|
||||||
this.bio,
|
this.bio,
|
||||||
|
this.chatId,
|
||||||
this.phone,
|
this.phone,
|
||||||
this.username,
|
this.username,
|
||||||
this.location,
|
this.location,
|
||||||
@ -656,6 +680,15 @@ export default class PeerProfile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// octt: new fields
|
||||||
|
private async fillChatId() {
|
||||||
|
const {peerId} = this;
|
||||||
|
return () => {
|
||||||
|
this.username.subtitle.replaceChildren(i18n('ChatId'));
|
||||||
|
setText(peerId.toChatId().toString(), this.chatId);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private async fillUsername() {
|
private async fillUsername() {
|
||||||
const {peerId} = this;
|
const {peerId} = this;
|
||||||
if(peerId.isUser() && this.canBeDetailed()) {
|
if(peerId.isUser() && this.canBeDetailed()) {
|
||||||
@ -727,6 +760,7 @@ export default class PeerProfile {
|
|||||||
|
|
||||||
private async fillRows(manual: Promise<any>) {
|
private async fillRows(manual: Promise<any>) {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
|
this.fillChatId(),
|
||||||
this.fillUsername(),
|
this.fillUsername(),
|
||||||
this.fillUserPhone(),
|
this.fillUserPhone(),
|
||||||
this.fillNotifications(),
|
this.fillNotifications(),
|
||||||
|
@ -256,20 +256,15 @@ export class AppSidebarLeft extends SidebarSlider {
|
|||||||
a.remove();
|
a.remove();
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
}, */ /* { // octt: disable switch to WebA
|
}, */ {
|
||||||
icon: 'char' as Icon,
|
icon: 'char' as Icon,
|
||||||
className: 'a',
|
className: 'a',
|
||||||
text: 'ChatList.Menu.SwitchTo.A',
|
text: 'ChatList.Menu.SwitchTo.A', // TODO append "(Unmodded)" to the name
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
Promise.all([
|
location.href = '/a/';
|
||||||
sessionStorage.set({kz_version: 'Z'}),
|
|
||||||
sessionStorage.delete('tgme_sync')
|
|
||||||
]).then(() => {
|
|
||||||
location.href = 'https://web.telegram.org/a/';
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
verify: () => App.isMainDomain
|
verify: () => App.isMainDomain
|
||||||
}, */ /* {
|
}, /* {
|
||||||
icon: 'char w',
|
icon: 'char w',
|
||||||
text: 'ChatList.Menu.SwitchTo.Webogram',
|
text: 'ChatList.Menu.SwitchTo.Webogram',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@ -596,8 +591,8 @@ export class AppSidebarLeft extends SidebarSlider {
|
|||||||
const checkUpdateInterval = setInterval(() => {
|
const checkUpdateInterval = setInterval(() => {
|
||||||
fetch('version', {cache: 'no-cache'})
|
fetch('version', {cache: 'no-cache'})
|
||||||
.then((res) => (res.status === 200 && res.ok && res.text()) || Promise.reject())
|
.then((res) => (res.status === 200 && res.ok && res.text()) || Promise.reject())
|
||||||
.then((text) => {
|
.then((text) => { // octt: ensure version is checked without trailing whitespace
|
||||||
if(text !== App.versionFull) {
|
if(text.trim() !== App.versionFull) {
|
||||||
this.hasUpdate = true;
|
this.hasUpdate = true;
|
||||||
clearInterval(checkUpdateInterval);
|
clearInterval(checkUpdateInterval);
|
||||||
|
|
||||||
|
63
webk/src/components/sidebarLeft/tabs/filters.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/*
|
||||||
|
* https://gitea.it/octospacc/Spaccogram
|
||||||
|
* Copyright (C) 2024-2024 OctoSpacc, Spacc Inc.
|
||||||
|
* https://gitea.it/octospacc/Spaccogram/src/branch/main/webk/LICENSE
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Row from '../../row';
|
||||||
|
import RadioField from '../../radioField';
|
||||||
|
import {SliderSuperTabEventable} from '../../sliderTab';
|
||||||
|
import rootScope from '../../../lib/rootScope';
|
||||||
|
import {LangPackKey} from '../../../lib/langPack';
|
||||||
|
import {generateSection} from '../../settingSection';
|
||||||
|
import {joinDeepPath} from '../../../helpers/object/setDeepProperty';
|
||||||
|
import {DomSetting} from '../../../helpers/domSetting';
|
||||||
|
import messageFiltersConf from '../../../helpers/messageFiltersConf';
|
||||||
|
|
||||||
|
export default class AppFiltersTab extends SliderSuperTabEventable {
|
||||||
|
public init() {
|
||||||
|
this.container.classList.add('filters-container');
|
||||||
|
this.setTitle('MessageFilters');
|
||||||
|
|
||||||
|
const section = generateSection.bind(null, this.scrollable);
|
||||||
|
const FilterSection = (options: {
|
||||||
|
name: LangPackKey,
|
||||||
|
inputKey: 'ads'|'blocked',
|
||||||
|
}) => {
|
||||||
|
const container = section(options.name);
|
||||||
|
const form = document.createElement('form');
|
||||||
|
const stateKey = joinDeepPath('settings', 'messageFilters', options.inputKey);
|
||||||
|
const domSetting = messageFiltersConf[options.inputKey];
|
||||||
|
|
||||||
|
for(const name of ['Show', 'Hide']) {
|
||||||
|
const row = new Row({
|
||||||
|
radioField: new RadioField({
|
||||||
|
langKey: <LangPackKey>name,
|
||||||
|
name: options.name,
|
||||||
|
value: name.toLowerCase(),
|
||||||
|
stateKey
|
||||||
|
})
|
||||||
|
});
|
||||||
|
const input = row.container.querySelector('input');
|
||||||
|
input.onchange = () => {
|
||||||
|
if(input.checked) {
|
||||||
|
domSetting.set(input.value);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
form.append(row.container);
|
||||||
|
}
|
||||||
|
|
||||||
|
container.append(form);
|
||||||
|
};
|
||||||
|
|
||||||
|
FilterSection({
|
||||||
|
name: 'Ads',
|
||||||
|
inputKey: 'ads'
|
||||||
|
});
|
||||||
|
|
||||||
|
FilterSection({
|
||||||
|
name: 'BlockedUsers',
|
||||||
|
inputKey: 'blocked'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -12,6 +12,7 @@ import AppEditProfileTab from './editProfile';
|
|||||||
import AppChatFoldersTab from './chatFolders';
|
import AppChatFoldersTab from './chatFolders';
|
||||||
import AppNotificationsTab from './notifications';
|
import AppNotificationsTab from './notifications';
|
||||||
import AppLanguageTab from './language';
|
import AppLanguageTab from './language';
|
||||||
|
import AppFiltersTab from './filters';
|
||||||
import lottieLoader from '../../../lib/rlottie/lottieLoader';
|
import lottieLoader from '../../../lib/rlottie/lottieLoader';
|
||||||
import PopupPeer from '../../popups/peer';
|
import PopupPeer from '../../popups/peer';
|
||||||
import AppDataAndStorageTab from './dataAndStorage';
|
import AppDataAndStorageTab from './dataAndStorage';
|
||||||
@ -48,6 +49,7 @@ export default class AppSettingsTab extends SliderSuperTab {
|
|||||||
private profile: PeerProfile;
|
private profile: PeerProfile;
|
||||||
|
|
||||||
private languageRow: Row;
|
private languageRow: Row;
|
||||||
|
private filtersRow: Row;
|
||||||
private devicesRow: Row;
|
private devicesRow: Row;
|
||||||
private premiumRow: Row;
|
private premiumRow: Row;
|
||||||
|
|
||||||
@ -217,6 +219,7 @@ export default class AppSettingsTab extends SliderSuperTab {
|
|||||||
},
|
},
|
||||||
listenerSetter: this.listenerSetter
|
listenerSetter: this.listenerSetter
|
||||||
}),
|
}),
|
||||||
|
|
||||||
this.languageRow = new Row({
|
this.languageRow = new Row({
|
||||||
titleLangKey: 'AccountSettings.Language',
|
titleLangKey: 'AccountSettings.Language',
|
||||||
titleRightSecondary: i18n('LanguageName'),
|
titleRightSecondary: i18n('LanguageName'),
|
||||||
@ -225,6 +228,15 @@ export default class AppSettingsTab extends SliderSuperTab {
|
|||||||
this.slider.createTab(AppLanguageTab).open(languageArgs);
|
this.slider.createTab(AppLanguageTab).open(languageArgs);
|
||||||
},
|
},
|
||||||
listenerSetter: this.listenerSetter
|
listenerSetter: this.listenerSetter
|
||||||
|
}),
|
||||||
|
|
||||||
|
this.filtersRow = new Row({
|
||||||
|
titleLangKey: 'MessageFilters',
|
||||||
|
icon: 'eye',
|
||||||
|
clickable: () => {
|
||||||
|
this.slider.createTab(AppFiltersTab).open();
|
||||||
|
},
|
||||||
|
listenerSetter: this.listenerSetter
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -113,7 +113,11 @@ export type State = {
|
|||||||
// octt: new config fields
|
// octt: new config fields
|
||||||
chatCheckmarks: boolean,
|
chatCheckmarks: boolean,
|
||||||
forcePremium: boolean,
|
forcePremium: boolean,
|
||||||
stealthMode: boolean
|
stealthMode: boolean,
|
||||||
|
messageFilters: {
|
||||||
|
ads: string,
|
||||||
|
blocked: string
|
||||||
|
}
|
||||||
},
|
},
|
||||||
playbackParams: ReturnType<AppMediaPlaybackController['getPlaybackParams']>,
|
playbackParams: ReturnType<AppMediaPlaybackController['getPlaybackParams']>,
|
||||||
keepSigned: boolean,
|
keepSigned: boolean,
|
||||||
@ -250,8 +254,8 @@ export const STATE_INIT: State = {
|
|||||||
recentSearch: [],
|
recentSearch: [],
|
||||||
version: STATE_VERSION,
|
version: STATE_VERSION,
|
||||||
build: BUILD,
|
build: BUILD,
|
||||||
authState: {
|
authState: { // octt: custom landing page
|
||||||
_: IS_MOBILE ? 'authStateSignIn' : 'authStateSignQr'
|
_: 'authStateLanding' // IS_MOBILE ? 'authStateSignIn' : 'authStateSignQr'
|
||||||
},
|
},
|
||||||
hiddenPinnedMessages: {},
|
hiddenPinnedMessages: {},
|
||||||
settings: {
|
settings: {
|
||||||
@ -332,7 +336,11 @@ export const STATE_INIT: State = {
|
|||||||
// octt: new config fields
|
// octt: new config fields
|
||||||
chatCheckmarks: true,
|
chatCheckmarks: true,
|
||||||
forcePremium: true,
|
forcePremium: true,
|
||||||
stealthMode: false
|
stealthMode: false,
|
||||||
|
messageFilters: {
|
||||||
|
ads: 'hide',
|
||||||
|
blocked: 'show'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
playbackParams: {
|
playbackParams: {
|
||||||
volume: 1,
|
volume: 1,
|
||||||
|
102
webk/src/helpers/domSetting.ts
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
/*
|
||||||
|
* https://gitea.it/octospacc/Spaccogram
|
||||||
|
* Copyright (C) 2024-2024 OctoSpacc, Spacc Inc.
|
||||||
|
* https://gitea.it/octospacc/Spaccogram/src/branch/main/webk/LICENSE
|
||||||
|
*/
|
||||||
|
|
||||||
|
import rootScope from '../lib/rootScope';
|
||||||
|
import getDeepProperty from './object/getDeepProperty';
|
||||||
|
import {joinDeepPath} from './object/setDeepProperty';
|
||||||
|
|
||||||
|
export class DomSetting {
|
||||||
|
key: string;
|
||||||
|
type: string|BooleanConstructor|Array<string>|StringConstructor;
|
||||||
|
boolArray: Array<string>;
|
||||||
|
boolKey: string;
|
||||||
|
|
||||||
|
constructor(key:string, type:string|BooleanConstructor|Array<string>|StringConstructor) {
|
||||||
|
this.key = key;
|
||||||
|
if(typeof(type) === 'string') {
|
||||||
|
this.boolKey = type;
|
||||||
|
type = Boolean;
|
||||||
|
} else if(Array.isArray(type)) {
|
||||||
|
this.boolArray = type;
|
||||||
|
type = Boolean;
|
||||||
|
}
|
||||||
|
this.type = type.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get() {
|
||||||
|
const value = getDeepProperty(rootScope.settings, this.key.split('.'));
|
||||||
|
switch(this.type) {
|
||||||
|
case Boolean.name:
|
||||||
|
this.setBodyClass(value);
|
||||||
|
break;
|
||||||
|
case String.name:
|
||||||
|
this.setBodyData(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public set(value: boolean|string) {
|
||||||
|
switch(this.type) {
|
||||||
|
case Boolean.name:
|
||||||
|
// this.setBodyClasses(<boolean>value);
|
||||||
|
this.setBodyClass(value.toString());
|
||||||
|
break;
|
||||||
|
case String.name:
|
||||||
|
this.setBodyData(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return rootScope.managers.appStateManager.setByKey(joinDeepPath('settings', ...this.key.split('.')), value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private setBodyClass(value: string) {
|
||||||
|
// this.setSingleBodyClass(this.key, state);
|
||||||
|
// if(this.boolArray) {
|
||||||
|
// this.boolArray.forEach(key => this.setSingleBodyClass(key, !state));
|
||||||
|
// }
|
||||||
|
document.body.classList[value === this.boolKey ? 'add' : 'remove'](this.key.replace('.', '-').replace(/([A-Z])/g, value => `-${value.toLowerCase()}`));
|
||||||
|
}
|
||||||
|
|
||||||
|
private setBodyData(value: boolean|string) {
|
||||||
|
document.body.dataset[this.key] = value.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
public getBoolean(key: string) {
|
||||||
|
const state = !!(rootScope.settings && Object(rootScope.settings)[key]);
|
||||||
|
this.setBodyClass(key, state);
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
public getString(key: string) {
|
||||||
|
const value = Object(rootScope.settings)[key];
|
||||||
|
this.setBodyData(key, value);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public setBoolean(key: string, state: boolean) {
|
||||||
|
this.setBodyClass(key, state);
|
||||||
|
return rootScope.managers.appStateManager.setByKey(this.deepPathFromKey(key), state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public setString(key: string, value: string) {
|
||||||
|
this.setBodyData(key, value);
|
||||||
|
return rootScope.managers.appStateManager.setByKey(this.deepPathFromKey(key), value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private setBodyClass(key: string, state: boolean) {
|
||||||
|
document.body.classList[state ? 'add' : 'remove'](key.replace('.', '-').replace(/([A-Z])/g, val => `-${val.toLowerCase()}`));
|
||||||
|
}
|
||||||
|
|
||||||
|
private setBodyData(key: string, value: string) {
|
||||||
|
document.body.dataset[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private deepPathFromKey(key: string) {
|
||||||
|
return joinDeepPath('settings', ...key.split('.'));
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
23
webk/src/helpers/messageFiltersConf.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* https://gitea.it/octospacc/Spaccogram
|
||||||
|
* Copyright (C) 2024-2024 OctoSpacc, Spacc Inc.
|
||||||
|
* https://gitea.it/octospacc/Spaccogram/src/branch/main/webk/LICENSE
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
import {MOUNT_CLASS_TO} from '../config/debug';
|
||||||
|
import {DomSetting} from './domSetting';
|
||||||
|
|
||||||
|
export class MessageFiltersConf {
|
||||||
|
ads: DomSetting;
|
||||||
|
blocked: DomSetting;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.ads = new DomSetting(`messageFilters.ads`, 'hide');
|
||||||
|
this.blocked = new DomSetting(`messageFilters.blocked`, 'hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const messageFiltersConf = new MessageFiltersConf();
|
||||||
|
MOUNT_CLASS_TO && (MOUNT_CLASS_TO.messageFiltersConf = messageFiltersConf);
|
||||||
|
export default messageFiltersConf;
|
@ -424,12 +424,14 @@ IMAGE_MIME_TYPES_SUPPORTED_PROMISE.then((mimeTypes) => {
|
|||||||
let pagePromise: Promise<void>;
|
let pagePromise: Promise<void>;
|
||||||
// langPromise.then(async() => {
|
// langPromise.then(async() => {
|
||||||
switch(authState._) {
|
switch(authState._) {
|
||||||
|
case 'authStateLanding': // octt: custom landing page
|
||||||
|
pagePromise = (await import('./pages/pageLanding')).default.mount();
|
||||||
|
break;
|
||||||
case 'authStateSignIn':
|
case 'authStateSignIn':
|
||||||
pagePromise = (await import('./pages/pageSignIn')).default.mount();
|
pagePromise = (await import('./pages/pageSignIn')).default.mount();
|
||||||
break;
|
break;
|
||||||
case 'authStateSignQr': // octt: force standard login view on boot instead of QR code
|
case 'authStateSignQr':
|
||||||
pagePromise = (await import('./pages/pageSignIn')).default.mount();
|
pagePromise = (await import('./pages/pageSignQR')).default.mount();
|
||||||
// pagePromise = (await import('./pages/pageSignQR')).default.mount();
|
|
||||||
break;
|
break;
|
||||||
case 'authStateAuthCode':
|
case 'authStateAuthCode':
|
||||||
pagePromise = (await import('./pages/pageAuthCode')).default.mount(authState.sentCode);
|
pagePromise = (await import('./pages/pageAuthCode')).default.mount(authState.sentCode);
|
||||||
|
@ -712,6 +712,7 @@ const lang = {
|
|||||||
'SearchGIFs': 'Search GIFs',
|
'SearchGIFs': 'Search GIFs',
|
||||||
'RemovedGIFFromFavorites': 'GIF was removed from Favorites.',
|
'RemovedGIFFromFavorites': 'GIF was removed from Favorites.',
|
||||||
'WebPage.OpenLink': 'OPEN LINK',
|
'WebPage.OpenLink': 'OPEN LINK',
|
||||||
|
'Ads': 'Advertisements',
|
||||||
'Ads.Reported': 'We will review this ad to ensure it matches our **[Ad Policies and Guidelines](https://ads.telegram.org/guidelines)**.',
|
'Ads.Reported': 'We will review this ad to ensure it matches our **[Ad Policies and Guidelines](https://ads.telegram.org/guidelines)**.',
|
||||||
'RevenueSharingAdsInfo4SubtitleLearnMore1': '**[Learn More >](https://ads.telegram.org/)**',
|
'RevenueSharingAdsInfo4SubtitleLearnMore1': '**[Learn More >](https://ads.telegram.org/)**',
|
||||||
'Stars.TOS': 'By proceeding and purchasing Stars, you agree with the [Terms and Conditions](https://telegram.org/tos).',
|
'Stars.TOS': 'By proceeding and purchasing Stars, you agree with the [Terms and Conditions](https://telegram.org/tos).',
|
||||||
@ -993,10 +994,12 @@ const lang = {
|
|||||||
'AddAnExplanationInfo': 'Users will see this text after choosing the wrong answer, good for educational purposes.',
|
'AddAnExplanationInfo': 'Users will see this text after choosing the wrong answer, good for educational purposes.',
|
||||||
'AccDescrQuizExplanation': 'Explanation',
|
'AccDescrQuizExplanation': 'Explanation',
|
||||||
'PhoneCopied': 'Phone copied to clipboard',
|
'PhoneCopied': 'Phone copied to clipboard',
|
||||||
|
'ChatIdCopied': 'Chat ID copied to clipboard',
|
||||||
'UsernameCopied': 'Username copied to clipboard.',
|
'UsernameCopied': 'Username copied to clipboard.',
|
||||||
// "HashtagCopied": "Hashtag copied to clipboard.",
|
// "HashtagCopied": "Hashtag copied to clipboard.",
|
||||||
'BioCopied': 'Bio copied to clipboard.',
|
'BioCopied': 'Bio copied to clipboard.',
|
||||||
'UserBio': 'Bio',
|
'UserBio': 'Bio',
|
||||||
|
'ChatId': 'Chat ID',
|
||||||
'Username': 'Username',
|
'Username': 'Username',
|
||||||
'UsernameAlso': 'also %1$s',
|
'UsernameAlso': 'also %1$s',
|
||||||
'UsernameHelp': 'You can choose a username on **Telegram**. If you do, people will be able to find you by this username and contact you without needing your phone number.\n\nYou can use **a–z**, **0–9** and underscores. Minimum length is **5** characters.',
|
'UsernameHelp': 'You can choose a username on **Telegram**. If you do, people will be able to find you by this username and contact you without needing your phone number.\n\nYou can use **a–z**, **0–9** and underscores. Minimum length is **5** characters.',
|
||||||
@ -2762,6 +2765,7 @@ const lang = {
|
|||||||
'Text.CopyLabel_Bio': 'Copy Bio',
|
'Text.CopyLabel_Bio': 'Copy Bio',
|
||||||
'Text.CopyLabel_PhoneNumber': 'Copy Phone Number',
|
'Text.CopyLabel_PhoneNumber': 'Copy Phone Number',
|
||||||
'Text.CopyLabel_Username': 'Copy Username',
|
'Text.CopyLabel_Username': 'Copy Username',
|
||||||
|
'Text.CopyLabel_ChatId': 'Copy Chat ID',
|
||||||
'Text.CopyLabel_ShareLink': 'Copy Share Link',
|
'Text.CopyLabel_ShareLink': 'Copy Share Link',
|
||||||
'GeneralSettings.BigEmoji': 'Large Emoji',
|
'GeneralSettings.BigEmoji': 'Large Emoji',
|
||||||
'GeneralSettings.EmojiPrediction': 'Suggest Emoji',
|
'GeneralSettings.EmojiPrediction': 'Suggest Emoji',
|
||||||
@ -2902,7 +2906,8 @@ const lang = {
|
|||||||
'Chat.UploadLimit.Text': {
|
'Chat.UploadLimit.Text': {
|
||||||
'one_value': 'Subscribe to [Telegram Premium]() to increase upload speeds %d time.',
|
'one_value': 'Subscribe to [Telegram Premium]() to increase upload speeds %d time.',
|
||||||
'other_value': 'Subscribe to [Telegram Premium]() to increase upload speeds %d times.'
|
'other_value': 'Subscribe to [Telegram Premium]() to increase upload speeds %d times.'
|
||||||
}
|
},
|
||||||
|
'MessageFilters': 'Message Filters'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default lang;
|
export default lang;
|
||||||
|
@ -114,6 +114,7 @@ import {ChatType} from '../../components/chat/chat';
|
|||||||
import PopupDeleteDialog from '../../components/popups/deleteDialog';
|
import PopupDeleteDialog from '../../components/popups/deleteDialog';
|
||||||
import rtmpCallsController from '../calls/rtmpCallsController';
|
import rtmpCallsController from '../calls/rtmpCallsController';
|
||||||
import IS_LIVE_STREAM_SUPPORTED from '../../environment/liveStreamSupport';
|
import IS_LIVE_STREAM_SUPPORTED from '../../environment/liveStreamSupport';
|
||||||
|
import messageFiltersConf from '../../helpers/messageFiltersConf';
|
||||||
|
|
||||||
export const DIALOG_LIST_ELEMENT_TAG = 'A';
|
export const DIALOG_LIST_ELEMENT_TAG = 'A';
|
||||||
|
|
||||||
@ -2285,11 +2286,16 @@ export class AppDialogsManager {
|
|||||||
await (await m(loadDialogsPromise)).renderPromise.catch(noop);
|
await (await m(loadDialogsPromise)).renderPromise.catch(noop);
|
||||||
this.managers.appMessagesManager.fillConversations();
|
this.managers.appMessagesManager.fillConversations();
|
||||||
|
|
||||||
if(!rootScope.settings.chatCheckmarks) { // octt: hide message checkmarks
|
// octt: initialize extra settings
|
||||||
|
|
||||||
|
if(!rootScope.settings.chatCheckmarks) {
|
||||||
document.body.classList.add('hide-chat-checkmarks');
|
document.body.classList.add('hide-chat-checkmarks');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!rootScope.premium) { // octt: force local premium
|
messageFiltersConf.ads.get();
|
||||||
|
messageFiltersConf.blocked.get();
|
||||||
|
|
||||||
|
if(!rootScope.premium) {
|
||||||
rootScope.premium = rootScope.settings.forcePremium;
|
rootScope.premium = rootScope.settings.forcePremium;
|
||||||
rootScope.dispatchEvent('premium_toggle', rootScope.premium);
|
rootScope.dispatchEvent('premium_toggle', rootScope.premium);
|
||||||
}
|
}
|
||||||
|
54
webk/src/pages/pageLanding.ts
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* https://github.com/morethanwords/tweb
|
||||||
|
* Copyright (C) 2019-2021 Eduard Kuzmenko
|
||||||
|
* https://github.com/morethanwords/tweb/blob/master/LICENSE
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Page from './page';
|
||||||
|
import Button from '../components/button';
|
||||||
|
import I18n, {_i18n, i18n} from '../lib/langPack';
|
||||||
|
import pageSignIn from './pageSignIn';
|
||||||
|
import pageSignQR from './pageSignQR';
|
||||||
|
import rootScope from '../lib/rootScope';
|
||||||
|
|
||||||
|
const onFirstMount = () => {
|
||||||
|
const inputWrapper = Object.assign(document.createElement('div'), {classList: 'input-wrapper'});
|
||||||
|
const btnPhone = Button('btn-primary btn-color-primary', {text: 'Login.QR.Cancel'});
|
||||||
|
const btnQr = Button('btn-primary btn-color-primary', {text: 'Login.QR.Login'});
|
||||||
|
|
||||||
|
btnPhone.addEventListener('click', () => {
|
||||||
|
pageSignIn.mount();
|
||||||
|
});
|
||||||
|
|
||||||
|
btnQr.addEventListener('click', () => {
|
||||||
|
pageSignQR.mount();
|
||||||
|
});
|
||||||
|
|
||||||
|
inputWrapper.append(btnPhone, btnQr);
|
||||||
|
|
||||||
|
const h4 = Object.assign(document.createElement('h4'), {
|
||||||
|
classList: 'text-center',
|
||||||
|
textContent: 'Spaccogram Web'
|
||||||
|
});
|
||||||
|
|
||||||
|
const subtitle = Object.assign(document.createElement('div'), {
|
||||||
|
className: 'text-center',
|
||||||
|
innerHTML: `<p>Unofficial fork of WebK made for advanced users and developers.</p><p>
|
||||||
|
Open-source at <a href="https://gitea.it/octospacc/Spaccogram">gitea.it/octospacc/Spaccogram</a>.
|
||||||
|
News at <a href="https://t.me/+ujaob63Vy705Mzgx">t.me/+ujaob63Vy705Mzgx</a>.
|
||||||
|
</p>`
|
||||||
|
});
|
||||||
|
|
||||||
|
page.pageEl.querySelector('.container').append(h4, subtitle, inputWrapper, Object.assign(document.createElement('div'), {
|
||||||
|
style: 'margin: 4em; text-align: center;',
|
||||||
|
innerHTML: `<details><summary>Alternate domains</summary><ul>${[
|
||||||
|
'tweb.octt.eu.org', '1.tgweb.octt.eu.org'
|
||||||
|
].map(domain => (domain === location.hostname ? '' : `<li><a href="//${domain}">${domain}</a></li>`)).join('')}</ul></details>`
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
|
const page = new Page('page-landing', true, onFirstMount, () => {
|
||||||
|
rootScope.managers.appStateManager.pushToState('authState', {_: 'authStateLanding'});
|
||||||
|
});
|
||||||
|
|
||||||
|
export default page;
|
@ -39,10 +39,11 @@ const importWebToken = async() => {
|
|||||||
|
|
||||||
default: {
|
default: {
|
||||||
console.error('authorization import error:', err);
|
console.error('authorization import error:', err);
|
||||||
const defaultState = STATE_INIT.authState._;
|
mountPageAfter = import({
|
||||||
if(defaultState === 'authStateSignIn') mountPageAfter = import('./pageSignIn');
|
authStateLanding: './pageLanding',
|
||||||
else if(defaultState === 'authStateSignQr') mountPageAfter = import('./pageSignQR');
|
authStateSignIn: './pageSignIn',
|
||||||
break;
|
authStateSignQr: './pageSignQR'
|
||||||
|
}[STATE_INIT.authState._.toString()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -618,6 +618,7 @@
|
|||||||
"SearchGIFs" = "Search GIFs";
|
"SearchGIFs" = "Search GIFs";
|
||||||
"RemovedGIFFromFavorites" = "GIF was removed from Favorites.";
|
"RemovedGIFFromFavorites" = "GIF was removed from Favorites.";
|
||||||
"WebPage.OpenLink" = "OPEN LINK";
|
"WebPage.OpenLink" = "OPEN LINK";
|
||||||
|
"Ads" = "Advertisements";
|
||||||
"Ads.Reported" = "We will review this ad to ensure it matches our **[Ad Policies and Guidelines](https://ads.telegram.org/guidelines)**.";
|
"Ads.Reported" = "We will review this ad to ensure it matches our **[Ad Policies and Guidelines](https://ads.telegram.org/guidelines)**.";
|
||||||
"RevenueSharingAdsInfo4SubtitleLearnMore1" = "**[Learn More >](https://ads.telegram.org/)**";
|
"RevenueSharingAdsInfo4SubtitleLearnMore1" = "**[Learn More >](https://ads.telegram.org/)**";
|
||||||
"Stars.TOS" = "By proceeding and purchasing Stars, you agree with the [Terms and Conditions](https://telegram.org/tos).";
|
"Stars.TOS" = "By proceeding and purchasing Stars, you agree with the [Terms and Conditions](https://telegram.org/tos).";
|
||||||
@ -844,9 +845,11 @@
|
|||||||
"AddAnExplanationInfo" = "Users will see this text after choosing the wrong answer, good for educational purposes.";
|
"AddAnExplanationInfo" = "Users will see this text after choosing the wrong answer, good for educational purposes.";
|
||||||
"AccDescrQuizExplanation" = "Explanation";
|
"AccDescrQuizExplanation" = "Explanation";
|
||||||
"PhoneCopied" = "Phone copied to clipboard";
|
"PhoneCopied" = "Phone copied to clipboard";
|
||||||
|
"ChatIdCopied": "Chat ID copied to clipboard";
|
||||||
"UsernameCopied" = "Username copied to clipboard.";
|
"UsernameCopied" = "Username copied to clipboard.";
|
||||||
"BioCopied" = "Bio copied to clipboard.";
|
"BioCopied" = "Bio copied to clipboard.";
|
||||||
"UserBio" = "Bio";
|
"UserBio" = "Bio";
|
||||||
|
"ChatId" = "Chat ID";
|
||||||
"Username" = "Username";
|
"Username" = "Username";
|
||||||
"UsernameAlso" = "also %1$s";
|
"UsernameAlso" = "also %1$s";
|
||||||
"UsernameHelp" = "You can choose a username on **Telegram**. If you do, people will be able to find you by this username and contact you without needing your phone number.\n\nYou can use **a–z**, **0–9** and underscores. Minimum length is **5** characters.";
|
"UsernameHelp" = "You can choose a username on **Telegram**. If you do, people will be able to find you by this username and contact you without needing your phone number.\n\nYou can use **a–z**, **0–9** and underscores. Minimum length is **5** characters.";
|
||||||
@ -2361,6 +2364,7 @@
|
|||||||
"Text.CopyLabel_Bio" = "Copy Bio";
|
"Text.CopyLabel_Bio" = "Copy Bio";
|
||||||
"Text.CopyLabel_PhoneNumber" = "Copy Phone Number";
|
"Text.CopyLabel_PhoneNumber" = "Copy Phone Number";
|
||||||
"Text.CopyLabel_Username" = "Copy Username";
|
"Text.CopyLabel_Username" = "Copy Username";
|
||||||
|
"Text.CopyLabel_ChatId" = "Copy Chat ID";
|
||||||
"Text.CopyLabel_ShareLink" = "Copy Share Link";
|
"Text.CopyLabel_ShareLink" = "Copy Share Link";
|
||||||
"GeneralSettings.BigEmoji" = "Large Emoji";
|
"GeneralSettings.BigEmoji" = "Large Emoji";
|
||||||
"GeneralSettings.EmojiPrediction" = "Suggest Emoji";
|
"GeneralSettings.EmojiPrediction" = "Suggest Emoji";
|
||||||
@ -2524,3 +2528,4 @@
|
|||||||
"PHONE_CODE_INVALID" = "Invalid code";
|
"PHONE_CODE_INVALID" = "Invalid code";
|
||||||
"PHONE_CODE_EXPIRED" = "Code expired";
|
"PHONE_CODE_EXPIRED" = "Code expired";
|
||||||
"PASSWORD_HASH_INVALID" = "Incorrect password";
|
"PASSWORD_HASH_INVALID" = "Incorrect password";
|
||||||
|
"MessageFilters" = "Message Filters";
|
@ -857,6 +857,24 @@ $time-margin-left: math.div($message-padding-horizontal, -2) + 1px;
|
|||||||
// border-radius: inherit;
|
// border-radius: inherit;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// octt: //
|
||||||
|
.bubbles-inner {
|
||||||
|
&.is-broadcast {
|
||||||
|
body.message-filters-ads & {
|
||||||
|
.bubble.is-sponsored {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.is-chat {
|
||||||
|
body.message-filters-blocked & {
|
||||||
|
.bubble.user-blocked {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.chat-input-wrapper {
|
.chat-input-wrapper {
|
||||||
|
7
webk/src/types.d.ts
vendored
@ -94,8 +94,13 @@ export type PickByType<T, Value> = {
|
|||||||
[P in keyof T as T[P] extends Value | undefined ? P : never]: T[P]
|
[P in keyof T as T[P] extends Value | undefined ? P : never]: T[P]
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AuthState = AuthState.signIn | AuthState.signQr | AuthState.authCode | AuthState.password | AuthState.signUp | AuthState.signedIn | AuthState.signImport;
|
// octt: custom landing page
|
||||||
|
export type AuthState = AuthState.landing | AuthState.signIn | AuthState.signQr | AuthState.authCode | AuthState.password | AuthState.signUp | AuthState.signedIn | AuthState.signImport;
|
||||||
export namespace AuthState {
|
export namespace AuthState {
|
||||||
|
export type landing = {
|
||||||
|
_: 'authStateLanding'
|
||||||
|
};
|
||||||
|
|
||||||
export type signIn = {
|
export type signIn = {
|
||||||
_: 'authStateSignIn'
|
_: 'authStateSignIn'
|
||||||
};
|
};
|
||||||
|