Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Aug 24, 2023
1 parent 36ae1a3 commit 527de3a
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/generated/intl/messages_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,8 @@ class MessageLookup extends MessageLookupByLibrary {
"offerToSave":
MessageLookupByLibrary.simpleMessage("Offer to save passwords"),
"openError": MessageLookupByLibrary.simpleMessage("Error"),
"openInBrowser":
MessageLookupByLibrary.simpleMessage("Open in browser"),
"openLogConsole":
MessageLookupByLibrary.simpleMessage("Open log console"),
"openSettings": MessageLookupByLibrary.simpleMessage("Open settings"),
Expand Down
10 changes: 10 additions & 0 deletions lib/generated/l10n.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -376,5 +376,6 @@
"verificationRequest": "Please verify your email address. When you registered we sent you a verification link to {email}. Please now follow the instructions in that email. If you can't find it, you can request that we send a new one.",
"resendVerification": "Resend the verification link",
"signInAgainWhenVerified": "When your email address is successfully verified you can click the button below to continue your sign-in.",
"expiredWhileSignedIn": "Your subscription has just expired. Please click \"Sign out\" from the main menu below, then sign-in and follow the instructions. Your data is still available at the moment so don't panic."
"expiredWhileSignedIn": "Your subscription has just expired. Please click \"Sign out\" from the main menu below, then sign-in and follow the instructions. Your data is still available at the moment so don't panic.",
"openInBrowser": "Open in browser"
}
1 change: 1 addition & 0 deletions lib/widgets/entry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -809,4 +809,5 @@ enum EntryAction {
rename,
protect,
delete,
openInBrowser,
}
15 changes: 15 additions & 0 deletions lib/widgets/entry_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ class _EntryTextFieldState extends _EntryFieldState implements FieldDelegate {
case EntryAction.changeIcon:
widget.onChangeIcon();
break;
case EntryAction.openInBrowser:
if (widget.field.textValue.isNotEmpty) {
await DialogUtils.openUrl(widget.field.textValue);
}
break;
}
}

Expand All @@ -350,6 +355,16 @@ class _EntryTextFieldState extends _EntryFieldState implements FieldDelegate {
));
}

if (widget.field.name == KdbxKeyCommon.KEY_URL) {
mutableMenuItems.add(PopupMenuItem(
value: EntryAction.openInBrowser,
child: ListTile(
leading: const Icon(Icons.open_in_new),
title: Text(str.openInBrowser),
),
));
}

if (widget.field.protectionChangeable) {
mutableMenuItems.add(PopupMenuItem(
value: EntryAction.protect,
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/vault.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class _VaultWidgetState extends State<VaultWidget> with WidgetsBindingObserver {
);
} else if (state is VaultLoaded) {
if (autofillState is AutofillSaving) {
return AutofillSaveWidget();
return AutofillSaveWidget(); //TODO: How/why is this hidden underneath the Backdrop widget? even though the backdrop widget has been removed, the result of the opencontainer call has not and still appears on top. leading to much confusion and a wtf bug.
} else {
return Backdrop(
frontLayer: EntryListWidget(),
Expand Down

0 comments on commit 527de3a

Please sign in to comment.