MathNodes / meile-gui

Meile dVPN GUI for Linux, OS X, and Windows - Powered by the Sentinel Network
https://meile.app
GNU General Public License v3.0
35 stars 6 forks source link

[0.35 XMR BOUNTY] Develop the Subscription Plan Dialog Interface #55

Closed MathNodes closed 8 months ago

MathNodes commented 10 months ago

This bounty will be multi-faceted - meaning, we will first develop the skeleton structure of the Subscription Plan Dialog Interface. Once I am satisfied with the basic structure, I will be amending this bounty with more Monero for additional features to be added into this dialog interface. Such as, polling from a remote API for certain information, along with adding different payment options.

This bounty will require that you research the KivyMD Language documentation (https://kivymd.readthedocs.io/en/1.1.1/) for widgets and interface structural design. Not too much research is needed as most of the code is already in a test file.

Getting Started

Edit the slidery_plan.py file in the tests directory in the root of the project.

Develop the slider to have a range of 1-12 months. Set the price to be static at 10500 dvpn. The deposit should change when the slider is moved left to right. For example, at a price of 10500 dvpn and the slider at 2 months, the deposit field should read 21000 dvpn.

The basic design of the subscription plan dialog will look as follows:

SubPlan-Dialog-Interface

Do not worry about the fonts. I just used one that was already selected in my photo editor. Do not worry about what the Subscribe and Cancel buttons do for now. We will get to that later.

All interface components are static for now except the deposit total.

If you have any questions on editing the slidery_plan.py file please post your comments here. There is some code in slidery_plan.py that is excessive and may not be needed for this development. Comment out anything irrelevant.

If accepting the bounty, please make the formal request here so we don't get many people working toward the same goal.

Please check the assets folder in the root of the project for the assets needed for this design.

freQniK commented 10 months ago

You can run slidery_plan.py as it is now and see that most of the components are already in place.

Tkd-Alex commented 10 months ago

HI! Sorry,

Develop the slider to have a range of 1-12 months. Set the price to be static at 10500 dvpn. The deposit should change when the slider is moved left to right. For example, at a price of 10500 dvpn and the slider at 2 months, the deposit field should read 21000 dvpn.

Here we are talking abount dvpn or udvpn? :) I know you written dvpn, in this case we should handle also all the other u-coins and remove the /1000000 from the slider-code

freQniK commented 10 months ago

Actually this time it will be in DVPN. You are getting ahead of yourself a little bit, and that is okay, but what I have planned is that the subscription plan will be priced in DVPN (10500 was approx. $5 the other day, but now is a bit more) and when the user uses the drop down menu for the 5 other IBC coins it will make an API request to convert 10500 DVPN into say .728 ATOM if they selected ATOM and so forth. The price box will reflect the conversion rate.

I was saving this part until the main dialog interface was created, but if you wanted to tackle this API as well, check out the coin_api module for getting current prices. You'll probably need to make two api calls, DVPN price (which will return USD) and drop down coin price and formulate it.

i.e.,

10500*(DVPNUSD)/(ATOMUSD)

Also, you could make an coin_price API call at the loading of the dialog to get $5.00 in DVPN and start from there since crypto prices are ever changing.

If you do the API calls, i'll pad the bounty by 0.2 XMR

Tkd-Alex commented 10 months ago

For the moment I've done this :smile_cat: image

freQniK commented 10 months ago

Changing up the logo, eh? We will be polling in logos of different node hosters to kind of personalize the experience for them

Tkd-Alex commented 10 months ago

Yup, currently the logo is the one take from tests/logo.png. It can be passed as arg of SubscribeContent class

Tkd-Alex commented 10 months ago

Changing up the logo, eh? We will be polling in logos of different node hosters to kind of personalize the experience for them

Wait, the logo will be downloaded and saved locally or will be each time provided by a url?

Tkd-Alex commented 10 months ago

Tell me what do you think :) https://github.com/Tkd-Alex/meile-gui/blob/slidery_months/tests/slidery_months.py

freQniK commented 10 months ago

Looks real good just from looking at the code. Like the API cache option you have. I'll run it this week and if all checks out I will pay the 0.55 XMR bounty.

You da man!

freQniK commented 10 months ago

My apologies for such a late reponse to this. I will check it on Wednesday for sure. Just got tied up with the payment gateway and some metrics on Tuesday.

MathNodes commented 10 months ago

PAID.

Thanks for a good module. Will be amending to this bounty in the future, so stay tuned...

MathNodes commented 8 months ago

@Tkd-Alex Here is the addition I would like accomplished to slidery_months.py

Screenshot_2023-10-30_23-32-29

Add 3 radio buttons as shown with the help-circle material design icon on the right of them. These help icons will display a tooltip when hovered over. The tooltips will show as follows:

This time, when the SUBSCRIBE button is clicked I want the appropriate routine called based on the radio button selection and routines should be named as follows:

Where USD is the current value of the DVPN or IBC deposit based on how many months they are paying for. This USD value will be converted within these routines to the appropriate coin when directed to the wallet pay, btcpay, or Pirate pay. For now you can make these empty functions with a pass statement or preferably a print statement of the routine name to verify it's working correctly.. I will fill in how they will process the payments.

If no radio button is selected and the user presses SUBSCRIBE a little red text label should up appear on the dialog saying to select a payment option.

0.50 XMR BOUNTY

Tkd-Alex commented 8 months ago

See the latest referenced commit please :) I've passed 0 as usd value because we have some issue with get_price api.

image

freQniK commented 8 months ago

Awesome work ser. Will pay bounty this evening after review. Should be on our way to plans shortly.

Tkd-Alex commented 8 months ago

https://github.com/Tkd-Alex/meile-gui/commit/e6e1c618325e87fda0b8216a3eede8d263563921

MathNodes commented 8 months ago

Thank you. Paid and closing for now.