editing and maintenance and user suggestions

* every user has a right of a username and a display name and has the right to change it
* System information page now shows information about database user count, char count, and database schema version
* more maintenance lists
* show the right values in columns and fields
* move similar from inside of frontend component functions to utility js when used multiple times
* display help on mouse over
* add more than one believe to character
* make char name editable with better char info in headline
* GiT Gifttoleranz value not calculated correctly
* Bump backend to 0.2.3, frontend to 0.2.2
This commit is contained in:
Bardioc26
2026-02-03 17:21:43 +01:00
committed by GitHub
parent 49e6a684dd
commit 95f0fc0b7a
51 changed files with 3513 additions and 118 deletions
-10
View File
@@ -1,10 +0,0 @@
package config
import (
"github.com/gin-gonic/gin"
)
// Versionsinfo returns version and git commit information
func Versionsinfo(c *gin.Context) {
c.JSON(200, GetInfo())
}
-15
View File
@@ -1,15 +0,0 @@
package config
import "github.com/gin-gonic/gin"
// RegisterRoutes registers config-related routes (protected)
func RegisterRoutes(r *gin.RouterGroup) {
r.GET("/version", Versionsinfo)
}
// RegisterPublicRoutes registers public config routes (no auth required)
func RegisterPublicRoutes(r *gin.Engine) {
// Public version endpoint - no authentication required
public := r.Group("/api/public")
public.GET("/version", Versionsinfo)
}
-60
View File
@@ -1,60 +0,0 @@
package config
// Version is the application version
const Version = "0.2.2"
var (
// GitCommit will be set by build flags or detected at runtime
GitCommit = "unknown"
)
// init detects git commit if not set during build
func init() {
/*
if GitCommit == "" {
// Try environment variable first
if envCommit := os.Getenv("GIT_COMMIT"); envCommit != "" {
GitCommit = envCommit
} else {
// Try to detect from git command
GitCommit = detectGitCommit()
}
}
*/
}
/*
// detectGitCommit tries to get the current git commit hash
func detectGitCommit() string {
cmd := exec.Command("git", "rev-parse", "--short", "HEAD")
output, err := cmd.Output()
if err != nil {
return "unknown"
}
return strings.TrimSpace(string(output))
}
*/
// GetVersion returns the current application version
func GetVersion() string {
return Version
}
/*
// GetGitCommit returns the git commit hash
func GetGitCommit() string {
return GitCommit
}
*/
// Info contains version information
type Info struct {
Version string `json:"version"`
GitCommit string `json:"gitCommit"`
}
// GetInfo returns version information as a struct
func GetInfo() Info {
return Info{
Version: Version,
GitCommit: GitCommit,
}
}
-43
View File
@@ -1,43 +0,0 @@
package config
import (
"testing"
)
func TestGetVersion(t *testing.T) {
version := GetVersion()
if version == "" {
t.Error("Version should not be empty")
}
if version != Version {
t.Errorf("Expected version %s, got %s", Version, version)
}
}
/*
func TestGetGitCommit(t *testing.T) {
commit := GetGitCommit()
if commit == "" {
t.Error("GitCommit should not be empty")
}
// Should be either "unknown" or a valid git hash
if commit != "unknown" && len(commit) < 7 {
t.Errorf("Invalid git commit format: %s", commit)
}
}
*/
func TestGetInfo(t *testing.T) {
info := GetInfo()
if info.Version == "" {
t.Error("Info.Version should not be empty")
}
if info.GitCommit == "" {
t.Error("Info.GitCommit should not be empty")
}
if info.Version != Version {
t.Errorf("Expected info.Version %s, got %s", Version, info.Version)
}
}