Skip to content

Commit

Permalink
feat!: removes custom content help support
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 committed Dec 28, 2023
1 parent a65dcba commit 904b2a4
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 138 deletions.
12 changes: 0 additions & 12 deletions assets/components/Links.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<template>
<div class="flex items-center justify-end gap-4">
<template v-if="config.pages">
<router-link
:to="{ name: 'content-id', params: { id: page.id } }"
:title="page.title"
v-for="page in config.pages"
:key="page.id"
class="link-primary"
>
{{ page.title }}
</router-link>
</template>

<dropdown class="dropdown-end" @closed="latestTag = latest?.tag ?? config.version">
<template #trigger>
<mdi:announcement class="size-6 -rotate-12" />
Expand Down
18 changes: 0 additions & 18 deletions assets/pages/content/[id].vue

This file was deleted.

1 change: 0 additions & 1 deletion assets/stores/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export interface Config {
name: string;
};
profile?: Profile;
pages?: { id: string; title: string }[];
}

export interface Profile {
Expand Down
67 changes: 0 additions & 67 deletions internal/content/disk.go

This file was deleted.

25 changes: 0 additions & 25 deletions internal/web/content.go

This file was deleted.

3 changes: 0 additions & 3 deletions internal/web/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"sync"

"github.com/amir20/dozzle/internal/analytics"
"github.com/amir20/dozzle/internal/content"
"github.com/amir20/dozzle/internal/docker"

log "github.com/sirupsen/logrus"
Expand All @@ -33,7 +32,6 @@ func (h *handler) streamEvents(w http.ResponseWriter, r *http.Request) {
events := make(chan docker.ContainerEvent)
stats := make(chan docker.ContainerStat)

pages, _ := content.ReadAll()
b := analytics.BeaconEvent{
Name: "events",
Version: h.config.Version,
Expand All @@ -43,7 +41,6 @@ func (h *handler) streamEvents(w http.ResponseWriter, r *http.Request) {
HasCustomBase: h.config.Base != "/",
HasCustomAddress: h.config.Addr != ":8080",
Clients: len(h.clients),
HasDocumentation: len(pages) > 0,
HasActions: h.config.EnableActions,
}

Expand Down
11 changes: 0 additions & 11 deletions internal/web/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"path"

"github.com/amir20/dozzle/internal/auth"
"github.com/amir20/dozzle/internal/content"
"github.com/amir20/dozzle/internal/docker"
"github.com/amir20/dozzle/internal/profile"

Expand Down Expand Up @@ -54,16 +53,6 @@ func (h *handler) executeTemplate(w http.ResponseWriter, req *http.Request) {
"enableActions": h.config.EnableActions,
}

pages, err := content.ReadAll()
if err != nil {
log.Errorf("error reading content: %v", err)
} else if len(pages) > 0 {
for i, _ := range pages {
pages[i].Content = ""
}
config["pages"] = pages
}

user := auth.UserFromContext(req.Context())
if user != nil {
if profile, err := profile.Load(*user); err == nil {
Expand Down
1 change: 0 additions & 1 deletion internal/web/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ func createRouter(h *handler) *chi.Mux {
r.Get("/api/releases", h.releases)
r.Get("/api/profile/avatar", h.avatar)
r.Patch("/api/profile", h.updateProfile)
r.Get("/api/content/{id}", h.staticContent)
r.Get("/logout", h.clearSession) // TODO remove this
r.Get("/version", h.version)
})
Expand Down

0 comments on commit 904b2a4

Please sign in to comment.