fix: restore ShareModal design

- The copy button works again to copy the URL.
- The copy button is now to the right of the input component (not below).
- Removed the fixed height on the buttons so they now match the height of the input text fields.
This commit is contained in:
Massedil
2025-11-19 17:34:46 +01:00
committed by setop
parent 69b2f86239
commit fe1b8720fb
2 changed files with 5 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ body {
/* Button */ /* Button */
.btn { .btn {
@apply font-bold py-2 px-4 bg-mbz-bluegreen hover:bg-mbz-bluegreen-600 text-white rounded h-10 outline-none focus:ring ring-offset-1 ring-offset-slate-50 ring-blue-300; @apply font-bold py-2 px-4 bg-mbz-bluegreen hover:bg-mbz-bluegreen-600 text-white rounded outline-none focus:ring ring-offset-1 ring-offset-slate-50 ring-blue-300;
} }
.btn:hover { .btn:hover {
@apply text-slate-200; @apply text-slate-200;

View File

@@ -7,7 +7,7 @@
<section class="flex"> <section class="flex">
<div class="w-full"> <div class="w-full">
<slot></slot> <slot></slot>
<o-field :label="inputLabel" label-for="url-text"> <o-field addons :label="inputLabel" label-for="url-text">
<o-input id="url-text" ref="URLInput" :modelValue="url" expanded /> <o-input id="url-text" ref="URLInput" :modelValue="url" expanded />
<p class="control"> <p class="control">
<o-tooltip <o-tooltip
@@ -159,10 +159,10 @@ const mastodonShare = computed((): string | undefined =>
mastodonShareUrl(props.url, props.text) mastodonShareUrl(props.url, props.text)
); );
const copyURL = (): void => { const copyURL = async () => {
URLInput.value?.$refs.inputRef.select(); await navigator.clipboard.writeText(props.url);
document.execCommand("copy");
showCopiedTooltip.value = true; showCopiedTooltip.value = true;
setTimeout(() => { setTimeout(() => {
showCopiedTooltip.value = false; showCopiedTooltip.value = false;
}, 2000); }, 2000);