Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d4d2e4c54 | ||
|
|
352d0aa4c6 | ||
|
|
76269e7358 | ||
|
|
87297a3b97 | ||
|
|
b12574994c | ||
|
|
66bb7c1942 | ||
|
|
f8b79de6a2 | ||
|
|
c7fe7490f1 | ||
|
|
334c14a307 | ||
|
|
b9f009162d | ||
|
|
b844f487bc | ||
|
|
829dc074e2 |
1
backend/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.env
|
||||||
59
backend/env/env.go
vendored
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
package env
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/joho/godotenv"
|
||||||
|
)
|
||||||
|
|
||||||
|
type EnvKey string
|
||||||
|
|
||||||
|
const (
|
||||||
|
Env EnvKey = "ENV"
|
||||||
|
GinMode EnvKey = "GIN_MODE"
|
||||||
|
Debug EnvKey = "DEBUG"
|
||||||
|
PrivKey EnvKey = "PRIVKEY"
|
||||||
|
Fullchain EnvKey = "FULLCHAIN"
|
||||||
|
Https EnvKey = "HTTPS"
|
||||||
|
Url EnvKey = "URL"
|
||||||
|
Port EnvKey = "PORT"
|
||||||
|
WorkingDir EnvKey = "WORKING_DIR"
|
||||||
|
Spa EnvKey = "SPA"
|
||||||
|
AccessSecret EnvKey = "ACCESS_SECRET"
|
||||||
|
RefreshSecret EnvKey = "REFRESH_SECRET"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
EnvDevelopment = "development"
|
||||||
|
EnvProduction = "Prodction"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (key EnvKey) GetValue() string {
|
||||||
|
return os.Getenv(string(key))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (key EnvKey) GetBoolValue() bool {
|
||||||
|
return strings.ToLower(os.Getenv(string(key))) == "true"
|
||||||
|
}
|
||||||
|
|
||||||
|
func (key EnvKey) GetUIntValue() uint {
|
||||||
|
value, err := strconv.ParseUint(os.Getenv(string(key)), 10, 32)
|
||||||
|
if err != nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return uint(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func Load(file string) error {
|
||||||
|
return godotenv.Load(file)
|
||||||
|
}
|
||||||
|
|
||||||
|
func InDevelopmentMode() bool {
|
||||||
|
return Env.GetValue() == EnvDevelopment
|
||||||
|
}
|
||||||
|
|
||||||
|
func InDebugMode() bool {
|
||||||
|
return strings.ToLower(Debug.GetValue()) == "true"
|
||||||
|
}
|
||||||
12
backend/example/example.env
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ENV=development
|
||||||
|
GIN_MODE=release
|
||||||
|
DEBUG=false
|
||||||
|
SPA=directory_of_spa_files
|
||||||
|
WORKING_DIR=.
|
||||||
|
URL=your_local_url
|
||||||
|
PORT=your_local_port
|
||||||
|
HTTPS=true
|
||||||
|
PRIVKEY=your_certificate_key_file
|
||||||
|
FULLCHAIN=your_certificate_fullchain_file
|
||||||
|
ACCESS_SECRET=your_32bit_long_access_secret
|
||||||
|
REFRESH_SECRET=your_32bit_long_referesh_secret
|
||||||
@@ -3,12 +3,13 @@ module backend
|
|||||||
go 1.24.5
|
go 1.24.5
|
||||||
|
|
||||||
require (
|
require (
|
||||||
gitea.tecamino.com/paadi/access-handler v1.0.19
|
gitea.tecamino.com/paadi/access-handler v1.0.22
|
||||||
gitea.tecamino.com/paadi/memberDB v1.1.2
|
gitea.tecamino.com/paadi/memberDB v1.1.2
|
||||||
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1
|
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1
|
||||||
gitea.tecamino.com/paadi/tecamino-logger v0.2.1
|
gitea.tecamino.com/paadi/tecamino-logger v0.2.1
|
||||||
github.com/gin-contrib/cors v1.7.6
|
github.com/gin-contrib/cors v1.7.6
|
||||||
github.com/gin-gonic/gin v1.11.0
|
github.com/gin-gonic/gin v1.11.0
|
||||||
|
github.com/joho/godotenv v1.5.1
|
||||||
golang.org/x/crypto v0.43.0
|
golang.org/x/crypto v0.43.0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
gitea.tecamino.com/paadi/access-handler v1.0.19 h1:L51Qg5RNjdIGeQsHwGUTV+ADRpUqPt3qdnu7A7UQbsw=
|
gitea.tecamino.com/paadi/access-handler v1.0.22 h1:XFi2PQ1gWqe9YuSye4Ti1o5TpdV0AFpt4Fb58MFMagk=
|
||||||
gitea.tecamino.com/paadi/access-handler v1.0.19/go.mod h1:wKsB5/Rvaj580gdg3+GbUf5V/0N00XN6cID+C/8135M=
|
gitea.tecamino.com/paadi/access-handler v1.0.22/go.mod h1:wKsB5/Rvaj580gdg3+GbUf5V/0N00XN6cID+C/8135M=
|
||||||
gitea.tecamino.com/paadi/dbHandler v1.0.8 h1:ZWSBM/KFtLwTv2cBqwK1mOxWAxAfL0BcWEC3kJ9JALU=
|
gitea.tecamino.com/paadi/dbHandler v1.0.8 h1:ZWSBM/KFtLwTv2cBqwK1mOxWAxAfL0BcWEC3kJ9JALU=
|
||||||
gitea.tecamino.com/paadi/dbHandler v1.0.8/go.mod h1:y/xn/POJg1DO++67uKvnO23lJQgh+XFQq7HZCS9Getw=
|
gitea.tecamino.com/paadi/dbHandler v1.0.8/go.mod h1:y/xn/POJg1DO++67uKvnO23lJQgh+XFQq7HZCS9Getw=
|
||||||
gitea.tecamino.com/paadi/memberDB v1.1.2 h1:j/Tsr7JnzAkdOvgjG77TzTVBWd4vBrmEFzPXNpW7GYk=
|
gitea.tecamino.com/paadi/memberDB v1.1.2 h1:j/Tsr7JnzAkdOvgjG77TzTVBWd4vBrmEFzPXNpW7GYk=
|
||||||
@@ -56,6 +56,8 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD
|
|||||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
|
||||||
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
|
||||||
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
|
||||||
|
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
|
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"backend/env"
|
||||||
"backend/models"
|
"backend/models"
|
||||||
"backend/server"
|
"backend/server"
|
||||||
"backend/utils"
|
"backend/utils"
|
||||||
@@ -27,20 +28,27 @@ func main() {
|
|||||||
|
|
||||||
flag.Var(&allowOrigins, "allowOrigin", "Allowed origin (can repeat this flag)")
|
flag.Var(&allowOrigins, "allowOrigin", "Allowed origin (can repeat this flag)")
|
||||||
|
|
||||||
spa := flag.String("spa", "./dist/spa", "quasar spa files")
|
envFile := flag.String("env", ".env", "enviroment file")
|
||||||
workingDir := flag.String("workingDirectory", ".", "quasar spa files")
|
|
||||||
ip := flag.String("ip", "0.0.0.0", "server listening ip")
|
|
||||||
organization := flag.String("organization", "", "self signed ciertificate organization")
|
organization := flag.String("organization", "", "self signed ciertificate organization")
|
||||||
port := flag.Uint("port", 9500, "server listening port")
|
|
||||||
https := flag.Bool("https", false, "serves as https needs flag -cert and -chain")
|
|
||||||
sslKey := flag.String("privkey", "", "ssl private key path")
|
|
||||||
sslFullchain := flag.String("fullchain", "", "ssl fullchain path")
|
|
||||||
debug := flag.Bool("debug", false, "log debug")
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
// load enviroment file if exists
|
||||||
|
if err := env.Load(*envFile); err != nil {
|
||||||
|
fmt.Println("no .env found path: ", *envFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
devMode := env.InDevelopmentMode()
|
||||||
|
// set gin mode
|
||||||
|
if !devMode {
|
||||||
|
gin.SetMode(env.GinMode.GetValue())
|
||||||
|
}
|
||||||
|
|
||||||
|
workingDir := env.WorkingDir.GetValue()
|
||||||
|
spa := env.Spa.GetValue()
|
||||||
|
|
||||||
//change working directory only if value is given
|
//change working directory only if value is given
|
||||||
if *workingDir != "." && *workingDir != "" {
|
if workingDir != "." && workingDir != "" {
|
||||||
os.Chdir(*workingDir)
|
os.Chdir(workingDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
wd, err := os.Getwd()
|
wd, err := os.Getwd()
|
||||||
@@ -55,7 +63,7 @@ func main() {
|
|||||||
MaxSize: 1,
|
MaxSize: 1,
|
||||||
MaxBackup: 3,
|
MaxBackup: 3,
|
||||||
MaxAge: 28,
|
MaxAge: 28,
|
||||||
Debug: *debug,
|
Debug: env.InDebugMode(),
|
||||||
TerminalOut: true,
|
TerminalOut: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -82,11 +90,11 @@ func main() {
|
|||||||
|
|
||||||
//get local ip
|
//get local ip
|
||||||
httpString := "http://"
|
httpString := "http://"
|
||||||
if *https {
|
if env.Https.GetBoolValue() {
|
||||||
httpString = "https://"
|
httpString = "https://"
|
||||||
|
|
||||||
}
|
}
|
||||||
allowOrigins = append(allowOrigins, httpString+"localhost:9000", httpString+"localhost:9500", httpString+"127.0.0.1:9500", httpString+"0.0.0.0:9500")
|
allowOrigins = append(allowOrigins, httpString+"localhost:9000", httpString+"localhost:9500", httpString+"127.0.0.1:9000", httpString+"0.0.0.0:9500")
|
||||||
|
|
||||||
localIP, err := utils.GetLocalIP()
|
localIP, err := utils.GetLocalIP()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -153,7 +161,7 @@ func main() {
|
|||||||
api.POST("/login/refresh", accessHandler.Refresh)
|
api.POST("/login/refresh", accessHandler.Refresh)
|
||||||
|
|
||||||
// Serve static files
|
// Serve static files
|
||||||
s.Routes.StaticFS("/assets", gin.Dir(filepath.Join(*spa, "assets"), true))
|
s.Routes.StaticFS("/assets", gin.Dir(filepath.Join(spa, "assets"), true))
|
||||||
s.Routes.NoRoute(func(c *gin.Context) {
|
s.Routes.NoRoute(func(c *gin.Context) {
|
||||||
// Disallow fallback for /api paths
|
// Disallow fallback for /api paths
|
||||||
if strings.HasPrefix(c.Request.URL.Path, "/api") {
|
if strings.HasPrefix(c.Request.URL.Path, "/api") {
|
||||||
@@ -161,44 +169,44 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Try to serve file from SPA directory
|
// Try to serve file from SPA directory
|
||||||
filePath := filepath.Join(*spa, c.Request.URL.Path)
|
filePath := filepath.Join(spa, c.Request.URL.Path)
|
||||||
if _, err := os.Stat(filePath); err == nil {
|
if _, err := os.Stat(filePath); err == nil {
|
||||||
c.File(filePath)
|
c.File(filePath)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Fallback to index.html for SPA routing
|
// Fallback to index.html for SPA routing
|
||||||
c.File(filepath.Join(*spa, "index.html"))
|
c.File(filepath.Join(spa, "index.html"))
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
time.Sleep(500 * time.Millisecond)
|
time.Sleep(500 * time.Millisecond)
|
||||||
if err := utils.OpenBrowser(fmt.Sprintf("%slocalhost:%d", httpString, *port), logger); err != nil {
|
if err := utils.OpenBrowser(fmt.Sprintf("%slocalhost:%s", httpString, env.Port.GetValue()), logger); err != nil {
|
||||||
logger.Error("main", fmt.Sprintf("starting browser error : %s", err))
|
logger.Error("main", fmt.Sprintf("starting browser error : %s", err))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if *https {
|
if env.Https.GetBoolValue() {
|
||||||
if *sslFullchain == "" {
|
if env.Fullchain.GetValue() == "" {
|
||||||
logger.Error("ssl certificate", "-cert flag not given for https server")
|
logger.Error("ssl certificate", "-cert flag not given for https server")
|
||||||
log.Fatal("-cert flag not given for https server")
|
log.Fatal("-cert flag not given for https server")
|
||||||
}
|
}
|
||||||
if *sslKey == "" {
|
if env.PrivKey.GetValue() == "" {
|
||||||
logger.Error("ssl key", "-chain flag not given for https server")
|
logger.Error("ssl key", "-chain flag not given for https server")
|
||||||
log.Fatal("-chain flag not given for https server")
|
log.Fatal("-chain flag not given for https server")
|
||||||
}
|
}
|
||||||
|
|
||||||
// start https server
|
// start https server
|
||||||
logger.Info("main", fmt.Sprintf("https listen on ip: %s port: %d", *ip, *port))
|
logger.Info("main", fmt.Sprintf("https listen on ip: %s port: %s", env.Url.GetValue(), env.Port.GetValue()))
|
||||||
if err := s.ServeHttps(*ip, *port, cert.Cert{Organization: *organization, CertFile: *sslFullchain, KeyFile: *sslKey}); err != nil {
|
if err := s.ServeHttps(env.Url.GetValue(), env.Port.GetUIntValue(), cert.Cert{Organization: *organization, CertFile: env.Fullchain.GetValue(), KeyFile: env.PrivKey.GetValue()}); err != nil {
|
||||||
logger.Error("main", "error https server "+err.Error())
|
logger.Error("main", "error https server "+err.Error())
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// start http server
|
// start http server
|
||||||
logger.Info("main", fmt.Sprintf("http listen on ip: %s port: %d", *ip, *port))
|
logger.Info("main", fmt.Sprintf("http listen on ip: %s port: %s", env.Url.GetValue(), env.Port.GetValue()))
|
||||||
if err := s.ServeHttp(*ip, *port); err != nil {
|
if err := s.ServeHttp(env.Url.GetValue(), env.Port.GetUIntValue()); err != nil {
|
||||||
logger.Error("main", "error http server "+err.Error())
|
logger.Error("main", "error http server "+err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
package models
|
|
||||||
|
|
||||||
// type Rights struct {
|
|
||||||
// Name string `json:"name"`
|
|
||||||
// Rights int `json:"rights"`
|
|
||||||
// }
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package models
|
|
||||||
|
|
||||||
// type Role struct {
|
|
||||||
// Id int `json:"id"`
|
|
||||||
// Role string `json:"role"`
|
|
||||||
// Rights []Rights `json:"rights"`
|
|
||||||
// }
|
|
||||||
|
|
||||||
// func (r *Role) IsValid() bool {
|
|
||||||
// return r.Role != ""
|
|
||||||
// }
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
package models
|
|
||||||
|
|
||||||
// type Settings struct {
|
|
||||||
// PrimaryColor string `json:"primaryColor,omitempty"`
|
|
||||||
// PrimaryColorText string `json:"primaryColorText,omitempty"`
|
|
||||||
// SecondaryColor string `json:"secondaryColor,omitempty"`
|
|
||||||
// SecondaryColorText string `json:"secondaryColorText,omitempty"`
|
|
||||||
// Icon string `json:"icon,omitempty"`
|
|
||||||
// DatabaseName string `json:"databaseName,omitempty"`
|
|
||||||
// DatabaseToken string `json:"databaseToken,omitempty"`
|
|
||||||
// }
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package models
|
|
||||||
|
|
||||||
// type User struct {
|
|
||||||
// Id int `json:"id"`
|
|
||||||
// Name string `json:"user"`
|
|
||||||
// Email string `json:"email"`
|
|
||||||
// Role string `json:"role"`
|
|
||||||
// Password string `json:"password,omitempty"`
|
|
||||||
// Settings Settings `json:"settings"`
|
|
||||||
// }
|
|
||||||
|
|
||||||
// func (u *User) IsValid() bool {
|
|
||||||
// return u.Name != ""
|
|
||||||
// }
|
|
||||||
25
index.html
@@ -1,19 +1,22 @@
|
|||||||
<!DOCTYPE html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><%= productName %></title>
|
<title><%= productName %></title>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8" />
|
||||||
<meta name="description" content="<%= productDescription %>">
|
<meta name="description" content="<%= productDescription %>" />
|
||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no" />
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="msapplication-tap-highlight" content="no" />
|
||||||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
|
||||||
|
/>
|
||||||
|
|
||||||
<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png">
|
<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png" />
|
||||||
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
|
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png" />
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png" />
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png" />
|
||||||
<link rel="icon" type="image/ico" href="favicon.ico">
|
<link rel="icon" type="image/ico" href="favicon.ico" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- quasar:entry-point -->
|
<!-- quasar:entry-point -->
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "lightcontrol",
|
"name": "lightcontrol",
|
||||||
"version": "1.0.8",
|
"version": "1.1.0",
|
||||||
"description": "A Tecamino App",
|
"description": "A Tecamino App",
|
||||||
"productName": "Member Database",
|
"productName": "Attendence Records",
|
||||||
"author": "A. Zuercher",
|
"author": "A. Zuercher",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 859 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -32,6 +32,7 @@ settings: Iistellige
|
|||||||
databaseName: Datebank Name
|
databaseName: Datebank Name
|
||||||
token: Schlüssu
|
token: Schlüssu
|
||||||
login: Amäude
|
login: Amäude
|
||||||
|
logout: Abmäude
|
||||||
user: Benutzer
|
user: Benutzer
|
||||||
password: Passwort
|
password: Passwort
|
||||||
isRequired: isch erforderlich
|
isRequired: isch erforderlich
|
||||||
@@ -115,3 +116,5 @@ expiration: Ablauf
|
|||||||
never: Nie
|
never: Nie
|
||||||
responsibles: Verantwortliche
|
responsibles: Verantwortliche
|
||||||
comment: Bemerkung
|
comment: Bemerkung
|
||||||
|
dark_mode: Dunkel-Modus
|
||||||
|
light_mode: Hell-Modus
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ settings: Einstellungen
|
|||||||
databaseName: Datenbank Name
|
databaseName: Datenbank Name
|
||||||
token: Schlüssel
|
token: Schlüssel
|
||||||
login: Anmelden
|
login: Anmelden
|
||||||
|
logout: Abmelden
|
||||||
user: Benutzer
|
user: Benutzer
|
||||||
password: Passwort
|
password: Passwort
|
||||||
isRequired: ist erforderlich
|
isRequired: ist erforderlich
|
||||||
@@ -115,3 +116,5 @@ expiration: Ablauf
|
|||||||
never: Nie
|
never: Nie
|
||||||
responsibles: Verantwortliche
|
responsibles: Verantwortliche
|
||||||
comment: Bemerkung
|
comment: Bemerkung
|
||||||
|
dark_mode: Dunkel-Modus
|
||||||
|
light_mode: Hell-Modus
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ settings: Settings
|
|||||||
databaseName: Database Name
|
databaseName: Database Name
|
||||||
token: Token
|
token: Token
|
||||||
login: Login
|
login: Login
|
||||||
|
logout: Logout
|
||||||
user: User
|
user: User
|
||||||
password: Password
|
password: Password
|
||||||
isRequired: is required
|
isRequired: is required
|
||||||
@@ -115,3 +116,5 @@ expiration: Expiration
|
|||||||
never: Never
|
never: Never
|
||||||
responsibles: Responsibles
|
responsibles: Responsibles
|
||||||
comment: Comment
|
comment: Comment
|
||||||
|
dark_mode: Dark-Mode
|
||||||
|
light_mode: Light-Mode
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
import { boot } from 'quasar/wrappers';
|
import { boot } from 'quasar/wrappers';
|
||||||
import { setQuasarInstance } from 'src/vueLib/utils/globalQ';
|
import { setQuasarInstance } from 'src/vueLib/utils/globalQ';
|
||||||
import { setRouterInstance } from 'src/vueLib/utils/globalRouter';
|
import { setRouterInstance } from 'src/vueLib/utils/globalRouter';
|
||||||
import { databaseName } from 'src/vueLib/tables/members/MembersTable';
|
import { databaseName, logo, appName } from 'src/vueLib/models/settings';
|
||||||
import { Logo } from 'src/vueLib/models/logo';
|
import { Dark } from 'quasar';
|
||||||
|
|
||||||
export default boot(({ app, router }) => {
|
export default boot(({ app, router }) => {
|
||||||
setRouterInstance(router); // store router for global access
|
setRouterInstance(router); // store router for global access
|
||||||
const $q = app.config.globalProperties.$q;
|
const $q = app.config.globalProperties.$q;
|
||||||
setQuasarInstance($q);
|
setQuasarInstance($q);
|
||||||
|
|
||||||
Logo.value = localStorage.getItem('icon') ?? Logo.value;
|
Dark.set(localStorage.getItem('mode') === 'true');
|
||||||
|
|
||||||
|
logo.value = localStorage.getItem('icon') ?? logo.value;
|
||||||
|
appName.value = localStorage.getItem('appName') ?? appName.value;
|
||||||
databaseName.value = localStorage.getItem('databaseName') ?? databaseName.value;
|
databaseName.value = localStorage.getItem('databaseName') ?? databaseName.value;
|
||||||
let primaryColor = localStorage.getItem('primaryColor');
|
let primaryColor = localStorage.getItem('primaryColor');
|
||||||
if (primaryColor == null || primaryColor === 'undefined' || primaryColor.trim() === '') {
|
if (primaryColor == null || primaryColor === 'undefined' || primaryColor.trim() === '') {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
/>
|
/>
|
||||||
<q-btn flat dense round icon="menu" aria-label="Menu" @click="toggleLeftDrawer" />
|
<q-btn flat dense round icon="menu" aria-label="Menu" @click="toggleLeftDrawer" />
|
||||||
|
|
||||||
<q-toolbar-title class="text-primary-text"> {{ productName }} </q-toolbar-title>
|
<q-toolbar-title class="text-primary-text"> {{ $t(appName) }} </q-toolbar-title>
|
||||||
|
|
||||||
<div>Version {{ version }}</div>
|
<div>Version {{ version }}</div>
|
||||||
<q-btn dense icon="refresh" square class="q-px-md q-ml-md" @click="refresh" />
|
<q-btn dense icon="refresh" square class="q-px-md q-ml-md" @click="refresh" />
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</q-header>
|
</q-header>
|
||||||
|
|
||||||
<q-drawer v-model="leftDrawerOpen" bordered>
|
<q-drawer v-model="leftDrawerOpen" bordered :width="drawerWidth" :overlay="$q.screen.lt.sm">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item v-if="!autorized" to="/login" exact clickable v-ripple @click="closeDrawer">
|
<q-item v-if="!autorized" to="/login" exact clickable v-ripple @click="closeDrawer">
|
||||||
<q-item-section>{{ $t('login') }}</q-item-section>
|
<q-item-section>{{ $t('login') }}</q-item-section>
|
||||||
@@ -63,12 +63,13 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { version, productName } from '../../package.json';
|
import { version } from '../../package.json';
|
||||||
import LoginMenu from 'src/vueLib/login/LoginMenu.vue';
|
import LoginMenu from 'src/vueLib/login/LoginMenu.vue';
|
||||||
import { useUserStore } from 'src/vueLib/login/userStore';
|
import { useUserStore } from 'src/vueLib/login/userStore';
|
||||||
import { Logo } from 'src/vueLib/models/logo';
|
import { logo, appName } from 'src/vueLib/models/settings';
|
||||||
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
const localLogo = ref(Logo);
|
const localLogo = ref(logo);
|
||||||
|
|
||||||
const leftDrawerOpen = ref(false);
|
const leftDrawerOpen = ref(false);
|
||||||
const user = useUserStore();
|
const user = useUserStore();
|
||||||
@@ -87,4 +88,10 @@ function closeDrawer() {
|
|||||||
function refresh() {
|
function refresh() {
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change width based on screen size
|
||||||
|
const drawerWidth = computed(() => {
|
||||||
|
const $q = useQuasar();
|
||||||
|
return $q.screen.lt.sm ? 220 : 300; // phone: 220px, desktop: 300px
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -7,6 +7,18 @@
|
|||||||
<q-card class="q-ma-lg">
|
<q-card class="q-ma-lg">
|
||||||
<p class="text-bold text-h6 text-primary q-pa-md">{{ $t('general') }}</p>
|
<p class="text-bold text-h6 text-primary q-pa-md">{{ $t('general') }}</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<q-input
|
||||||
|
:readonly="!user.isPermittedTo('settings', 'write')"
|
||||||
|
:class="[
|
||||||
|
colorGroup ? 'col-md-4' : 'col-md-3',
|
||||||
|
colorGroup ? 'col-md-6' : 'col-md-6',
|
||||||
|
colorGroup ? 'col-md-4' : 'col-md-12',
|
||||||
|
'q-pa-md',
|
||||||
|
]"
|
||||||
|
filled
|
||||||
|
:label="$t('appName')"
|
||||||
|
v-model="settings.appName"
|
||||||
|
></q-input>
|
||||||
<q-input
|
<q-input
|
||||||
:readonly="!user.isPermittedTo('settings', 'write')"
|
:readonly="!user.isPermittedTo('settings', 'write')"
|
||||||
:class="[
|
:class="[
|
||||||
@@ -133,8 +145,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { databaseName } from 'src/vueLib/tables/members/MembersTable';
|
import { logo, appName, databaseName } from 'src/vueLib/models/settings';
|
||||||
import { Logo } from 'src/vueLib/models/logo';
|
|
||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import { appApi } from 'src/boot/axios';
|
import { appApi } from 'src/boot/axios';
|
||||||
import { useNotify } from 'src/vueLib/general/useNotify';
|
import { useNotify } from 'src/vueLib/general/useNotify';
|
||||||
@@ -146,7 +157,8 @@ const colorGroup = ref(false);
|
|||||||
const user = useUserStore();
|
const user = useUserStore();
|
||||||
|
|
||||||
const settings = reactive<Settings>({
|
const settings = reactive<Settings>({
|
||||||
icon: Logo.value,
|
appName: appName.value,
|
||||||
|
icon: logo.value,
|
||||||
databaseName: databaseName.value,
|
databaseName: databaseName.value,
|
||||||
primaryColor: document.documentElement.style.getPropertyValue('--q-primary'),
|
primaryColor: document.documentElement.style.getPropertyValue('--q-primary'),
|
||||||
primaryColorText: document.documentElement.style.getPropertyValue('--q-primary-text'),
|
primaryColorText: document.documentElement.style.getPropertyValue('--q-primary-text'),
|
||||||
@@ -155,7 +167,8 @@ const settings = reactive<Settings>({
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(settings, (newSettings) => {
|
watch(settings, (newSettings) => {
|
||||||
Logo.value = newSettings.icon;
|
logo.value = newSettings.icon;
|
||||||
|
appName.value = newSettings.appName;
|
||||||
databaseName.value = newSettings.databaseName;
|
databaseName.value = newSettings.databaseName;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -175,8 +188,10 @@ function save() {
|
|||||||
document.documentElement.style.setProperty('--q-primary-text', settings.primaryColorText);
|
document.documentElement.style.setProperty('--q-primary-text', settings.primaryColorText);
|
||||||
document.documentElement.style.setProperty('--q-secondary', settings.secondaryColor);
|
document.documentElement.style.setProperty('--q-secondary', settings.secondaryColor);
|
||||||
document.documentElement.style.setProperty('--q-secondary-text', settings.secondaryColorText);
|
document.documentElement.style.setProperty('--q-secondary-text', settings.secondaryColorText);
|
||||||
Logo.value = settings.icon;
|
appName.value = settings.appName;
|
||||||
|
logo.value = settings.icon;
|
||||||
localStorage.setItem('icon', settings.icon);
|
localStorage.setItem('icon', settings.icon);
|
||||||
|
localStorage.setItem('appName', settings.appName);
|
||||||
localStorage.setItem('databaseName', settings.databaseName);
|
localStorage.setItem('databaseName', settings.databaseName);
|
||||||
localStorage.setItem('primaryColor', settings.primaryColor);
|
localStorage.setItem('primaryColor', settings.primaryColor);
|
||||||
localStorage.setItem('primaryColorText', settings.primaryColorText);
|
localStorage.setItem('primaryColorText', settings.primaryColorText);
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
:no-refocus="!minMaxState"
|
:no-refocus="!minMaxState"
|
||||||
:seamless="!minMaxState"
|
:seamless="!minMaxState"
|
||||||
>
|
>
|
||||||
<q-card class="layout" :style="cardStyle">
|
<q-card class="layout bg-surface text-on-surface" :style="cardStyle">
|
||||||
<!-- Draggable Header -->
|
<!-- Draggable Header -->
|
||||||
<div
|
<div
|
||||||
class="dialog-header row items-center justify-between bg-grey-1"
|
class="dialog-header row items-center justify-between bg-transparent"
|
||||||
v-touch-pan.mouse.prevent.stop="handlePan"
|
v-touch-pan.mouse.prevent.stop="handlePan"
|
||||||
>
|
>
|
||||||
<div v-if="headerTitle" class="text-left text-bold text-caption q-mx-sm">
|
<div v-if="headerTitle" class="text-left text-bold text-caption q-mx-sm">
|
||||||
@@ -139,13 +139,11 @@ const cardStyle = computed(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draggable header */
|
/* Draggable header */
|
||||||
.dialog-header {
|
.dialog-header {
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
background: #f5f5f5;
|
|
||||||
cursor: move;
|
cursor: move;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<q-form ref="refForm">
|
<q-form ref="refForm">
|
||||||
<q-item-section class="q-gutter-md q-pa-md">
|
<q-item-section class="q-gutter-md q-pa-md">
|
||||||
<q-card :class="['q-gutter-xs q-items-center q-pa-lg', { shake: shake }]">
|
<q-card :class="['q-gutter-xs q-items-center q-pa-lg', { shake: shake }]">
|
||||||
<div class="text-h5 text-primary text-center">{{ productName }}</div>
|
<div class="text-h5 text-primary text-center">{{ $t(appName) }}</div>
|
||||||
<q-input
|
<q-input
|
||||||
ref="refUserInput"
|
ref="refUserInput"
|
||||||
dense
|
dense
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { productName } from '../../../package.json';
|
import { appName } from '../models/settings';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useNotify } from '../general/useNotify';
|
import { useNotify } from '../general/useNotify';
|
||||||
import { useLogin } from './useLogin';
|
import { useLogin } from './useLogin';
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
<q-item-section class="text-primary">{{ loginText }}</q-item-section>
|
<q-item-section class="text-primary">{{ loginText }}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-btn flat :icon="Dark.mode ? 'light_mode' : 'dark_mode'" @click="Dark.toggle"></q-btn>
|
<q-btn flat :icon="darkMode" @click="toggleDarkMode"
|
||||||
|
><q-tooltip>{{ $t(darkMode) }}</q-tooltip></q-btn
|
||||||
|
>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-select
|
<q-select
|
||||||
@@ -18,7 +20,8 @@
|
|||||||
dense
|
dense
|
||||||
v-model="langSelected"
|
v-model="langSelected"
|
||||||
:options="langSelection"
|
:options="langSelection"
|
||||||
></q-select>
|
><q-tooltip>{{ $t('language') }}</q-tooltip></q-select
|
||||||
|
>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item
|
<q-item
|
||||||
v-if="
|
v-if="
|
||||||
@@ -54,21 +57,34 @@ import { useLogin } from './useLogin';
|
|||||||
|
|
||||||
const userLogin = useLogin();
|
const userLogin = useLogin();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const refLoginDialog = ref();
|
||||||
|
const user = useUserStore();
|
||||||
|
const { NotifyResponse } = useNotify();
|
||||||
|
const currentUser = computed(() => user.user);
|
||||||
|
const darkMode = computed(() => {
|
||||||
|
if (Dark.mode) {
|
||||||
|
return 'light_mode';
|
||||||
|
}
|
||||||
|
return 'dark_mode';
|
||||||
|
});
|
||||||
const showLogin = computed(
|
const showLogin = computed(
|
||||||
() => (route.path !== '/' && route.path !== '/login') || currentUser.value?.username === '',
|
() => (route.path !== '/' && route.path !== '/login') || currentUser.value?.username === '',
|
||||||
);
|
);
|
||||||
|
|
||||||
const user = useUserStore();
|
|
||||||
const autorized = computed(() => !!user.isAuthorizedAs(['admin']));
|
const autorized = computed(() => !!user.isAuthorizedAs(['admin']));
|
||||||
const { NotifyResponse } = useNotify();
|
|
||||||
const currentUser = computed(() => user.user);
|
|
||||||
|
|
||||||
|
// switch between logged in or logged out text
|
||||||
const loginText = computed(() => {
|
const loginText = computed(() => {
|
||||||
return currentUser.value ? 'Logout' : 'Login';
|
return currentUser.value ? i18n.global.t('logout') : i18n.global.t('login');
|
||||||
});
|
});
|
||||||
|
|
||||||
const refLoginDialog = ref();
|
//switch between dark and light mode and save it in localStorage
|
||||||
|
function toggleDarkMode() {
|
||||||
|
Dark.toggle();
|
||||||
|
localStorage.setItem('mode', String(Dark.mode));
|
||||||
|
}
|
||||||
|
|
||||||
|
// opens login page if no user is logged in otherwise it serves as logout
|
||||||
function openLogin() {
|
function openLogin() {
|
||||||
if (currentUser.value) {
|
if (currentUser.value) {
|
||||||
userLogin.logout().catch((err) => NotifyResponse(err, 'error'));
|
userLogin.logout().catch((err) => NotifyResponse(err, 'error'));
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { appApi } from 'src/boot/axios';
|
|||||||
import { useUserStore } from './userStore';
|
import { useUserStore } from './userStore';
|
||||||
import { useNotify } from '../general/useNotify';
|
import { useNotify } from '../general/useNotify';
|
||||||
import type { Settings } from '../models/settings';
|
import type { Settings } from '../models/settings';
|
||||||
import { Logo } from '../models/logo';
|
import { appName, logo } from '../models/settings';
|
||||||
|
|
||||||
const refreshTime = 10000;
|
const refreshTime = 10000;
|
||||||
let intervalId: ReturnType<typeof setInterval> | null = null;
|
let intervalId: ReturnType<typeof setInterval> | null = null;
|
||||||
@@ -16,7 +16,8 @@ export function useLogin() {
|
|||||||
await appApi.post('/login', { user, password }).then((resp) => {
|
await appApi.post('/login', { user, password }).then((resp) => {
|
||||||
const sets = resp.data.settings as Settings;
|
const sets = resp.data.settings as Settings;
|
||||||
|
|
||||||
Logo.value = sets.icon;
|
logo.value = sets.icon;
|
||||||
|
appName.value = sets.appName;
|
||||||
document.documentElement.style.setProperty('--q-primary', sets.primaryColor);
|
document.documentElement.style.setProperty('--q-primary', sets.primaryColor);
|
||||||
document.documentElement.style.setProperty('--q-primary-text', sets.primaryColorText);
|
document.documentElement.style.setProperty('--q-primary-text', sets.primaryColorText);
|
||||||
document.documentElement.style.setProperty('--q-secondary', sets.secondaryColor);
|
document.documentElement.style.setProperty('--q-secondary', sets.secondaryColor);
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
export const Logo = ref('');
|
|
||||||
@@ -1,4 +1,11 @@
|
|||||||
|
import { ref } from 'vue';
|
||||||
|
|
||||||
|
export const logo = ref('');
|
||||||
|
export const appName = ref('Attendance Records');
|
||||||
|
export const databaseName = ref('members.dba');
|
||||||
|
|
||||||
export type Settings = {
|
export type Settings = {
|
||||||
|
appName: string;
|
||||||
icon: string;
|
icon: string;
|
||||||
databaseName: string;
|
databaseName: string;
|
||||||
primaryColor: string;
|
primaryColor: string;
|
||||||
@@ -9,6 +16,7 @@ export type Settings = {
|
|||||||
|
|
||||||
export function DefaultSettings(): Settings {
|
export function DefaultSettings(): Settings {
|
||||||
return {
|
return {
|
||||||
|
appName: 'Attendance Records',
|
||||||
icon: '',
|
icon: '',
|
||||||
databaseName: 'members.dba',
|
databaseName: 'members.dba',
|
||||||
primaryColor: document.documentElement.style.getPropertyValue('--q-primary-text'),
|
primaryColor: document.documentElement.style.getPropertyValue('--q-primary-text'),
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ import EditAllDialog from 'src/components/EventEditAllDialog.vue';
|
|||||||
import OkDialog from 'src/components/dialog/OkDialog.vue';
|
import OkDialog from 'src/components/dialog/OkDialog.vue';
|
||||||
import { useNotify } from 'src/vueLib/general/useNotify';
|
import { useNotify } from 'src/vueLib/general/useNotify';
|
||||||
import { useEventTable } from './EventsTable';
|
import { useEventTable } from './EventsTable';
|
||||||
import { databaseName } from '../members/MembersTable';
|
import { databaseName } from 'src/vueLib/models/settings';
|
||||||
import { useUserStore } from 'src/vueLib/login/userStore';
|
import { useUserStore } from 'src/vueLib/login/userStore';
|
||||||
import AttendeesTable from '../attendees/AttendeesTable.vue';
|
import AttendeesTable from '../attendees/AttendeesTable.vue';
|
||||||
import type { Members } from 'src/vueLib/models/member';
|
import type { Members } from 'src/vueLib/models/member';
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ import { useNotify } from 'src/vueLib/general/useNotify';
|
|||||||
import { i18n } from 'boot/lang';
|
import { i18n } from 'boot/lang';
|
||||||
import { useResponsibleTable } from '../responsible/ResponsibleTable';
|
import { useResponsibleTable } from '../responsible/ResponsibleTable';
|
||||||
|
|
||||||
export const databaseName = ref('members.dba');
|
|
||||||
|
|
||||||
export function useMemberTable() {
|
export function useMemberTable() {
|
||||||
const members = ref<Members>([]);
|
const members = ref<Members>([]);
|
||||||
const { responsibles, updateResponsibles } = useResponsibleTable();
|
const { responsibles, updateResponsibles } = useResponsibleTable();
|
||||||
@@ -232,7 +230,6 @@ export function useMemberTable() {
|
|||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
console.log(4545, members.value.length);
|
|
||||||
//filter same members out so list is shorter
|
//filter same members out so list is shorter
|
||||||
if (filter) {
|
if (filter) {
|
||||||
members.value = members.value.filter(
|
members.value = members.value.filter(
|
||||||
@@ -245,7 +242,6 @@ export function useMemberTable() {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
console.log(4546, members.value.length);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ import { useNotify } from 'src/vueLib/general/useNotify';
|
|||||||
import { useMemberTable } from './MembersTable';
|
import { useMemberTable } from './MembersTable';
|
||||||
import UploadDialog from 'src/components/UploadDialog.vue';
|
import UploadDialog from 'src/components/UploadDialog.vue';
|
||||||
import AddToEvent from 'src/components/AddToEvent.vue';
|
import AddToEvent from 'src/components/AddToEvent.vue';
|
||||||
import { databaseName } from './MembersTable';
|
import { databaseName } from 'src/vueLib/models/settings';
|
||||||
import { useUserStore } from 'src/vueLib/login/userStore';
|
import { useUserStore } from 'src/vueLib/login/userStore';
|
||||||
import { i18n } from 'src/boot/lang';
|
import { i18n } from 'src/boot/lang';
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ import type { Member, Members } from 'src/vueLib/models/member';
|
|||||||
import OkDialog from 'src/components/dialog/OkDialog.vue';
|
import OkDialog from 'src/components/dialog/OkDialog.vue';
|
||||||
import { useNotify } from 'src/vueLib/general/useNotify';
|
import { useNotify } from 'src/vueLib/general/useNotify';
|
||||||
import { useResponsibleTable } from './ResponsibleTable';
|
import { useResponsibleTable } from './ResponsibleTable';
|
||||||
import { databaseName } from '../members/MembersTable';
|
import { databaseName } from 'src/vueLib/models/settings';
|
||||||
import { useUserStore } from 'src/vueLib/login/userStore';
|
import { useUserStore } from 'src/vueLib/login/userStore';
|
||||||
import { i18n } from 'src/boot/lang';
|
import { i18n } from 'src/boot/lang';
|
||||||
|
|
||||||
|
|||||||