mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Move copy function to platform
This commit is contained in:
parent
acba597e8b
commit
98d4dfd8e6
@ -17,7 +17,6 @@ limitations under the License.
|
||||
import {SimpleTile} from "./SimpleTile.js";
|
||||
import {ReactionsViewModel} from "../ReactionsViewModel.js";
|
||||
import {getIdentifierColorNumber, avatarInitials, getAvatarHttpUrl} from "../../../../avatar";
|
||||
import {copyPlaintext} from "../../../../../platform/web/dom/utils";
|
||||
|
||||
|
||||
export class BaseMessageTile extends SimpleTile {
|
||||
@ -47,7 +46,7 @@ export class BaseMessageTile extends SimpleTile {
|
||||
}
|
||||
|
||||
copyPermalink() {
|
||||
copyPlaintext(this.permaLink);
|
||||
this.platform.copyPlaintext(this.permaLink);
|
||||
}
|
||||
|
||||
get senderProfileLink() {
|
||||
|
@ -43,6 +43,7 @@ import {MediaDevicesWrapper} from "./dom/MediaDevices";
|
||||
import {DOMWebRTC} from "./dom/WebRTC";
|
||||
import {ThemeLoader} from "./theming/ThemeLoader";
|
||||
import {TimeFormatter} from "./dom/TimeFormatter";
|
||||
import {copyPlaintext} from "./dom/utils";
|
||||
|
||||
function addScript(src) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
@ -283,6 +284,10 @@ export class Platform {
|
||||
}
|
||||
}
|
||||
|
||||
async copyPlaintext(text) {
|
||||
return await copyPlaintext(text);
|
||||
}
|
||||
|
||||
restart() {
|
||||
document.location.reload();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user