mirror of
https://github.com/manualdousuario/marreta.git
synced 2025-04-14 02:39:13 +00:00
adicionado colar
This commit is contained in:
parent
8f277a648e
commit
602fc277dd
9 changed files with 44 additions and 5 deletions
app
assets
dist
src/views
|
@ -85,4 +85,20 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Paste button functionality
|
||||
const pasteButton = document.getElementById('paste');
|
||||
const urlInput = document.getElementById('url');
|
||||
|
||||
if (pasteButton && urlInput) {
|
||||
pasteButton.addEventListener('click', async (e) => {
|
||||
e.preventDefault();
|
||||
try {
|
||||
const clipboardText = await navigator.clipboard.readText();
|
||||
urlInput.value = clipboardText.trim();
|
||||
} catch (err) {
|
||||
console.error('Failed to read clipboard contents', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
|
@ -38,4 +38,6 @@
|
|||
@include mixin.icon('warning', 'invert(89%) sepia(25%) saturate(5861%) hue-rotate(353deg) brightness(101%) contrast(101%)');
|
||||
|
||||
@include mixin.icon('hamburguer', 'invert(0%) sepia(21%) saturate(7425%) hue-rotate(12deg) brightness(96%) contrast(96%)');
|
||||
@include mixin.icon('close', 'invert(100%) sepia(32%) saturate(8%) hue-rotate(23deg) brightness(102%) contrast(100%)');
|
||||
@include mixin.icon('close', 'invert(100%) sepia(32%) saturate(8%) hue-rotate(23deg) brightness(102%) contrast(100%)');
|
||||
|
||||
@include mixin.icon('paste', 'invert(0%) sepia(21%) saturate(7425%) hue-rotate(12deg) brightness(96%) contrast(96%)');
|
|
@ -496,6 +496,23 @@ main {
|
|||
}
|
||||
}
|
||||
|
||||
.paste {
|
||||
background: rgb(244,244,245);
|
||||
background: linear-gradient(90deg, rgba(244,244,245,0) 0%, rgba(244,244,245,1) 30%, rgba(244,244,245,1) 100%);
|
||||
align-items: center;
|
||||
z-index: 3;
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
padding: 0 18px 0 22px;
|
||||
right: 50px;
|
||||
cursor: pointer;
|
||||
height: 48px;
|
||||
display: flex;
|
||||
.icon {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
position: relative;
|
||||
background-color: var(--marreta);
|
||||
|
|
2
app/dist/css/style.css
vendored
2
app/dist/css/style.css
vendored
File diff suppressed because one or more lines are too long
2
app/dist/css/style.css.map
vendored
2
app/dist/css/style.css.map
vendored
File diff suppressed because one or more lines are too long
3
app/dist/icons/paste.svg
vendored
Normal file
3
app/dist/icons/paste.svg
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.33333 2.66667H3.45333C3.72667 3.44 4.46 4 5.33333 4H6.66667C7.53333 4 8.26667 3.44 8.54667 2.66667H8.66667C9.58 2.66667 10.3733 3.28 10.6067 4.16667C10.7 4.52667 11.06 4.74 11.42 4.64667C11.7733 4.55333 11.9933 4.19333 11.9 3.83333C11.52 2.36 10.1933 1.33333 8.67333 1.33333H8.56C8.28667 0.56 7.54667 0 6.67333 0H5.34C4.47333 0 3.72667 0.56 3.45333 1.33333H3.34C1.49333 1.33333 0 2.82667 0 4.66667V12.6667C0 14.5067 1.49333 16 3.33333 16H5.33333C5.7 16 6 15.7 6 15.3333C6 14.9667 5.7 14.6667 5.33333 14.6667H3.33333C2.23333 14.6667 1.33333 13.7667 1.33333 12.6667V4.66667C1.33333 3.56667 2.23333 2.66667 3.33333 2.66667ZM5.33333 1.33333H6.66667C7.03333 1.33333 7.33333 1.63333 7.33333 2C7.33333 2.36667 7.03333 2.66667 6.66667 2.66667H5.33333C4.96667 2.66667 4.66667 2.36667 4.66667 2C4.66667 1.63333 4.96667 1.33333 5.33333 1.33333ZM13.3333 6H10C8.52667 6 7.33333 7.19333 7.33333 8.66667V13.3333C7.33333 14.8067 8.52667 16 10 16H13.3333C14.8067 16 16 14.8067 16 13.3333V8.66667C16 7.19333 14.8067 6 13.3333 6ZM14.6667 13.3333C14.6667 14.0667 14.0667 14.6667 13.3333 14.6667H10C9.26667 14.6667 8.66667 14.0667 8.66667 13.3333V8.66667C8.66667 7.93333 9.26667 7.33333 10 7.33333H13.3333C14.0667 7.33333 14.6667 7.93333 14.6667 8.66667V13.3333ZM13.3333 9.33333C13.3333 9.7 13.0333 10 12.6667 10H10.6667C10.3 10 10 9.7 10 9.33333C10 8.96667 10.3 8.66667 10.6667 8.66667H12.6667C13.0333 8.66667 13.3333 8.96667 13.3333 9.33333ZM13.3333 12C13.3333 12.3667 13.0333 12.6667 12.6667 12.6667H10.6667C10.3 12.6667 10 12.3667 10 12C10 11.6333 10.3 11.3333 10.6667 11.3333H12.6667C13.0333 11.3333 13.3333 11.6333 13.3333 12Z" fill="black"/>
|
||||
</svg>
|
After (image error) Size: 1.7 KiB |
2
app/dist/js/scripts.js
vendored
2
app/dist/js/scripts.js
vendored
|
@ -1,2 +1,2 @@
|
|||
"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(()=>{}).catch(()=>{})}),document.addEventListener("DOMContentLoaded",function(){let t=document.querySelector(".integration");var e=document.querySelector(".integration__toggle");let o=document.querySelector(".extension");var n=document.querySelector(".extension__toggle");let s=e=>{e!==t&&t.classList.remove("open"),e!==o&&o.classList.remove("open")};e.addEventListener("click",e=>{e.stopPropagation(),s(t),t.classList.toggle("open")}),n.addEventListener("click",e=>{e.stopPropagation(),s(o),o.classList.toggle("open")}),t.addEventListener("click",e=>{e.stopPropagation()}),o.addEventListener("click",e=>{e.stopPropagation()}),document.addEventListener("click",()=>{t.classList.remove("open"),o.classList.remove("open")}),document.addEventListener("click",e=>{e=e.target.closest(".toasty");e&&e.remove()}),document.addEventListener("click",e=>{e.target.closest(".open-nav")&&((e=document.querySelector("header")).classList.contains("open")?e.classList.remove("open"):e.classList.add("open"))})});
|
||||
"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/service-worker.js").then(()=>{}).catch(()=>{})}),document.addEventListener("DOMContentLoaded",function(){let t=document.querySelector(".integration");var e=document.querySelector(".integration__toggle");let o=document.querySelector(".extension");var n=document.querySelector(".extension__toggle");let r=e=>{e!==t&&t.classList.remove("open"),e!==o&&o.classList.remove("open")};e.addEventListener("click",e=>{e.stopPropagation(),r(t),t.classList.toggle("open")}),n.addEventListener("click",e=>{e.stopPropagation(),r(o),o.classList.toggle("open")}),t.addEventListener("click",e=>{e.stopPropagation()}),o.addEventListener("click",e=>{e.stopPropagation()}),document.addEventListener("click",()=>{t.classList.remove("open"),o.classList.remove("open")}),document.addEventListener("click",e=>{e=e.target.closest(".toasty");e&&e.remove()}),document.addEventListener("click",e=>{e.target.closest(".open-nav")&&((e=document.querySelector("header")).classList.contains("open")?e.classList.remove("open"):e.classList.add("open"))});e=document.getElementById("paste");let a=document.getElementById("url");e&&a&&e.addEventListener("click",async e=>{e.preventDefault();try{var t=await navigator.clipboard.readText();a.value=t.trim()}catch(e){console.error("Failed to read clipboard contents",e)}})});
|
||||
//# sourceMappingURL=scripts.js.map
|
||||
|
|
2
app/dist/js/scripts.js.map
vendored
2
app/dist/js/scripts.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -86,6 +86,7 @@
|
|||
required
|
||||
pattern="https?://.+"
|
||||
title="<?php echo \Inc\Language::getMessage('INVALID_URL')['message']; ?>">
|
||||
<span class="paste" id="paste"><span class="icon icon--paste"></span></span>
|
||||
</div>
|
||||
<button type="submit" alt="<?php echo \Inc\Language::get('analyze_button'); ?>">
|
||||
<span class="icon icon--marreta"></span>
|
||||
|
|
Loading…
Add table
Reference in a new issue