8000 UI enhancements by moalamri · Pull Request #1 · parkuman/pocketcms · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

UI enhancements #1

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

Merged
merged 11 commits into from
Jun 3, 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
11 changes: 6 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package main

import (
"log"
"net/http"
"strings"

"github.com/fatih/color"
"github.com/labstack/echo/v5"
"github.com/labstack/echo/v5/middleware"
"github.com/parkuman/pocketcms/ui"
"github.com/pocketbase/pocketbase"
"github.com/pocketbase/pocketbase/core"
"log"
"net/http"
"strings"
)

const cmsAdminPath = "/cms/"

func bindStaticAdminUI(app core.App, e *core.ServeEvent) error {
func bindStaticAdminUI(e *core.ServeEvent) error {
// redirect to trailing slash to ensure that relative urls will still work properly
e.Router.GET(
strings.TrimRight(cmsAdminPath, "/"),
Expand All @@ -38,7 +39,7 @@ func main() {
app := pocketbase.New()

app.OnBeforeServe().Add(func(e *core.ServeEvent) error {
bindStaticAdminUI(app, e)
bindStaticAdminUI(e)

return nil
})
Expand Down
4 changes: 3 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
"preview": "vite preview",
"pocketbase-serve": "cd .. && go run main.go serve"
},
"type": "module",
"prettier": {
Expand All @@ -21,6 +22,7 @@
"@codemirror/legacy-modes": "^6.4.0",
"@codemirror/search": "^6.5.6",
"@codemirror/view": "^6.26.3",
"@codemirror/state": "^6.4.1",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"luxon": "^3.4.4",
"pocketbase": "^0.20.0",
Expand Down
Loading
0