refactor: pass GestureInfo into brick fragment
This commit is contained in:
@@ -12,8 +12,8 @@ import (
|
||||
)
|
||||
|
||||
type brickState struct {
|
||||
ColorClass template.CSS
|
||||
TemplateType string
|
||||
Gesture rooms.HandGesture
|
||||
}
|
||||
type personData struct {
|
||||
Name string
|
||||
@@ -184,8 +184,8 @@ func (pData personData) BricksForPerson() []brickState {
|
||||
}
|
||||
|
||||
result[gesture] = brickState{
|
||||
ColorClass: gesture.GetGestureInfo().Color,
|
||||
TemplateType: templateType,
|
||||
Gesture: gesture,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,12 +198,6 @@ func roomTemplatesPreview(
|
||||
) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
type SingleBrickData struct {
|
||||
ColorClass template.CSS
|
||||
Name string
|
||||
Gesture rooms.HandGesture
|
||||
}
|
||||
|
||||
testPersonData := personData{
|
||||
Name: "John Doe",
|
||||
IsRaised: true,
|
||||
@@ -263,8 +257,8 @@ func roomTemplatesPreview(
|
||||
}{
|
||||
DefaultColor: "--expand-color",
|
||||
ABrick: brickState{
|
||||
ColorClass: "--expand-color",
|
||||
TemplateType: "raisedBrick",
|
||||
Gesture: rooms.Expand,
|
||||
},
|
||||
Gestures: rooms.GesturesHighToLow[:],
|
||||
TestPerson: testPersonData,
|
||||
|
||||
Reference in New Issue
Block a user