Skip to content

Commit

Permalink
readd all emojies
Browse files Browse the repository at this point in the history
  • Loading branch information
fbuetler committed Mar 29, 2024
1 parent 1f4d1ba commit aca4de9
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions pkg/controller/DiscordController.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
var online string
var loggedIn string
if len(user.Sessions) > 0 && !user.Sessions[0].EndDate.Valid {
online = "(y)"
online = ""
} else {
online = "(x)"
online = ""
}

loginVlan, err := dc.db.CheckUserSignedInNoTx(user.Mac)
Expand All @@ -88,9 +88,9 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
return nil, err
}
if loginVlan > 0 {
loggedIn = "(y)"
loggedIn = ""
} else {
loggedIn = "(x)"
loggedIn = ""
}

if user.Hostname == "" {
Expand Down Expand Up @@ -269,6 +269,9 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
Label: "Logout",
Style: discordgo.DangerButton,
Disabled: !buttonsEnabled,
Emoji: discordgo.ComponentEmoji{
Name: "✖️",
},
CustomID: "findLogoutBtn",
})
if !vlansMissing {
Expand All @@ -277,6 +280,9 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
Label: "Change VLAN",
Style: discordgo.PrimaryButton,
Disabled: !buttonsEnabled,
Emoji: discordgo.ComponentEmoji{
Name: "🔧",
},
CustomID: "findChangeBtn",
})
}
Expand All @@ -287,6 +293,9 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
Label: "Login",
Style: discordgo.SuccessButton,
Disabled: !buttonsEnabled,
Emoji: discordgo.ComponentEmoji{
Name: "✔️",
},
CustomID: "findLoginBtn",
})
}
Expand All @@ -298,6 +307,9 @@ func (dc *DiscordController) GetDiscordUserCard(searchString string, buttonsEnab
Label: "Cancel",
Style: discordgo.SecondaryButton,
Disabled: !buttonsEnabled,
Emoji: discordgo.ComponentEmoji{
Name: "✖️",
},
CustomID: "findCancelBtn",
})
card.Components = append(card.Components, discordgo.ActionsRow{
Expand Down

0 comments on commit aca4de9

Please sign in to comment.