Add single instance, remove box thing & change some styles & other stuff
This commit is contained in:
4 files changed
+25
-12
No files matched your search
@@ -18,3 +18,13 @@ serde = { version = "1.0.228", features = ["derive"] }
|
|||||||
serde_json = "1.0.150"
|
serde_json = "1.0.150"
|
||||||
tauri-plugin-clipboard-manager = "2.3.2"
|
tauri-plugin-clipboard-manager = "2.3.2"
|
||||||
tauri-plugin-os = "2.3.2"
|
tauri-plugin-os = "2.3.2"
|
||||||
|
|
||||||
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||||
|
tauri-plugin-single-instance = "2.4.2"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
opt-level = 3
|
||||||
|
lto = "fat"
|
||||||
|
codegen-units = 1
|
||||||
|
strip = true
|
||||||
|
panic = "abort"
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
|
use tauri::Manager;
|
||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
||||||
|
if let Some(window) = app.get_webview_window("main") {
|
||||||
|
let _ = window.set_focus();
|
||||||
|
}
|
||||||
|
}))
|
||||||
.plugin(tauri_plugin_os::init())
|
.plugin(tauri_plugin_os::init())
|
||||||
.plugin(tauri_plugin_clipboard_manager::init())
|
.plugin(tauri_plugin_clipboard_manager::init())
|
||||||
.invoke_handler(tauri::generate_handler![])
|
.invoke_handler(tauri::generate_handler![])
|
||||||
|
|||||||
+4
-10
@@ -16,12 +16,6 @@ body {
|
|||||||
--col5: rgb(80, 80, 80);
|
--col5: rgb(80, 80, 80);
|
||||||
--col6: rgb(96, 96, 96);
|
--col6: rgb(96, 96, 96);
|
||||||
--col7: rgb(112, 112, 112);
|
--col7: rgb(112, 112, 112);
|
||||||
--col8: rgb(128, 128, 128);
|
|
||||||
--col9: rgb(144, 144, 144);
|
|
||||||
}
|
|
||||||
|
|
||||||
.container {
|
|
||||||
@apply max-w-none max-h-none bg-(--col1) border border-(--col3) p-4 overflow-auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
@@ -45,7 +39,7 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
@apply bg-(--col3) hover:bg-(--col5) border border-(--col5) hover:border-(--col7) rounded-lg cursor-pointer transition-colors;
|
@apply bg-(--col1) hover:bg-(--col3) border border-(--col3) hover:border-(--col5) rounded-lg cursor-pointer transition-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preset-buttons,
|
.preset-buttons,
|
||||||
@@ -59,7 +53,7 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.char-selection-buttons button.char-selected {
|
.char-selection-buttons button.char-selected {
|
||||||
@apply bg-(--col5) hover:bg-(--col7) border-(--col7) hover:border-(--col9);
|
@apply bg-(--col3) hover:bg-(--col5) border-(--col5) hover:border-(--col7) -translate-y-0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-btn {
|
.generate-btn {
|
||||||
@@ -67,11 +61,11 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.result-section {
|
.result-section {
|
||||||
@apply flex flex-col items-center justify-center mt-2 select-text;
|
@apply flex flex-col items-center justify-center mt-2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.password-display {
|
.password-display {
|
||||||
@apply w-full mb-2 p-2 bg-(--col3) border border-(--col5) rounded-lg wrap-break-word text-sm max-h-36 overflow-y-auto;
|
@apply w-full mb-2 p-2 bg-(--col1) border border-(--col3) rounded-lg wrap-break-word text-sm max-h-36 overflow-y-auto select-text;
|
||||||
}
|
}
|
||||||
|
|
||||||
.result-buttons {
|
.result-buttons {
|
||||||
|
|||||||
+4
-2
@@ -58,7 +58,7 @@ function App () {
|
|||||||
<div className='absolute left-0 top-0 w-full h-10 bg-(--col1) border-b border-b-(--col3)' />
|
<div className='absolute left-0 top-0 w-full h-10 bg-(--col1) border-b border-b-(--col3)' />
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
className={`container w-[calc(100vw-32px)] absolute left-4 ${
|
className={`w-[calc(100vw-32px)] absolute left-4 ${
|
||||||
isAndroid
|
isAndroid
|
||||||
? 'h-[calc(100vh-80px)] top-16 rounded-2xl'
|
? 'h-[calc(100vh-80px)] top-16 rounded-2xl'
|
||||||
: 'h-[calc(100vh-32px)] top-4 rounded-lg'
|
: 'h-[calc(100vh-32px)] top-4 rounded-lg'
|
||||||
@@ -133,7 +133,9 @@ function App () {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='result-section'>
|
<div className='result-section'>
|
||||||
<p className='password-display'>{password}</p>
|
<p className='password-display'>
|
||||||
|
{password.trim().length == 0 ? '(none)' : password}
|
||||||
|
</p>
|
||||||
<div className='result-buttons'>
|
<div className='result-buttons'>
|
||||||
<button
|
<button
|
||||||
className='copy-btn'
|
className='copy-btn'
|
||||||
|
|||||||
Reference in new issue
Block a user