diff --git a/routers/web/mail.go b/routers/web/mail.go new file mode 100644 index 0000000000..a2d53d84f1 --- /dev/null +++ b/routers/web/mail.go @@ -0,0 +1,21 @@ +// Copyright 2026 The M8SH Authors. All rights reserved. +// SPDX-License-Identifier: GPL + +package web + +import ( + "net/http" + + "gitea.dev/modules/templates" + "gitea.dev/services/context" +) + +const tplMail templates.TplName = "mail" + +// Mail renders the M8SH Mail frontend page. The page itself is a thin shell; +// all UI and mock state live client-side in the Vue MailApp component. +func Mail(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("mail_title") + ctx.Data["PageIsMail"] = true + ctx.HTML(http.StatusOK, tplMail) +} diff --git a/routers/web/web.go b/routers/web/web.go index ca350b5415..c9ce856deb 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -542,6 +542,9 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) { m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/milestones", reqSignIn, reqMilestonesDashboardPageEnabled, user.Milestones) + // M8SH Mail: messenger-style mail UI, mock-only frontend, requires sign-in. + m.Get("/mail", reqSignIn, Mail) + // ***** START: User ***** // "user/login" doesn't need signOut, then logged-in users can still access this route for redirection purposes by "/user/login?redirec_to=..." m.Get("/user/login", auth.SignIn) diff --git a/templates/base/head_navbar.tmpl b/templates/base/head_navbar.tmpl index bf79d44021..14e87e2c0b 100644 --- a/templates/base/head_navbar.tmpl +++ b/templates/base/head_navbar.tmpl @@ -27,6 +27,10 @@ {{end}} {{end}} {{ctx.Locale.Tr "explore_title"}} + + {{if and .IsSigned (not .MustChangePassword)}} + Chats + {{end}} {{else if .IsLandingPageOrganizations}} {{ctx.Locale.Tr "explore_title"}} {{else}} diff --git a/templates/mail.tmpl b/templates/mail.tmpl new file mode 100644 index 0000000000..9e6d286bd0 --- /dev/null +++ b/templates/mail.tmpl @@ -0,0 +1,5 @@ +{{template "base/head" .}} +
Select a conversation to start reading
+