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

[feature] Added option to show user's data usage on status page #735 #738

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Dec 19, 2023

When subscriptions module is used, show user's current plan. If user's current plan is free, then show option to upgrade the plan.

Closes #735
Closes #736

TODOS

  • Add tests
  • Add help text when limit is exhausted.

@pandafy pandafy force-pushed the issues/735-user-usage branch 4 times, most recently from 706fdb3 to 568b9d1 Compare December 28, 2023 16:14
@pandafy pandafy marked this pull request as ready for review December 28, 2023 16:16
@pandafy pandafy force-pushed the issues/735-user-usage branch 3 times, most recently from 78443c1 to 210f5bc Compare January 4, 2024 16:31
@pandafy pandafy force-pushed the issues/735-user-usage branch 2 times, most recently from f199c26 to cb517a0 Compare January 9, 2024 12:05
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Looks good, will do more testing in the coming days.

Comment on lines 790 to 822
{bytes(session.input_octets, {
decimalPlaces: 0,
unitSeparator: " ",
unit: "MB",
})}
{bytes(session.output_octets, {
decimalPlaces: 0,
unitSeparator: " ",
unit: "MB",
})}
</td>
Copy link
Member

Choose a reason for hiding this comment

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

I think there's a bug here, this is the result on a narrow screen:

Screenshot from 2024-01-12 16-27-12

I think session.output_octets must be removed here.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Try the following:

  • log in
  • exhaust traffic
  • log out and click on yes on the remember me question
  • reset the session traffic in the backend to obtain again zero traffic
  • click on log in again

Expected result: no exhausted message is visible.
Actual result: exhausted message is visibile.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

The QA checks are failing, please check, rebase on the latest master and integrate my suggestions for italian translations.

i18n/it.po Outdated
@@ -520,6 +524,26 @@ msgstr "Log out effettuato con successo"
msgid "PASSWORD_EXPIRED"
msgstr "La tua password è scaduta, aggiornala."

#: client/components/status/status.js:384
msgid "SUCCESS_UPGRADE_PLAN"
msgstr "Piano di aggiornamento in corso"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Piano di aggiornamento in corso"
msgstr "Ricarica in corso"

i18n/it.po Outdated

#: client/components/status/status.js:964
msgid "PLAN_UPGRADE_BTN_TXT"
msgstr "Aggiornamento"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Aggiornamento"
msgstr "Ricarica"

i18n/it.po Outdated

#: client/components/status/status.js:1000
msgid "USAGE_LIMIT_EXHAUSTED_TXT"
msgstr "Hai esaurito il traffico disponibile. Esegui l'upgrade per continuare a utilizzare il servizio."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Hai esaurito il traffico disponibile. Esegui l'upgrade per continuare a utilizzare il servizio."
msgstr "Hai esaurito il traffico disponibile. Effettua una ricarica per continuare a utilizzare il servizio."

i18n/it.po Outdated

#: client/components/status/status.js:964
msgid "PLAN_EXHAUSTED_TOAST"
msgstr "Hai esaurito il traffico disponibile sul tuo pacchetto."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
msgstr "Hai esaurito il traffico disponibile sul tuo pacchetto."
msgstr "Hai esaurito il traffico disponibile nel tuo abbonamento."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants