Left Menu: Support switching between versions (#1143)
This commit is contained in:
parent
b79e495841
commit
993eef3431
@ -52,6 +52,9 @@ type DispatchProps = Pick<GlobalActions, (
|
|||||||
|
|
||||||
const ANIMATION_LEVEL_OPTIONS = [0, 1, 2];
|
const ANIMATION_LEVEL_OPTIONS = [0, 1, 2];
|
||||||
|
|
||||||
|
const LEGACY_VERSION = 'https://web.telegram.org/';
|
||||||
|
const WEBK_VERSION = 'https://web.telegram.org/k/';
|
||||||
|
|
||||||
const LeftMainHeader: FC<OwnProps & StateProps & DispatchProps> = ({
|
const LeftMainHeader: FC<OwnProps & StateProps & DispatchProps> = ({
|
||||||
content,
|
content,
|
||||||
contactsFilter,
|
contactsFilter,
|
||||||
@ -221,6 +224,18 @@ const LeftMainHeader: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
>
|
>
|
||||||
Report Bug
|
Report Bug
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
icon="char-K"
|
||||||
|
href={WEBK_VERSION}
|
||||||
|
>
|
||||||
|
Switch to WebK
|
||||||
|
</MenuItem>
|
||||||
|
<MenuItem
|
||||||
|
icon="char-W"
|
||||||
|
href={LEGACY_VERSION}
|
||||||
|
>
|
||||||
|
Switch to Webogram
|
||||||
|
</MenuItem>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
<SearchInput
|
<SearchInput
|
||||||
inputId="telegram-search-input"
|
inputId="telegram-search-input"
|
||||||
|
|||||||
@ -67,7 +67,7 @@ const MenuItem: FC<OwnProps> = (props) => {
|
|||||||
const content = (
|
const content = (
|
||||||
<>
|
<>
|
||||||
{icon && (
|
{icon && (
|
||||||
<i className={`icon-${icon}`} />
|
<i className={`icon-${icon}`} data-char={icon.startsWith('char-') ? icon.replace('char-', '') : undefined} />
|
||||||
)}
|
)}
|
||||||
{children}
|
{children}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@ -22,6 +22,16 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[class^="icon-char-"], [class*=" icon-char-"] {
|
||||||
|
&::before {
|
||||||
|
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||||
|
content: attr(data-char);
|
||||||
|
width: 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.icon-bug:before {
|
.icon-bug:before {
|
||||||
content: "\e97e";
|
content: "\e97e";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user