feat: introducing shared requests to admin dashboard (#3537)
Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
committed by
GitHub
parent
6fa722df7b
commit
d9c75ed79e
@@ -0,0 +1,3 @@
|
||||
mutation RevokeShortcodeByAdmin($codeID: ID!) {
|
||||
revokeShortcodeByAdmin(code: $codeID)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
query SharedRequests($cursor: ID, $take: Int, $email: String) {
|
||||
infra {
|
||||
allShortcodes(cursor: $cursor, take: $take, userEmail: $email) {
|
||||
id
|
||||
request
|
||||
properties
|
||||
createdOn
|
||||
creator {
|
||||
email
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
packages/hoppscotch-sh-admin/src/helpers/utils/clipboard.ts
Normal file
18
packages/hoppscotch-sh-admin/src/helpers/utils/clipboard.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Copies a given string to the clipboard using
|
||||
* the legacy exec method
|
||||
*
|
||||
* @param content The content to be copied
|
||||
*/
|
||||
export function copyToClipboard(content: string) {
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(content);
|
||||
} else {
|
||||
const dummy = document.createElement('textarea');
|
||||
document.body.appendChild(dummy);
|
||||
dummy.value = content;
|
||||
dummy.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(dummy);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user