Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat UI reborn #506

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion media/filechooser.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ func mediaLibraryContent(mb *Builder, field string, ctx *web.EventContext,
),
h.If(mb.uploadIsAllowed(ctx.R) == nil,
h.Div(
VBtn(msgr.UploadFile).PrependIcon("mdi-upload").Color(ColorSecondary).
VBtn(msgr.UploadFile).PrependIcon("mdi-upload").Color(ColorPrimary).
Attr("@click", "$refs.uploadInput.click()"),
h.Input("").
Attr("ref", "uploadInput").
Expand Down
2 changes: 1 addition & 1 deletion presets/detailing.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ func (b *DetailingBuilder) actionForm(action *ActionBuilder, ctx *web.EventConte
VCardActions(
VSpacer(),
VBtn(msgr.Update).
Theme("dark").
Theme("light").
Color(ColorPrimary).
Attr("@click", web.Plaid().
EventFunc(actions.DoAction).
Expand Down
1 change: 1 addition & 0 deletions presets/editing.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ func (b *EditingBuilder) editFormFor(obj interface{}, ctx *web.EventContext) h.H
}
updateBtn := VBtn(buttonLabel).
Color("primary").
Variant(VariantFlat).
Attr("@click", web.Plaid().
EventFunc(actions.Update).
Queries(queries).
Expand Down
16 changes: 9 additions & 7 deletions presets/listing_compo.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,20 @@ func (c *ListingCompo) MarshalHTML(ctx context.Context) (r []byte, err error) {
h.Tag("Teleport").Attr("to", "#"+c.ActionsComponentTeleportToID()).Children(
c.actionsComponent(ctx),
),
h.Div(VCard().Elevation(0).Children(
h.Div(
VCard().Elevation(0).Children(
h.Tag("div").Children(
c.tabsFilter(ctx),
).Class("px-2"),
c.toolbarSearch(ctx),
VCardText().Class("pt-2 px-2").Children(
).Class("px-6 mb-4"),
h.Div(
c.toolbarSearch(ctx),
).Class(("px-4")),
VCardText().Class("px-6 pt-2").Children(
c.dataTable(ctx),
),
h.Div(
c.cardActionsFooter(ctx),
).Class(("px-4 pb-2")),
)).Class("listing-compo-wrap"),
).Class("listing-compo-wrap"),
).MarshalHTML(ctx)
}

Expand Down Expand Up @@ -811,7 +813,7 @@ func (c *ListingCompo) actionsComponent(ctx context.Context) (r h.HTMLComponent)
onClick.Query(ParamParentID, c.ParentID)
}
return VBtn(msgr.New).
Color(ColorSecondary).
Color(ColorPrimary).
Variant(VariantElevated).
Theme("light").Class("ml-2").
Attr("@click", onClick.Go())
Expand Down
4 changes: 2 additions & 2 deletions publish/version_compo.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ func configureVersionListDialog(db *gorm.DB, pb *Builder, b *presets.Builder, pm
compo := presets.ListingCompoFromEventContext(ctx)
selected := MustFilterQuery(compo).Get(filterKeySelected)

return v.VBtn(utilsMsgr.OK).Disabled(selected == "").Variant(v.VariantTonal).Size(v.SizeSmall).
Class("text-none text-caption font-weight-regular bg-secondary text-on-secondary").Attr("@click",
return v.VBtn(utilsMsgr.OK).Disabled(selected == "").Variant(v.VariantFlat).Size(v.SizeSmall).Color(v.ColorPrimary).
Class("text-none text-caption font-weight-regular").Attr("@click",
fmt.Sprintf(`%s;%s;`,
presets.CloseListingDialogVarScript,
web.Emit(NotifVersionSelected(mb), PayloadVersionSelected{Slug: selected}),
Expand Down
Loading