Add button to share room details link

dev
gravel 2 years ago
parent dd6c4c1a59
commit b044f99a47
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -49,6 +49,8 @@ export const STAFF_ID_PASTE = "Copied staff ping to clipboard. Use it in the sel
export const IDENTIFIER_PASTE = "Copied internal room identifier. Use it to identify a room, such as when contributing language labels." export const IDENTIFIER_PASTE = "Copied internal room identifier. Use it to identify a room, such as when contributing language labels."
export const DETAILS_LINK_PASTE = "Copied link to Community details.";
export const communityQRCodeURL = (communityID) => `qr-codes/${communityID}.png` export const communityQRCodeURL = (communityID) => `qr-codes/${communityID}.png`
export const COLUMN = { export const COLUMN = {

@ -17,7 +17,7 @@
import { import {
dom, COLUMN, COLUMN_LITERAL, COMPARISON, ATTRIBUTES, dom, COLUMN, COLUMN_LITERAL, COMPARISON, ATTRIBUTES,
columnAscendingByDefault, columnIsSortable, COLUMN_TRANSFORMATION, columnAscendingByDefault, columnIsSortable, COLUMN_TRANSFORMATION,
element, JOIN_URL_PASTE, communityQRCodeURL, STAFF_ID_PASTE, IDENTIFIER_PASTE element, JOIN_URL_PASTE, communityQRCodeURL, STAFF_ID_PASTE, IDENTIFIER_PASTE, DETAILS_LINK_PASTE
} from './js/constants.js'; } from './js/constants.js';
// Hidden communities for transparency. // Hidden communities for transparency.
@ -283,6 +283,13 @@ function addQRModalHandlers() {
} }
) )
document.querySelector('#details-modal-copy-room-details-link')?.addEventListener(
'click',
function() {
copyToClipboard(location.href, DETAILS_LINK_PASTE);
}
)
for (const anchor of dom.qr_code_buttons()) { for (const anchor of dom.qr_code_buttons()) {
// Disable QR code links // Disable QR code links
anchor.setAttribute("href", "#"); anchor.setAttribute("href", "#");

@ -99,11 +99,20 @@
Copy mod ping Copy mod ping
</button> </button>
<button <button
id="details-modal-copy-room-id" id="details-modal-copy-room-id"
class="themed-button"
data-hydrate-with="identifier:data-identifier"
title="Copy this room's identifier to uniquely identify this room to the sessioncommunities.online team"
>
Copy ID
</button>
<button
id="details-modal-copy-room-details-link"
class="themed-button" class="themed-button"
data-hydrate-with="identifier:data-identifier" title="Copy link to show details about this Community"
title="Copy this room's identifier to uniquely identify this room to the sessioncommunities.online team" >
>Copy Community ID</button> Share
</button>
<gap></gap> <gap></gap>
<div id="details-modal-pane-selection" class="hidden"> <div id="details-modal-pane-selection" class="hidden">
<button <button

Loading…
Cancel
Save