Skip to content

Commit

Permalink
Tray and import page fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Levminer committed Nov 26, 2024
1 parent a059456 commit 2c871c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
6 changes: 5 additions & 1 deletion core/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ fn main() {
.build()?;

let tray = app.tray_by_id("main").unwrap();
tray.set_show_menu_on_left_click(false).unwrap();

if cfg!(target_os = "windows") {
tray.set_show_menu_on_left_click(false).unwrap();
}

tray.set_menu(Some(menu)).unwrap();
tray.on_menu_event(move |app, event| match event.id().as_ref() {
"toggle_windows" => {
Expand Down
2 changes: 1 addition & 1 deletion interface/utils/language/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const localeEN = {
},

import: {
supportedTypes: "Supported 2FA types",
supportedTypes: "Import codes",
totpQRCode: "TOTP",
totpQRCodeText: "A TOTP QR code is what you find mostly everywhere, if you want to setup 2FA. Consist of 6 digits which are changing every 30 seconds.",
instructions: "Instructions",
Expand Down
28 changes: 14 additions & 14 deletions interface/windows/import/import.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,8 @@
</button>
</div>
<div class="mt-5 flex w-full">
<Details title={language.import.chooseImportMethod}>
<Details openByDefault={true} title={language.import.chooseImportMethod}>
<div class="space-y-5">
<div class="flex justify-between">
<div>
<h4 class="text-white">{language.import.importFromImage}</h4>
<h5>{language.import.importFromImageText}</h5>
</div>
<div>
<button class="smallButton" on:click={chooseImages}>
<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"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>
{language.import.chooseImageButton}
</button>
</div>
</div>

<div class="flex justify-between">
<div>
<h4 class="text-white">{language.import.enterSecretManually}</h4>
Expand All @@ -54,6 +41,19 @@
</div>
</div>

<div class="flex justify-between">
<div>
<h4 class="text-white">{language.import.importFromImage}</h4>
<h5>{language.import.importFromImageText}</h5>
</div>
<div>
<button class="smallButton" on:click={chooseImages}>
<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"><rect x="3" y="3" width="18" height="18" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></svg>
{language.import.chooseImageButton}
</button>
</div>
</div>

<div class="flex justify-between">
<div>
<h4 class="text-white">{language.import.webcam}</h4>
Expand Down

0 comments on commit 2c871c3

Please sign in to comment.