Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: manage extensions navbar #2121

Merged
merged 8 commits into from Nov 27, 2023
Merged

feat: manage extensions navbar #2121

merged 8 commits into from Nov 27, 2023

Conversation

dni
Copy link
Member

@dni dni commented Nov 24, 2023

screenshot-1700858476
screenshot-1700858471

create Manage spacer in sidebar and add manage extensions to it

create now `Manage` spacer in sidebar. and add manage extensions to it

closes #2088
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3b0024b) 60.38% compared to head (6c464c2) 60.38%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #2121   +/-   ##
=======================================
  Coverage   60.38%   60.38%           
=======================================
  Files          56       56           
  Lines        8437     8437           
=======================================
  Hits         5095     5095           
  Misses       3342     3342           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@prusnak prusnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. the PR needs a make bundle commit

  2. This change does not work correctly if admin UI is disabled (LNBITS_ADMIN_UI=false)
    Since there is no management section, there is also no manage extensions button.
    We should change the logic so that management section (and manage extensions button) is always shown, regardless of whether LNBITS_ADMIN_UI is set to true or false.

Screenshot 2023-11-24 at 23 17 21

before the change it looks like this:

Screenshot 2023-11-24 at 23 18 27

@dni
Copy link
Member Author

dni commented Nov 24, 2023

i actually did that it was visible for non admins? maybe you used the bundle?
if you look at my screenshot above

@dni
Copy link
Member Author

dni commented Nov 24, 2023

bundled

@dni dni requested a review from prusnak November 25, 2023 08:59
@prusnak
Copy link
Collaborator

prusnak commented Nov 25, 2023

  1. I pushed the make bundle commit which was missing
  2. I still do not see the extension menu.

Steps to reproduce (2):

  1. copy .env.example to .env
  2. start LNbits - create new user - copy usr id
  3. add usr id from previous step to LNBITS_ADMIN_USERS in .env
  4. restart LNbits
  5. observe there is no manage extension menu

@prusnak
Copy link
Collaborator

prusnak commented Nov 26, 2023

I found the culprit:

<lnbits-admin-ui
v-if="'{{LNBITS_ADMIN_UI}}' == 'True'"
:show-node="'{{LNBITS_NODE_UI}}' == 'True'"
></lnbits-admin-ui>

The lnbits-admin-ui component is shown only when LNBITS_ADMIN_UI is set to True. Since you moved the "Manage Extensions" button from lnbits-extension-list into lnbits-admin-ui, it is now not shown when LNBITS_ADMIN_UI is set to False.

@prusnak
Copy link
Collaborator

prusnak commented Nov 26, 2023

I found the culprit:

Fixed the issue in 9084c8f followed by another commit which just does make bundle.

@prusnak prusnak added this to the 0.11.2 milestone Nov 26, 2023
@prusnak
Copy link
Collaborator

prusnak commented Nov 26, 2023

I discovered duplicit strings in localization related to the manage change, I also added Korean translation from #2119 which I fixed to use the new manage strings too.

@prusnak prusnak added frontend User-facing changes javascript Pull requests that update Javascript code labels Nov 26, 2023
Copy link
Collaborator

@motorina0 motorina0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@dni dni merged commit 9c85e11 into dev Nov 27, 2023
23 checks passed
@dni dni deleted the manage-extensions branch November 27, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend User-facing changes javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants