Remove share link text box - just show Copied/Failed feedback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
b1rdmania
2025-12-29 16:22:10 +00:00
parent 6ea3fa49fc
commit fc272f3b58
2 changed files with 6 additions and 24 deletions
-4
View File
@@ -1220,10 +1220,6 @@
<button id="copyLinkBtn" type="button" disabled>Copy link</button>
<button id="shareToXBtn" type="button" disabled>Share to X</button>
</div>
<div id="shareLinkBox" style="display: none; margin-top: 12px;">
<input type="text" id="shareLinkInput" readonly style="width: 100%; font-size: 8px; padding: 10px;" />
<div style="margin-top: 6px; font-size: 8px; color: var(--gb-dark);">Select and copy the link above</div>
</div>
</div>
</div>
+6 -20
View File
@@ -55,8 +55,6 @@ class MotifApp {
private copyLinkBtn!: HTMLButtonElement;
private shareToXBtn!: HTMLButtonElement;
private shareLinkBox!: HTMLElement;
private shareLinkInput!: HTMLInputElement;
// Embed snippet UI
private embedSection: HTMLElement | null = null;
@@ -129,8 +127,6 @@ class MotifApp {
this.copyLinkBtn = document.getElementById('copyLinkBtn') as HTMLButtonElement;
this.shareToXBtn = document.getElementById('shareToXBtn') as HTMLButtonElement;
this.shareLinkBox = document.getElementById('shareLinkBox') as HTMLElement;
this.shareLinkInput = document.getElementById('shareLinkInput') as HTMLInputElement;
// iOS audio unlock UI (Motif)
this.iosAudioBanner = document.getElementById('iosAudioBanner')!;
@@ -730,22 +726,12 @@ class MotifApp {
}
}
if (copied) {
// Show brief "Copied!" feedback
const originalText = this.copyLinkBtn.textContent;
this.copyLinkBtn.textContent = 'Copied!';
setTimeout(() => {
this.copyLinkBtn.textContent = originalText;
}, 1500);
// Hide the text box if it was showing from a previous attempt
this.shareLinkBox.style.display = 'none';
} else {
// Last resort: show text box for manual copy
this.shareLinkInput.value = shareUrl;
this.shareLinkBox.style.display = 'block';
this.shareLinkInput.focus();
this.shareLinkInput.select();
}
// Show feedback
const originalText = this.copyLinkBtn.textContent;
this.copyLinkBtn.textContent = copied ? 'Copied!' : 'Failed';
setTimeout(() => {
this.copyLinkBtn.textContent = originalText;
}, 1500);
}
private async handleShareToX(): Promise<void> {