fix bits which missed the review cutting block
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
901e402a5c
commit
d3de792f79
3 changed files with 6 additions and 6 deletions
|
@ -434,7 +434,7 @@ export const aboveLeftOf = (elementRect, chevronFace="none") => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const useContextMenu = () => {
|
export const useContextMenu = () => {
|
||||||
const _button = useRef(null);
|
const button = useRef(null);
|
||||||
const [isOpen, setIsOpen] = useState(false);
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
const open = () => {
|
const open = () => {
|
||||||
setIsOpen(true);
|
setIsOpen(true);
|
||||||
|
@ -443,7 +443,7 @@ export const useContextMenu = () => {
|
||||||
setIsOpen(false);
|
setIsOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return [isOpen, _button, open, close, setIsOpen];
|
return [isOpen, button, open, close, setIsOpen];
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class LegacyContextMenu extends ContextMenu {
|
export default class LegacyContextMenu extends ContextMenu {
|
||||||
|
|
|
@ -21,7 +21,7 @@ import sdk from '../../../index';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import QRCode from 'qrcode-react';
|
import QRCode from 'qrcode-react';
|
||||||
import {RoomPermalinkCreator, makeGroupPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks";
|
import {RoomPermalinkCreator, makeGroupPermalink, makeUserPermalink} from "../../../utils/permalinks/Permalinks";
|
||||||
import * as ContextualMenu from "../../structures/ContextMenu";
|
import * as ContextMenu from "../../structures/ContextMenu";
|
||||||
import {toRightOf} from "../../structures/ContextMenu";
|
import {toRightOf} from "../../structures/ContextMenu";
|
||||||
|
|
||||||
const socials = [
|
const socials = [
|
||||||
|
@ -105,7 +105,7 @@ export default class ShareDialog extends React.Component {
|
||||||
|
|
||||||
const buttonRect = e.target.getBoundingClientRect();
|
const buttonRect = e.target.getBoundingClientRect();
|
||||||
const GenericTextContextMenu = sdk.getComponent('context_menus.GenericTextContextMenu');
|
const GenericTextContextMenu = sdk.getComponent('context_menus.GenericTextContextMenu');
|
||||||
const {close} = ContextualMenu.createMenu(GenericTextContextMenu, {
|
const {close} = ContextMenu.createMenu(GenericTextContextMenu, {
|
||||||
...toRightOf(buttonRect, 11),
|
...toRightOf(buttonRect, 11),
|
||||||
message: successful ? _t('Copied!') : _t('Failed to copy'),
|
message: successful ? _t('Copied!') : _t('Failed to copy'),
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,7 +27,7 @@ import sdk from '../../../index';
|
||||||
import Modal from '../../../Modal';
|
import Modal from '../../../Modal';
|
||||||
import dis from '../../../dispatcher';
|
import dis from '../../../dispatcher';
|
||||||
import { _t } from '../../../languageHandler';
|
import { _t } from '../../../languageHandler';
|
||||||
import * as ContextualMenu from '../../structures/ContextMenu';
|
import * as ContextMenu from '../../structures/ContextMenu';
|
||||||
import SettingsStore from "../../../settings/SettingsStore";
|
import SettingsStore from "../../../settings/SettingsStore";
|
||||||
import ReplyThread from "../elements/ReplyThread";
|
import ReplyThread from "../elements/ReplyThread";
|
||||||
import {pillifyLinks} from '../../../utils/pillify';
|
import {pillifyLinks} from '../../../utils/pillify';
|
||||||
|
@ -275,7 +275,7 @@ module.exports = createReactClass({
|
||||||
|
|
||||||
const buttonRect = e.target.getBoundingClientRect();
|
const buttonRect = e.target.getBoundingClientRect();
|
||||||
const GenericTextContextMenu = sdk.getComponent('context_menus.GenericTextContextMenu');
|
const GenericTextContextMenu = sdk.getComponent('context_menus.GenericTextContextMenu');
|
||||||
const {close} = ContextualMenu.createMenu(GenericTextContextMenu, {
|
const {close} = ContextMenu.createMenu(GenericTextContextMenu, {
|
||||||
...toRightOf(buttonRect, 11),
|
...toRightOf(buttonRect, 11),
|
||||||
message: successful ? _t('Copied!') : _t('Failed to copy'),
|
message: successful ? _t('Copied!') : _t('Failed to copy'),
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue