Skip to content

Commit

Permalink
Merge pull request #23 from gary-Shen/fix/gist
Browse files Browse the repository at this point in the history
fix: access token page tooltip
  • Loading branch information
gary-Shen authored Jun 26, 2023
2 parents 684229b + 8a7750c commit c4ce6ea
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions server/api/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ function writeJSON(response, data) {
<title>Github access token for candi-tab</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"></script>
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
background: #f9f9f9;
}
#content {
display: flex;
flex-direction: column;
Expand All @@ -66,6 +75,7 @@ function writeJSON(response, data) {
}
.inputs input {
width: 22rem;
border-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
Expand All @@ -89,22 +99,26 @@ function writeJSON(response, data) {
aria-label="Repository description"
/>
<button
class="btn tooltipped tooltipped-nw"
class="btn"
type="button"
id="copy"
data-clipboard-target="#token"
aria-label="This is the tooltip on the North West side."
>
Copy
</button>
</div>
</div>
<script>
new ClipboardJS('#copy');
var _clipboard = new ClipboardJS('#copy');
_clipboard.on('success', function(e) {
e.trigger.classList.add('tooltipped', 'tooltipped-n');
e.trigger.setAttribute('aria-label', 'Copied!');
e.clearSelection();
});
</script>
</body>
</html>
`);
}

Expand Down

1 comment on commit c4ce6ea

@vercel
Copy link

@vercel vercel bot commented on c4ce6ea Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

candi-tab – ./

candi-tab-gary-shen.vercel.app
candi-tab.vercel.app
candi-tab-git-master-gary-shen.vercel.app

Please sign in to comment.