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="copyLinkBtn" type="button" disabled>Copy link</button>
<button id="shareToXBtn" type="button" disabled>Share to X</button> <button id="shareToXBtn" type="button" disabled>Share to X</button>
</div> </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>
</div> </div>
+6 -20
View File
@@ -55,8 +55,6 @@ class MotifApp {
private copyLinkBtn!: HTMLButtonElement; private copyLinkBtn!: HTMLButtonElement;
private shareToXBtn!: HTMLButtonElement; private shareToXBtn!: HTMLButtonElement;
private shareLinkBox!: HTMLElement;
private shareLinkInput!: HTMLInputElement;
// Embed snippet UI // Embed snippet UI
private embedSection: HTMLElement | null = null; private embedSection: HTMLElement | null = null;
@@ -129,8 +127,6 @@ class MotifApp {
this.copyLinkBtn = document.getElementById('copyLinkBtn') as HTMLButtonElement; this.copyLinkBtn = document.getElementById('copyLinkBtn') as HTMLButtonElement;
this.shareToXBtn = document.getElementById('shareToXBtn') 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) // iOS audio unlock UI (Motif)
this.iosAudioBanner = document.getElementById('iosAudioBanner')!; this.iosAudioBanner = document.getElementById('iosAudioBanner')!;
@@ -730,22 +726,12 @@ class MotifApp {
} }
} }
if (copied) { // Show feedback
// Show brief "Copied!" feedback const originalText = this.copyLinkBtn.textContent;
const originalText = this.copyLinkBtn.textContent; this.copyLinkBtn.textContent = copied ? 'Copied!' : 'Failed';
this.copyLinkBtn.textContent = 'Copied!'; setTimeout(() => {
setTimeout(() => { this.copyLinkBtn.textContent = originalText;
this.copyLinkBtn.textContent = originalText; }, 1500);
}, 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();
}
} }
private async handleShareToX(): Promise<void> { private async handleShareToX(): Promise<void> {