Skip to content

Commit

Permalink
Move clones to own category
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikKalkoken committed Jan 24, 2025
1 parent 14ae3d6 commit c7a5716
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 43 deletions.
27 changes: 12 additions & 15 deletions internal/app/ui/desktop/desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ type DesktopUI struct {
statusBarArea *statusBarArea
toolbarArea *toolbarArea

assetTab *container.TabItem
overviewTab *container.TabItem
tabs *container.AppTabs
walletTab *container.TabItem

menuItemsWithShortcut []*fyne.MenuItem
accountWindow fyne.Window
Expand Down Expand Up @@ -113,15 +111,7 @@ func NewDesktopUI(fyneApp fyne.App) *DesktopUI {
return title
}

characterTab := container.NewTabItemWithIcon("Character",
theme.AccountIcon(), container.NewAppTabs(
container.NewTabItem("Augmentations", u.ImplantsArea.Content),
container.NewTabItem("Jump Clones", u.JumpClonesArea.Content),
container.NewTabItem("Attributes", u.AttributesArea.Content),
container.NewTabItem("Biography", u.BiographyArea.Content),
))

u.assetTab = container.NewTabItemWithIcon("Assets",
assetTab := container.NewTabItemWithIcon("Assets",
theme.NewThemedResource(ui.IconInventory2Svg), container.NewAppTabs(
container.NewTabItem("Assets", u.AssetsArea.Content),
))
Expand All @@ -145,6 +135,12 @@ func NewDesktopUI(fyneApp fyne.App) *DesktopUI {
u.tabs.Refresh()
}

clonesTab := container.NewTabItemWithIcon("Clones",
theme.NewThemedResource(ui.IconHeadSnowflakeSvg), container.NewAppTabs(
container.NewTabItem("Augmentations", u.ImplantsArea.Content),
container.NewTabItem("Jump Clones", u.JumpClonesArea.Content),
))

contractTab := container.NewTabItemWithIcon("Contracts",
theme.NewThemedResource(ui.IconFileSignSvg), container.NewAppTabs(
container.NewTabItem("Contracts", u.ContractsArea.Content),
Expand All @@ -165,26 +161,27 @@ func NewDesktopUI(fyneApp fyne.App) *DesktopUI {
container.NewTabItem("Training Queue", u.SkillqueueArea.Content),
container.NewTabItem("Skill Catalogue", u.SkillCatalogueArea.Content),
container.NewTabItem("Ships", u.ShipsArea.Content),
container.NewTabItem("Augmentations", u.ImplantsArea.Content),
))
u.SkillqueueArea.OnStatusRefresh = func(status string) {
skillTab.Text = fmt.Sprintf("Skills (%s)", status)
u.tabs.Refresh()
}

u.walletTab = container.NewTabItemWithIcon("Wallet",
walletTab := container.NewTabItemWithIcon("Wallet",
theme.NewThemedResource(ui.IconAttachmoneySvg), container.NewAppTabs(
container.NewTabItem("Transactions", u.WalletJournalArea.Content),
container.NewTabItem("Market Transactions", u.WalletTransactionArea.Content),
))

u.tabs = container.NewAppTabs(
characterTab,
u.assetTab,
assetTab,
clonesTab,
contractTab,
mailTab,
planetTab,
skillTab,
u.walletTab,
walletTab,
u.overviewTab,
)
u.tabs.SetTabLocation(container.TabLocationLeading)
Expand Down
5 changes: 5 additions & 0 deletions internal/app/ui/icon.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 14 additions & 28 deletions internal/app/ui/mobile/mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,34 +133,6 @@ func NewMobileUI(fyneApp fyne.App) *MobileUI {
},
)
characterList := NewNavList(
NewNavListItemWithIcon(
theme.AccountIcon(),
"Character Sheet",
func() {
characterNav.Push(
newCharacterAppBar(
"Character Sheet",
NewNavListWithTitle("Character Sheet",
NewNavListItemWithNavigator(
characterNav,
newCharacterAppBar("Augmentations", u.ImplantsArea.Content),
),
NewNavListItemWithNavigator(
characterNav,
newCharacterAppBar("Jump Clones", container.NewScroll(u.JumpClonesArea.Content)),
),
NewNavListItemWithNavigator(
characterNav,
newCharacterAppBar("Attributes", u.AttributesArea.Content),
),
NewNavListItemWithNavigator(
characterNav,
newCharacterAppBar("Bio", container.NewScroll(u.BiographyArea.Content)),
),
),
))
},
),
NewNavListItemWithIcon(
theme.NewThemedResource(ui.IconInventory2Svg),
"Assets",
Expand All @@ -174,6 +146,20 @@ func NewMobileUI(fyneApp fyne.App) *MobileUI {
navListColonies,
navListMail,
navListCommunications,
NewNavListItemWithIcon(
theme.NewThemedResource(ui.IconHeadSnowflakeSvg),
"Clones",
func() {
characterNav.Push(
newCharacterAppBar(
"Clones",
container.NewAppTabs(
container.NewTabItem("Augmentations", u.ImplantsArea.Content),
container.NewTabItem("Jump Clones", u.JumpClonesArea.Content),
),
))
},
),
NewNavListItemWithIcon(
theme.NewThemedResource(ui.IconFileSignSvg),
"Contracts",
Expand Down
1 change: 1 addition & 0 deletions resources/ui/head-snowflake.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c7a5716

Please sign in to comment.