4 Commits

Author SHA1 Message Date
06b2815dd9 0.4.5
All checks were successful
Deploy to Production / deploy (push) Successful in 13s
2026-02-27 08:51:31 +00:00
1346de684c feat: url cleaner multiline support and ui tweaks 2026-02-27 08:51:05 +00:00
cfc9ac73b2 0.4.4
All checks were successful
Deploy to Production / deploy (push) Successful in 12s
2026-02-27 07:43:26 +00:00
e095c0190b style: restore danger styling for stop sniffing button 2026-02-27 07:43:12 +00:00
5 changed files with 83 additions and 15 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "tools-app", "name": "tools-app",
"version": "0.4.3", "version": "0.4.5",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "tools-app", "name": "tools-app",
"version": "0.4.3", "version": "0.4.5",
"dependencies": { "dependencies": {
"lucide-vue-next": "^0.575.0", "lucide-vue-next": "^0.575.0",
"vue": "^3.5.25", "vue": "^3.5.25",

View File

@@ -1,7 +1,7 @@
{ {
"name": "tools-app", "name": "tools-app",
"private": true, "private": true,
"version": "0.4.3", "version": "0.4.5",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -69,7 +69,7 @@ const clearText = () => {
</button> </button>
<button <button
v-else v-else
class="btn-neon active" class="btn-neon danger"
@click="stopListening" @click="stopListening"
v-ripple v-ripple
> >

View File

@@ -1,6 +1,6 @@
<script setup> <script setup>
import { ref, watch, onUnmounted } from 'vue' import { ref, watch, onUnmounted } from 'vue'
import { Copy, Trash2, ExternalLink, Power, Zap, X, Settings } from 'lucide-vue-next' import { Copy, Trash2, ExternalLink, Power, Zap, X, Settings, Download } from 'lucide-vue-next'
import { useExtension } from '../../composables/useExtension' import { useExtension } from '../../composables/useExtension'
import { useLocalStorage } from '../../composables/useLocalStorage' import { useLocalStorage } from '../../composables/useLocalStorage'
import ExtensionStatus from './common/ExtensionStatus.vue' import ExtensionStatus from './common/ExtensionStatus.vue'
@@ -57,10 +57,45 @@ const toggleWatch = () => {
isWatchEnabled.value = !isWatchEnabled.value isWatchEnabled.value = !isWatchEnabled.value
} }
const copyAllUrls = async () => {
if (cleanedHistory.value.length === 0) return
const text = cleanedHistory.value.map(item => item.cleaned).join('\n')
try {
await navigator.clipboard.writeText(text)
} catch (err) {
console.error('Failed to copy URLs', err)
}
}
const downloadJson = () => {
if (cleanedHistory.value.length === 0) return
const exportData = cleanedHistory.value.map(item => ({
url: item.cleaned,
original: item.original,
timestamp: item.timestamp
}))
const data = JSON.stringify(exportData, null, 2)
const blob = new Blob([data], { type: 'application/json' })
const url = URL.createObjectURL(blob)
const a = document.createElement('a')
a.href = url
a.download = `cleaned-urls-${new Date().toISOString().slice(0, 10)}.json`
document.body.appendChild(a)
a.click()
document.body.removeChild(a)
URL.revokeObjectURL(url)
}
// Manual clean // Manual clean
const handleClean = () => { const handleClean = () => {
if (inputUrl.value) { if (inputUrl.value) {
processUrl(inputUrl.value, false) const urls = inputUrl.value.split(/\r?\n/).filter(line => line.trim().length > 0)
urls.forEach(url => {
processUrl(url.trim(), false)
})
inputUrl.value = '' inputUrl.value = ''
} }
} }
@@ -189,13 +224,13 @@ onUnmounted(() => {
<div class="input-section"> <div class="input-section">
<div class="input-wrapper"> <div class="input-wrapper">
<input <textarea
v-model="inputUrl" v-model="inputUrl"
type="text" placeholder="Paste URL(s) here to clean..."
placeholder="Paste URL here to clean..."
class="url-input" class="url-input"
@keyup.enter="handleClean" @keydown.enter.prevent="handleClean"
> rows="1"
></textarea>
<button class="btn-neon" @click="handleClean"> <button class="btn-neon" @click="handleClean">
Clean Clean
</button> </button>
@@ -219,10 +254,18 @@ onUnmounted(() => {
<div class="history-section" v-if="cleanedHistory.length > 0"> <div class="history-section" v-if="cleanedHistory.length > 0">
<div class="history-header"> <div class="history-header">
<h3>Cleaned URLs</h3> <h3>Cleaned URLs</h3>
<button class="icon-btn" @click="clearHistory" title="Clear History"> <div class="history-actions">
<button class="icon-btn" @click="copyAllUrls" title="Copy all URLs">
<Copy size="18" />
</button>
<button class="icon-btn" @click="downloadJson" title="Download JSON">
<Download size="18" />
</button>
<button class="icon-btn delete-btn" @click="clearHistory" title="Clear History">
<Trash2 size="18" /> <Trash2 size="18" />
</button> </button>
</div> </div>
</div>
<div class="history-list"> <div class="history-list">
<div v-for="item in cleanedHistory" :key="item.id" class="history-item"> <div v-for="item in cleanedHistory" :key="item.id" class="history-item">
@@ -339,6 +382,9 @@ onUnmounted(() => {
font-size: 1rem; font-size: 1rem;
outline: none; outline: none;
transition: all 0.2s; transition: all 0.2s;
resize: vertical;
min-height: 46px;
font-family: inherit;
} }
.url-input:focus { .url-input:focus {
@@ -404,10 +450,16 @@ onUnmounted(() => {
color: var(--text-strong); color: var(--text-strong);
} }
.history-actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
.history-list { .history-list {
flex: 1; flex: 1;
overflow-y: auto; overflow-y: auto;
padding: 0.5rem; padding: 0;
} }
.history-item { .history-item {

View File

@@ -289,6 +289,22 @@ button:focus {
box-shadow: var(--button-active-shadow); box-shadow: var(--button-active-shadow);
} }
.btn-neon.danger {
background: rgba(239, 68, 68, 0.2);
border-color: rgba(239, 68, 68, 0.6);
color: #fee2e2;
}
.btn-neon.danger:hover {
background: rgba(239, 68, 68, 0.3);
border-color: rgba(239, 68, 68, 0.85);
box-shadow: 0 8px 20px rgba(239, 68, 68, 0.2);
}
:root[data-theme="light"] .btn-neon.danger {
color: #7f1d1d;
}
.icon-only { .icon-only {
padding: 8px; padding: 8px;
border-radius: 50%; border-radius: 50%;