Skip to content

Commit

Permalink
show bottom bar, updates to show translations and plans + checkout pages
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Nov 26, 2023
1 parent bf98f68 commit 168f8d3
Show file tree
Hide file tree
Showing 21 changed files with 1,641 additions and 705 deletions.
15 changes: 15 additions & 0 deletions desktop/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"runtime"
"runtime/debug"
"strconv"
"sync"

"github.com/getlantern/appdir"
"github.com/getlantern/android-lantern/desktop/app"
Expand All @@ -23,6 +24,8 @@ import "C"

var (
log = golog.LoggerFor("lantern-desktop.main")
selectedTab = "account"
selectedTabMu sync.Mutex
proClient *pro.ProClient
settings *app.Settings
)
Expand Down Expand Up @@ -84,6 +87,18 @@ func sendError(err error) *C.char {
return C.CString(string(b))
}

//export SelectedTab
func SelectedTab() *C.char {
return C.CString(selectedTab)
}

//export SetSelectTab
func SetSelectTab(tab string) {
selectedTabMu.Lock()
defer selectedTabMu.Unlock()
selectedTab = tab
}

//export Plans
func Plans() *C.char {
deviceID, userID, token := userHeaders()
Expand Down
195 changes: 103 additions & 92 deletions desktop/pro/pro.pb.go

Large diffs are not rendered by default.

18 changes: 10 additions & 8 deletions desktop/pro/pro.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,16 @@ message Duration {
}

message Plan {
string id = 1;
string description = 2;
Duration duration = 3;
map<string, uint32> price = 4;
map<string, uint32> expectedMonthlyPrice = 5;
uint32 usdPrice = 6;
uint32 usdPrice1Y = 7;
uint32 usdPrice2Y = 8;
string id = 1;
string description = 2;
bool bestValue = 3;
int64 usdPrice = 4;
map<string, int64> price = 5;
string totalCostBilledOneTime = 6;
string oneMonthCost = 7;
string totalCost = 8;
string formattedBonus = 9;
string renewalText = 10;
}

message PlansResponse {
Expand Down
54 changes: 0 additions & 54 deletions lib/app_desktop.dart

This file was deleted.

11 changes: 8 additions & 3 deletions lib/core/router/router.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import 'package:auto_route/auto_route.dart';
import 'package:lantern/common/common.dart';
import 'package:lantern/common/ui/transitions.dart';
import 'package:lantern/core/router/router.gr.dart';



@AutoRouterConfig(
replaceInRouteName: 'Page,Route,Screen',
)
Expand All @@ -12,7 +11,7 @@ class AppRouter extends $AppRouter {
RouteType get defaultRouteType => const RouteType.adaptive();
@override
final List<AutoRoute> routes = [
AutoRoute(path: '/', page: Home.page),
AutoRoute(path: '/', page: Platform.isAndroid ? Home.page : DesktopHome.page),
CustomRoute(
page: FullScreenDialogPage.page,
path: '/fullScreenDialogPage',
Expand Down Expand Up @@ -157,6 +156,12 @@ class AppRouter extends $AppRouter {
transitionsBuilder: defaultTransition,
durationInMilliseconds: defaultTransitionMillis,
reverseDurationInMilliseconds: defaultTransitionMillis),
CustomRoute(
page: PlansDesktop.page,
path: '/plansdesktop',
transitionsBuilder: defaultTransition,
durationInMilliseconds: defaultTransitionMillis,
reverseDurationInMilliseconds: defaultTransitionMillis),
CustomRoute(
page: ReplicaUploadTitle.page,
path: '/replicaUploadTitle',
Expand Down
Loading

0 comments on commit 168f8d3

Please sign in to comment.