[DIP-3][VSCode] Add DevStar Home Web UI For VSCode Extension

* use single quote
* fix: incorrectly set up devstar domain
* fix: incorrectly set up devstar domain
* clean: remove unused code
* fix: the close icon does not disappear after the interface is stretched
* refactor: unify style and call of message notification
* temporarily does not support signup-link
* refactor: replace DEVSTAR_HOME with DEVSTAR_DOMAIN, and read it from c…
* refactor: remove auto_init option for user
* temporarily does not support private
* [Fix] auto repo initialization after creation
* refactor: unified the interface changes after the login status change
* clean: remove unused code
* feat: the interface for creating a repository is similar to that on th…
* merge code from home.html
* en route /devstar-home
* init devstar-home-vscode.tmpl
This commit is contained in:
Levi Yan
2024-12-27 06:56:36 +00:00
repo.diff.committed_by 戴明辰
repo.diff.parent 90a460599b
repo.diff.commit 171bc80cd7
repo.diff.stats_desc%!(EXTRA int=3, int=1240, int=0)

repo.diff.view_file

@@ -0,0 +1,18 @@
package web
import (
"code.gitea.io/gitea/modules/base"
gitea_web_context "code.gitea.io/gitea/services/context"
"net/http"
)
const (
// TplDevstarHome 显示 DevStar Home 页面 templates/devstar-home-vscode.tmpl
TplDevstarHome base.TplName = "devstar-home-vscode"
)
// DevstarHome 渲染适配于 VSCode 插件的 DevStar Home 页面
func DevstarHome(ctx *gitea_web_context.Context) {
ctx.Data["Title"] = ctx.Tr("home")
ctx.HTML(http.StatusOK, TplDevstarHome)
}

repo.diff.view_file

@@ -465,6 +465,7 @@ func registerRoutes(m *web.Router) {
// Especially some AJAX requests, we can reduce middleware number to improve performance.
m.Get("/", Home)
m.Get("/devstar-home", DevstarHome)
m.Get("/sitemap.xml", sitemapEnabled, ignExploreSignIn, HomeSitemap)
m.Group("/.well-known", func() {
m.Get("/openid-configuration", auth.OIDCWellKnown)

repo.diff.file_suppressed repo.diff.load