Commit Graph

100 Commits

Author SHA1 Message Date
Nicolas Dorier
9df4429fc2
Remove unreachable code (#2961) 2021-10-15 16:34:40 +09:00
Andrew Camilleri
54539001f1
Allow User to delete own account (#2949)
* Allow User to delete own account

* Add User delete e2e test

* fix test

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>

Co-authored-by: d11n <mail@dennisreimann.de>
2021-10-09 12:18:37 +09:00
d11n
143d5f69c1
Fix CSP for inline handlers in Safari (#2946)
* Fix CSP for inline handlers on LND seed backup page

* Fix CSP for inline handlers on checkout page

* Fix CSP for inline handlers on wallet sign pages

* Fix CSP for inline handlers on invoices list page

* Fix CSP for inline handlers on payouts page

* Fix CSP for inline handlers on confirm API key page

* Fix CSP for inline handlers on store rates page

* Fix CSP for inline handlers on notifications page

* Fix CSP for inline handlers on dynamic DNS page

* Fix CSP for inline handlers on checkout experience page
2021-10-05 15:52:14 +09:00
Dennis Reimann
6048a26511
Fix documentation links
Some links changed with the recent docs restructuring. I've also added recirects for these on the docs side now.
2021-10-01 18:18:54 +02:00
Kukks
7aa4cd8104 Plugins: Pass the current Model to the Ui extension points 2021-09-27 14:16:38 +02:00
Umar Bolatov
3dc663f4d8 Adjust view 2021-09-23 10:11:37 +02:00
Umar Bolatov
b93f3ff445
Remove padding from "Show QR" button 2021-09-18 21:31:23 -07:00
d11n
f96767d3dc
Bootstrap update (#2870)
* Update Bootstrap

* Fix notification checkbox styling
2021-09-13 14:23:10 +09:00
d11n
6666786b7a
Unify Fido2 authentication under two-factor tab (#2866)
* Unify Fido2 authentication under two-factor tab

Closes #2754.

* Improve UI and wording

* Improve register FIDO2 device page
2021-09-13 10:16:52 +09:00
d11n
06db29dd43
Delete confirmation modals (#2614)
* Refactor confirm view: separate modal

* Add delete confirmation modals for apps and FIDO2

* Add delete confirmation modals for 2FA actions

* Add delete confirmation modals for api keys and webhooks

* Add delete confirmation modals for stores and store users

* Add delete confirmation modals for LND seed and SSH

* Add delete confirmation modals for rate rule scripting

* Test fixes and improvements

* Add delete confirmation modals for dynamic DNS

* Add delete confirmation modals for store access tokens

* Add confirmation modals for pull payment archiving

* Refactor confirm modal code

* Add confirmation input, update wording

* Update modal styles

* Upgrade ChromeDriver

* Simplify and unify confirmation input

* Test fixes

* Fix wording

* Add modals for wallet replace and removal
2021-09-07 11:55:53 +09:00
Dennis Reimann
ad8f347989 Refactoring: Allow ViewsRazor extension to be used by plugins
Moves the `ViewsRazor` extension into Abstractions, so that it can be used by plugins.

Separated out of #2701, prerequisite for the LNbank plugin integration.
2021-07-30 08:27:33 +02:00
Dennis Reimann
0054fe0886 Refactor copy to clipboard
Separated out of #2701, prerequisite for the LNbank plugin integration.
2021-07-28 08:44:32 +02:00
Kukks
fdae221ca5 Allow QR code multiple display modes 2021-07-27 15:31:12 +02:00
Wouter Samaey
f1a222fbb3
New unit test to scan for external links/forms and if they have rel="noreferrer noopener" (#2668)
* Unit test to check for (possibly) external links

* Add rel="noreferrer noopener" to all external links so unit test passes

* Update BTCPayServer.Tests/UnitTest1.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer.Tests/UnitTest1.cs

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fixed bad merge from master

* PascalCasing

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2021-07-06 10:35:42 +02:00
Wouter Samaey
33de4cccfc
Add permission key to API page (#2599)
* Better API key page

Now we can see the permission code + Fixed a margin-bottom when selecting a specific store

* Improve responsiveness of API key permissions

* Improve webhook editing UX

Jumps to edited item after submit

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-06-30 16:57:38 +09:00
d11n
64a7abe53a
Bootstrap migration fixups (#2534)
* Remove xxl breakpoint

* Remove code bg

* Form updates

* Update PoS accordion

* Update forms

* Fix webhook password toggle

* Update highlight js styles

* Page updates

* Style unformatted checkboxes

* Fix typo

* Update accordions

* Update policies domain mapping

* Update toggles and checkboxes

* Update storage pages

* Fix specter logo filename casing

* Update checkout experience view

* Update webhook view

* Re-add used negative margins

* Update bootstrap

* POS layout fixes

* Decrease size of info icon in main headline

* Update BTCPayServer/Views/Stores/ModifyWebhook.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-06-06 20:44:54 +09:00
Kukks
cbec44bb73 Fix QR Code shower 2021-05-30 10:38:21 +02:00
d11n
ed7031981b
Bootstrap v5 migration (#2490)
* Swap bootstrap asset files

* Update themes and color definitions

* Move general bootstrap customizations

* Theme updates

Theme updates

* Remove BuildBundlerMinifier

This lead to an error, because BuildBundlerMinifier and BundlerMinifier.Core seem to conflict here. Details: https://stackoverflow.com/a/61119586

* Rewplace btn-block class with w-100

* Update badge classes

* Remove old font family head variable

* Update margin classes

* Cleanups

* Update float classes

* Update text classes

* Update padding classes

* Update border classes

* UPdate dropdown classes

* Update select classes

* Update neutral custom props

* Update bootstrap and customizations

* Update ChromeDriver; disable smooth scroll

https://github.com/SeleniumHQ/selenium/issues/8295

* Improve alert messages

* Improve bootstrap customizations

* Disable reduced motion

See also 7358282f

* Update Bootstrap data attributes

* Update file inputs

* Update input groups

* Replace deprecated jumbotron class

* Update variables; re-add negative margin util classes

* Update cards

* Update form labels

* Debug alerts

* Fix aria-labelledby associations

* Dropdown-related test fixes

* Fix CanUseWebhooks test

* Test fixes

* Nav updates

* Fix nav usage in wallet send and payouts

* Update alert and modal close buttons

* Re-add backdrop properties

* Upgrade Bootstrap to v5 final

* Update screen reader classes

* Update font-weight classes

* Update monospace font classes

* Update accordians

* Update close icon usage

* Cleanup

* Update scripts and style integrations

* Update input group texts

* Update LN node setup page

* Update more form control classes

* Update inline forms

* Add js specific test

* Upgrade Vue.js

* Remove unused JS

* Upgrade Bootstrap to v5.0.1

* Try container related test updates

* Separate jQuery bundle

* Remove jQuery from LND seed backup page

* Remove unused code

* Refactor email autofill js

* Refactor camera scanner JS

* Re-add tests

* Re-add BuildBundlerMinifier

* Do not minify bundles containing Bootstrap

Details https://github.com/madskristensen/BundlerMinifier/issues/558

* Update bundles

* Cleanup JS test

* Cleanup tests involving dropdowns

* Cleanup tests involving collapses

* Cleanup locale additions in ConfigureCore

* Cleanup bundles

* Remove duplicate status message

* Cleanup formatting

* Fix missing validation scripts

* Remove unused unminified Bootstrap js files

* Fix classic theme

* Fix Casa theme

* Fix PoS validation
2021-05-19 11:39:27 +09:00
Andrew Camilleri
5fe3c1c61f
U2fremove (#2496)
* Remove U2F support and JS

* fix final changes

* fix more final stuff
2021-04-28 16:22:09 +09:00
Kukks
c878f63f99 Fix: Double entry for Api Key nav item in Account navigation menu 2021-04-27 14:06:34 +02:00
Umar Bolatov
08e8050ca5
Add button to copy API key to clipboard (#2439)
* Add button to copy API key to clipboard

* Update "copy API key to clipboard" button appearance
2021-04-27 11:30:26 +09:00
d11n
452915478b
UI: Fix duplicate status messages (#2481)
The status message is included in the NavLayout, hence the pages that use this layout should not include the status message.

Fixes #2478.
2021-04-20 16:16:21 +09:00
Andrew Camilleri
0554565b30
FIDO2/WebAuthN Support (#2356)
* FIDO2/WebAuthN Support

This adds initial support for WebAuthN/FIDO2 as another MFA mode. U2F is still intact and runs alongside it for now. Once this is merged, I will start work on migrating U2F support to happen over the FIDO2 protocol instead.

* Refactor and future proof system (prep work of seamless u2f migration)

* attempt js fix for mobile devices

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>

* fix fido name saving

* do not spam logs and hide loader when failed

* PR Changes

* Apply suggestions from code review

Co-authored-by: d11n <mail@dennisreimann.de>

* attempt fido2 bump

* add name if not named for credentials

Co-authored-by: d11n <mail@dennisreimann.de>
2021-04-20 14:06:32 +09:00
d11n
15201a927e
UI fixes (#2463)
* Fix formatting in bootstrap.css

This looks like it got introduced when resolving a merge conflict.

* Fix typos in views

* Fix semibold style definition
2021-04-16 15:02:40 +09:00
d11n
b12c4c5fa0
Improve and unify page headers (#2412)
* Improve and unify page headers

* Altcoin test fixes

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Update BTCPayServer/Views/Apps/UpdateCrowdfund.cshtml

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Fix missing store name in pairing view

* Fix CanUsePairing test

* Bump header navigation font size

* Use partial tag instead of Html.PartialAsync in views

As suggested by @nicolasdorier. These are equivalent, see details [here](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/partial?view=aspnetcore-3.1#partial-tag-helper).

* Fix docs link

As in #2432.

* Update BTCPayServer/Views/Wallets/SignWithSeed.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletSendVault.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

* Update BTCPayServer/Views/Wallets/WalletTransactions.cshtml

Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
2021-04-08 22:32:42 +09:00
Dennis Reimann
73730355b8
Add active indicator for main navigation 2021-03-30 11:38:02 +02:00
nicolas.dorier
2e864c32fa
Profile email change should check email's availability 2021-02-12 12:48:05 +09:00
Andrew Camilleri
64a68b95b0
Add API Key QR scan + click to reveal api key in List view (#2174) 2021-01-07 17:56:35 +09:00
Dennis Reimann
a7b178b844
API Keys: Add usage examples link to docs (#2140) 2020-12-15 14:35:18 +09:00
nicolas.dorier
262ba6ee1e
Add links to API documentation for better discovery 2020-12-11 22:48:53 +09:00
Nicolas Dorier
1d00ee41c4
Merge pull request #2086 from dennisreimann/u2f-update
U2F: Update lib and improve error display
2020-12-09 17:33:22 +09:00
nicolas.dorier
13f10657b8
Fix bug: When creating API Key for non-admin, some checked permissions were not included (Fix #2107 and Fix #2002) 2020-12-08 15:20:59 +09:00
Dennis Reimann
445606e2b1
Wait for content to be loaded before U2F actions 2020-12-01 14:31:42 +01:00
Dennis Reimann
ad05f479a8
U2F: Update lib and improve error display
The [previously used U2F library](https://github.com/fido-alliance/google-u2f-ref-code/) has been deprecated. The new one does not override the browsers `window.u2f` functionality if it is natively supported. It also displays the appropriate errors and falls back nicely in case the browser does not support U2F.
2020-11-30 12:43:15 +01:00
Kukks
179520a211 Plugins: Allow creation of independent DbContexts
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
2020-11-18 12:27:26 +01:00
Andrew Camilleri
5979fe5eef
BTCPay Extensions Part 2 (#2001)
* BTCPay Extensions Part 2

This PR cleans up the extension system a bit in that:
 * It renames the test extension to a more uniform name
 * Allows yo uto have system extensions, which are extensions but bundled by default with the release (and cannot be removed)
 * Adds a tool to help you generate an extension package from a csproj
 * Refactors the UI extension points to a view component
 * Moves some more interfaces to the Abstractions csproj

* Rename to plugins
2020-10-21 14:02:20 +02:00
Andrew Camilleri
4d0b402e8b
Allow disabling notifications per user and disabling specific notifications per user (#1991)
* Allow disabling notifications per user and disabling specific notifications per use

closes #1974

* Add disable notifs for all users

* fix term generator for notifications

* sow checkboxes instead of multiselect when js is enabled

* remove js dependency

* fix notif conditions
2020-10-20 13:09:09 +02:00
Dennis Reimann
dd27ad79bd
API Keys UI: Properly align form items 2020-10-16 22:31:09 +02:00
Nicolas Dorier
62f00fa970
Merge pull request #1886 from Kukks/invite-link
Allow admins to invite new users
2020-09-19 11:15:38 +09:00
Dennis Reimann
7e60328cff
Greenfield: Rename API key redirect params; switch to POST body (#1898)
* Rename user param to userId in API key redirect

This way it is clearer what to expect and it also make the parameteer easier to consume.

* Post redirect: Allow form url and prettify page

- Form URL as alternative to controller/action for external URLs
- Making it look nice and add explanation for non-JS case

* APIKeys: Minor view updates

fix

* APIKeys: Use POST redirect for confirmation

fix

* UI: Minor update to confirm view

Tidies it up and adapts to the newly added ConfirmAPIKeys view.

* APIKeys: Update delete view

Structures the information in title and description better.

* APIKeys: Distinguish authorize and confirm (reuse)

* Upgrade ChromeDriver

* Test fixes

* Clean up PostRedirect view

By adding missing forgery token

* Re-add tests for callback post values

* Rename key param to apiKey in API key redirect

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.authorization.json

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Use DEBUG conditional for postredirect-callback-test route

* Remove unnecessary ChromeDriver references

* Add debug flag

* Remove debug flags

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-09-17 11:37:49 +02:00
Kukks
371b33a2e1 Allow admins to invite new users
* This refactors the email sending so that all the logic related to users and emails are now contained in one location.
* The Reset password screen has been updated from its ugly plain self to use the same layout as the login.
* An admin can now create a new account without specifying a password. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email
* An admin can now create accounts that still require the user to verify their if the setting is enabled from the server settings. A link is generated that can be given to the intended user to configure the password. If emails are configured, it also sends an email.
* The above features can be used in conjunction: An email will have to verify their email through a link. Once verified, the user is redirected to setting the password.
* When an email has been verified OR a password has been set, users are now redirected to the login page with the email filled in and a success status message shown instead of a dedicated thank you page.
2020-09-16 08:54:24 +02:00
Kukks
7ca74aeea7 Add API Keys Application identifier
This lets the authorize api key screen redirect to the defined url  and provide it with the user id, permissions granted and the key.

This also allows apps to match existing api keys generated for it specifically using the application identifier, and if matched, presented with a confirmation page before redirection.
2020-08-28 09:00:13 +02:00
Dennis Reimann
391d7b01d1
UI: Minor enhancements to 2FA view
Improve hover highlight for light and dark theme. APply a bit more spacing to the 2FA link cells.

Also fixes table row highlight in light theme.
2020-07-14 13:29:26 +02:00
Kukks
006ebf3f15 Fix 2FA config screens 2020-07-13 10:58:53 +02:00
Nicolas Dorier
04f71155b0
Merge pull request #1721 from dennisreimann/ui-updates-account
UI updates: Account section
2020-07-13 17:39:35 +09:00
Dennis Reimann
0e410af63f
Fix spacing for subnavs on mobile 2020-07-09 17:20:08 +02:00
Dennis Reimann
7a46b2fd1b
Improve user profile view 2020-07-08 19:20:32 +02:00
Dennis Reimann
bfd25b8a14
Improve API keys list view 2020-07-08 19:20:24 +02:00
Dennis Reimann
dae8163846
Improve change password view 2020-07-08 19:20:11 +02:00
Dennis Reimann
4db6c16068
Improve U2F view 2020-07-08 19:19:55 +02:00