Skip to content

Commit 5b403f0

Browse files
authored
Merge pull request #79 from admin-golang/infinity-list-improvements
{examples, templates, admin}: icon related improvements for infinity scrolling
2 parents 2c4b57c + 90bb31e commit 5b403f0

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

admin.go

+4
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,8 @@ func (ad *admin) ServeHTTP(w http.ResponseWriter, r *http.Request) {
667667
SellIcon icon.IconType
668668
InventoryIcon icon.IconType
669669
DashboardIcon icon.IconType
670+
LockIcon icon.IconType
671+
EmailIcon icon.IconType
670672
}{
671673
Layout: ad.layout,
672674
Pages: ad.pages,
@@ -687,6 +689,8 @@ func (ad *admin) ServeHTTP(w http.ResponseWriter, r *http.Request) {
687689
SellIcon: icon.Sell,
688690
InventoryIcon: icon.Inventory,
689691
DashboardIcon: icon.Dashboard,
692+
LockIcon: icon.Lock,
693+
EmailIcon: icon.Email,
690694
}
691695

692696
if err := jsxTemplate.Execute(&jsxWriter, jsxData); err != nil {

templates/materialUI.tsx

+1-8
Original file line numberDiff line numberDiff line change
@@ -1910,14 +1910,7 @@ function [[ .ID ]]InfinityList({ handleSetAppState }) {
19101910
}}
19111911
>
19121912
[[ if gt .Icon.Type -1 ]]
1913-
<Avatar sx={{ m: 1, bgcolor: 'secondary.main' }}>
1914-
[[ if eq .Icon.Type 7 ]]
1915-
<LockOutlinedIcon />
1916-
[[ end ]]
1917-
[[ if eq .Icon.Type 8 ]]
1918-
<EmailIcon />
1919-
[[ end ]]
1920-
</Avatar>
1913+
<Avatar sx={{ m: 1, bgcolor: 'secondary.main' }}></Avatar>
19211914
[[ end ]]
19221915
<Typography component="h1" variant="h5">
19231916
[[ .Form.Title ]]

0 commit comments

Comments
 (0)