feat: update passwords tool UI, fix layout issues, and set PWA theme color
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
<link rel="apple-touch-icon" href="/favicon.svg" />
|
<link rel="apple-touch-icon" href="/favicon.svg" />
|
||||||
<meta name="theme-color" content="#242424" />
|
<meta name="theme-color" content="#4facfe" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Tools App</title>
|
<title>Tools App</title>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -31,7 +31,13 @@ onMounted(() => {
|
|||||||
<header class="app-header glass-panel unselectable">
|
<header class="app-header glass-panel unselectable">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
<div class="header-left">
|
<div class="header-left">
|
||||||
<button class="menu-btn" @click="$emit('toggleSidebar')" aria-label="Toggle Menu" v-ripple>
|
<button
|
||||||
|
class="menu-btn"
|
||||||
|
@click="$emit('toggleSidebar')"
|
||||||
|
aria-label="Toggle Menu"
|
||||||
|
title="Toggle Menu"
|
||||||
|
v-ripple
|
||||||
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="showInstallPrompt" class="install-prompt glass-panel unselectable">
|
<div v-if="showInstallPrompt" class="install-prompt glass-panel unselectable">
|
||||||
<div class="prompt-content">
|
<div class="prompt-content">
|
||||||
<span class="prompt-text">Zainstaluj aplikację dla szybszego dostępu</span>
|
<span class="prompt-text">Install app for faster access</span>
|
||||||
<div class="prompt-actions">
|
<div class="prompt-actions">
|
||||||
<button @click="installPWA" class="install-btn">Zainstaluj</button>
|
<button @click="installPWA" class="install-btn">Install</button>
|
||||||
<button @click="dismissPrompt" class="dismiss-btn">✕</button>
|
<button @click="dismissPrompt" class="dismiss-btn">✕</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,6 +19,12 @@ let deferredPrompt = null
|
|||||||
const handleBeforeInstallPrompt = (e) => {
|
const handleBeforeInstallPrompt = (e) => {
|
||||||
// Prevent Chrome 67 and earlier from automatically showing the prompt
|
// Prevent Chrome 67 and earlier from automatically showing the prompt
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
|
|
||||||
|
// Only show install prompt if we are on the specific domain
|
||||||
|
if (window.location.hostname !== 'tools.7u.pl') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Stash the event so it can be triggered later.
|
// Stash the event so it can be triggered later.
|
||||||
deferredPrompt = e
|
deferredPrompt = e
|
||||||
// Update UI to notify the user they can add to home screen
|
// Update UI to notify the user they can add to home screen
|
||||||
|
|||||||
@@ -104,11 +104,19 @@ const generatePasswords = () => {
|
|||||||
<div class="inputs-group">
|
<div class="inputs-group">
|
||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<label>Password Length</label>
|
<label>Password Length</label>
|
||||||
<input type="number" v-model="length" min="4" max="128" class="number-input">
|
<div class="number-control">
|
||||||
|
<button class="control-btn" @click="length > 4 ? length-- : null">-</button>
|
||||||
|
<input type="number" v-model="length" min="4" max="128" class="number-input">
|
||||||
|
<button class="control-btn" @click="length < 128 ? length++ : null">+</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-wrapper">
|
<div class="input-wrapper">
|
||||||
<label>Passwords Number</label>
|
<label>Passwords Number</label>
|
||||||
<input type="number" v-model="count" min="1" max="1000" class="number-input">
|
<div class="number-control">
|
||||||
|
<button class="control-btn" @click="count > 1 ? count-- : null">-</button>
|
||||||
|
<input type="number" v-model="count" min="1" max="1000" class="number-input">
|
||||||
|
<button class="control-btn" @click="count < 1000 ? count++ : null">+</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -122,7 +130,7 @@ const generatePasswords = () => {
|
|||||||
<div class="result-area">
|
<div class="result-area">
|
||||||
<label>Passwords</label>
|
<label>Passwords</label>
|
||||||
<textarea
|
<textarea
|
||||||
class="result-textarea glass-panel"
|
class="result-textarea glass-panel selectable"
|
||||||
v-model="result"
|
v-model="result"
|
||||||
placeholder="Generated passwords will appear here..."
|
placeholder="Generated passwords will appear here..."
|
||||||
></textarea>
|
></textarea>
|
||||||
@@ -138,6 +146,7 @@ const generatePasswords = () => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-panel {
|
.tool-panel {
|
||||||
@@ -147,6 +156,27 @@ const generatePasswords = () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 1.5rem;
|
gap: 1.5rem;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Custom scrollbar for tool panel */
|
||||||
|
.tool-panel::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-panel::-webkit-scrollbar-track {
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-panel::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tool-panel::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-title {
|
.tool-title {
|
||||||
@@ -198,16 +228,17 @@ const generatePasswords = () => {
|
|||||||
background-color: var(--toggle-bg);
|
background-color: var(--toggle-bg);
|
||||||
border: 1px solid var(--toggle-border);
|
border: 1px solid var(--toggle-border);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-label:hover input ~ .checkmark {
|
.checkbox-label:hover .checkmark {
|
||||||
border-color: var(--accent-cyan);
|
border-color: var(--toggle-hover-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-label input:checked ~ .checkmark {
|
.checkbox-label input:checked ~ .checkmark {
|
||||||
background-color: var(--accent-cyan);
|
background-color: var(--primary-accent);
|
||||||
border-color: var(--accent-cyan);
|
border-color: var(--primary-accent);
|
||||||
|
box-shadow: 0 0 10px var(--primary-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkmark:after {
|
.checkmark:after {
|
||||||
@@ -232,8 +263,8 @@ const generatePasswords = () => {
|
|||||||
|
|
||||||
.inputs-group {
|
.inputs-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 2rem;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
gap: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-wrapper {
|
.input-wrapper {
|
||||||
@@ -245,69 +276,169 @@ const generatePasswords = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.input-wrapper label {
|
.input-wrapper label {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-weight: 500;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--text-muted);
|
}
|
||||||
font-weight: 600;
|
|
||||||
|
.number-control {
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
gap: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-btn {
|
||||||
|
width: 42px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: var(--toggle-bg);
|
||||||
|
border: 1px solid var(--toggle-border);
|
||||||
|
color: var(--text-color);
|
||||||
|
border-radius: 0;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-btn:first-child {
|
||||||
|
border-top-left-radius: 8px;
|
||||||
|
border-bottom-left-radius: 8px;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-btn:last-child {
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
border-bottom-right-radius: 8px;
|
||||||
|
border-left: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-btn:hover {
|
||||||
|
background-color: var(--button-hover-bg);
|
||||||
|
border-color: var(--toggle-hover-border);
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.control-btn:active {
|
||||||
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
|
|
||||||
.number-input {
|
.number-input {
|
||||||
background: var(--toggle-bg);
|
flex: 1;
|
||||||
|
padding: 0.8rem;
|
||||||
|
background-color: var(--toggle-bg);
|
||||||
border: 1px solid var(--toggle-border);
|
border: 1px solid var(--toggle-border);
|
||||||
|
border-radius: 0;
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
padding: 10px 15px;
|
|
||||||
border-radius: 8px;
|
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
outline: none;
|
transition: border-color 0.3s;
|
||||||
transition: border-color 0.2s;
|
text-align: center;
|
||||||
|
appearance: textfield; /* Remove default spinner */
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number-input::-webkit-outer-spin-button,
|
||||||
|
.number-input::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.number-input:focus {
|
.number-input:focus {
|
||||||
border-color: var(--accent-cyan);
|
outline: none;
|
||||||
|
border-color: var(--primary-accent);
|
||||||
|
box-shadow: 0 0 0 2px var(--toggle-active-shadow);
|
||||||
|
z-index: 2;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-area {
|
.action-area {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end; /* Align button to right */
|
justify-content: center;
|
||||||
|
margin-top: 1rem;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-btn {
|
.btn-neon {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px;
|
background: var(--button-bg);
|
||||||
|
border: 1px solid var(--button-border);
|
||||||
|
color: var(--button-text);
|
||||||
|
padding: 0.8rem 2rem;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
letter-spacing: 0.5px;
|
font-weight: 600;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-neon:hover {
|
||||||
|
background: var(--button-hover-bg);
|
||||||
|
box-shadow: var(--button-hover-shadow);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
border-color: var(--toggle-hover-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-neon:active {
|
||||||
|
transform: translateY(1px);
|
||||||
|
box-shadow: var(--button-active-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.result-area {
|
.result-area {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
flex: 1;
|
||||||
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.result-area label {
|
.result-area label {
|
||||||
|
color: var(--text-secondary);
|
||||||
|
font-weight: 500;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--text-muted);
|
|
||||||
font-weight: 600;
|
|
||||||
border-left: 3px solid var(--accent-purple);
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.result-textarea {
|
.result-textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 300px;
|
box-sizing: border-box;
|
||||||
background: rgba(0, 0, 0, 0.2); /* Slightly darker for contrast */
|
height: 100%;
|
||||||
color: var(--text-color);
|
min-height: 200px;
|
||||||
border: 1px solid var(--accent-purple);
|
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: 8px;
|
background-color: rgba(0, 0, 0, 0.2);
|
||||||
|
border: 1px solid var(--toggle-border);
|
||||||
|
border-radius: 12px;
|
||||||
|
color: var(--text-strong);
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
line-height: 1.5;
|
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
outline: none;
|
line-height: 1.6;
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:root[data-theme="light"] .result-textarea {
|
.result-textarea:focus {
|
||||||
background: rgba(255, 255, 255, 0.5);
|
outline: none;
|
||||||
|
border-color: var(--primary-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scrollbar for textarea */
|
||||||
|
.result-textarea::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-textarea::-webkit-scrollbar-track {
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-textarea::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.result-textarea::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
/* Box sizing reset */
|
||||||
|
*, *::before, *::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
@@ -86,6 +91,14 @@ body {
|
|||||||
min-width: 320px;
|
min-width: 320px;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selectable {
|
||||||
|
user-select: text;
|
||||||
|
-webkit-user-select: text;
|
||||||
|
cursor: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default defineConfig({
|
|||||||
name: 'Tools App',
|
name: 'Tools App',
|
||||||
short_name: 'Tools',
|
short_name: 'Tools',
|
||||||
description: 'A collection of useful tools',
|
description: 'A collection of useful tools',
|
||||||
theme_color: '#242424',
|
theme_color: '#4facfe',
|
||||||
background_color: '#242424',
|
background_color: '#242424',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
orientation: 'portrait',
|
orientation: 'portrait',
|
||||||
|
|||||||
Reference in New Issue
Block a user