refactor: start grouping brick attributes info
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package rooms
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
"log"
|
||||
"maps"
|
||||
"slices"
|
||||
@@ -242,3 +243,42 @@ func GestureFromInt(num int) (HandGesture, bool) {
|
||||
func (g HandGesture) String() string {
|
||||
return [...]string{"Change Topic", "Probing Quesion", "Expand", "Clarifying Quesion", "Meta"}[g]
|
||||
}
|
||||
|
||||
type GestureInfo struct {
|
||||
Name string
|
||||
Color, BgColor template.CSS
|
||||
IconUrl template.URL
|
||||
}
|
||||
|
||||
func (g HandGesture) GetGestureInfo() GestureInfo {
|
||||
result := GestureInfo{}
|
||||
switch g {
|
||||
case ChangeTopic:
|
||||
result = GestureInfo{
|
||||
Color: "--change-topic-color",
|
||||
BgColor: "--change-topic-dark",
|
||||
}
|
||||
case ProbingQ:
|
||||
result = GestureInfo{
|
||||
Color: "--probing-q-color",
|
||||
BgColor: "--probing-q-dark",
|
||||
}
|
||||
case Expand:
|
||||
result = GestureInfo{
|
||||
Color: "--expand-color",
|
||||
BgColor: "--expand-dark",
|
||||
}
|
||||
case ClarifyingQ:
|
||||
result = GestureInfo{
|
||||
Color: "--clarifying-q-color",
|
||||
BgColor: "--clarifying-q-dark",
|
||||
}
|
||||
case Meta:
|
||||
result = GestureInfo{
|
||||
Color: "--meta-color",
|
||||
BgColor: "--meta-dark",
|
||||
}
|
||||
}
|
||||
result.Name = g.String()
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user