updating web to be compatible with main
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/LazyBachelor/LazyPM/pkg/web/components"
|
||||
)
|
||||
import "github.com/LazyBachelor/LazyPM/pkg/web/components"
|
||||
|
||||
type IndexProps struct {
|
||||
IssueTable components.IssueTableProps
|
||||
@@ -10,11 +8,11 @@ type IndexProps struct {
|
||||
|
||||
templ Index(props IndexProps) {
|
||||
@BaseLayout() {
|
||||
<div class="flex flex-col justify-center items-center gap-6 mb-12">
|
||||
<h1>Create New Issue</h1>
|
||||
<div class="flex flex-col justify-center items-center gap-6 m-5">
|
||||
<h1 class="text-2xl text-primary">Create New Issue</h1>
|
||||
@components.IssueForm(
|
||||
components.IssueFormProps{
|
||||
Action: "/create-issue",
|
||||
Action: "/issues",
|
||||
Class: "mb-4",
|
||||
Title: "",
|
||||
Description: "",
|
||||
@@ -22,7 +20,7 @@ templ Index(props IndexProps) {
|
||||
Priority: 0,
|
||||
IssueType: "task",
|
||||
})
|
||||
@components.IssueTable(props.IssueTable)
|
||||
</div>
|
||||
@components.IssueTable(props.IssueTable)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,7 @@ package routes
|
||||
import "github.com/a-h/templ"
|
||||
import templruntime "github.com/a-h/templ/runtime"
|
||||
|
||||
import (
|
||||
"github.com/LazyBachelor/LazyPM/pkg/web/components"
|
||||
)
|
||||
import "github.com/LazyBachelor/LazyPM/pkg/web/components"
|
||||
|
||||
type IndexProps struct {
|
||||
IssueTable components.IssueTableProps
|
||||
@@ -49,13 +47,13 @@ func Index(props IndexProps) templ.Component {
|
||||
}()
|
||||
}
|
||||
ctx = templ.InitializeContext(ctx)
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"flex flex-col justify-center items-center gap-6 mb-12\"><h1>Create New Issue</h1>")
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"flex flex-col justify-center items-center gap-6 m-5\"><h1 class=\"text-2xl text-primary\">Create New Issue</h1>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = components.IssueForm(
|
||||
components.IssueFormProps{
|
||||
Action: "/create-issue",
|
||||
Action: "/issues",
|
||||
Class: "mb-4",
|
||||
Title: "",
|
||||
Description: "",
|
||||
@@ -66,11 +64,11 @@ func Index(props IndexProps) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</div>")
|
||||
templ_7745c5c3_Err = components.IssueTable(props.IssueTable).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = components.IssueTable(props.IssueTable).Render(ctx, templ_7745c5c3_Buffer)
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "</div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -3,26 +3,29 @@ package routes
|
||||
import "github.com/LazyBachelor/LazyPM/pkg/web/components"
|
||||
|
||||
var baseLayout = components.LayoutProps{
|
||||
Title: "Beads Test Application",
|
||||
Description: "A sample application using Beads storage service",
|
||||
Head: components.HeadProps{
|
||||
Links: []components.Link{
|
||||
{Href: "/assets/css/styles.css", Rel: "stylesheet"},
|
||||
{Href: "/assets/manifest.json", Rel: "manifest"},
|
||||
},
|
||||
Scripts: []components.Script{
|
||||
{Src: "/assets/js/htmx.min.js", Defer: true},
|
||||
{Src: "/assets/js/ajax.min.js", Defer: true},
|
||||
},
|
||||
},
|
||||
Header: components.HeaderProps{
|
||||
},
|
||||
Footer: components.FooterProps{
|
||||
},
|
||||
Title: "Beads Test Application",
|
||||
Description: "A sample application using Beads storage service",
|
||||
Head: components.HeadProps{
|
||||
Links: []components.Link{
|
||||
{Href: "/assets/css/styles.css", Rel: "stylesheet"},
|
||||
{Href: "/assets/manifest.json", Rel: "manifest"},
|
||||
},
|
||||
Scripts: []components.Script{
|
||||
{Src: "/assets/js/htmx.min.js", Defer: true},
|
||||
{Src: "/assets/js/ajax.min.js", Defer: true},
|
||||
},
|
||||
},
|
||||
Header: components.HeaderProps{
|
||||
BrandName: "LazyPM Dashboard",
|
||||
CreateLabel: "+ Create",
|
||||
CreateHref: "",
|
||||
SearchPlaceholder: "Search",
|
||||
},
|
||||
Footer: components.FooterProps{},
|
||||
}
|
||||
|
||||
templ BaseLayout(){
|
||||
@components.Layout(baseLayout){
|
||||
{ children... }
|
||||
}
|
||||
}
|
||||
templ BaseLayout() {
|
||||
@components.Layout(baseLayout) {
|
||||
{ children... }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,12 @@ var baseLayout = components.LayoutProps{
|
||||
{Src: "/assets/js/ajax.min.js", Defer: true},
|
||||
},
|
||||
},
|
||||
Header: components.HeaderProps{},
|
||||
Header: components.HeaderProps{
|
||||
BrandName: "LazyPM Dashboard",
|
||||
CreateLabel: "+ Create",
|
||||
CreateHref: "",
|
||||
SearchPlaceholder: "Search",
|
||||
},
|
||||
Footer: components.FooterProps{},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user