mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-23 22:18:22 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88f9ff90d4 | ||
|
|
354f1adbee | ||
|
|
2a62a43493 | ||
|
|
673db41f37 | ||
|
|
830ce2b0a9 | ||
|
|
e8e6a425dd | ||
|
|
da00db0608 |
@@ -41,9 +41,10 @@ COPY --from=builder /go/bin/api /app
|
|||||||
RUN chmod +x /app/api
|
RUN chmod +x /app/api
|
||||||
|
|
||||||
LABEL Name=homebox Version=0.0.1
|
LABEL Name=homebox Version=0.0.1
|
||||||
|
LABEL org.opencontainers.image.source="https://github.com/hay-kot/homebox"
|
||||||
EXPOSE 7745
|
EXPOSE 7745
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
VOLUME [ "/data" ]
|
VOLUME [ "/data" ]
|
||||||
|
|
||||||
ENTRYPOINT [ "/app/api" ]
|
ENTRYPOINT [ "/app/api" ]
|
||||||
CMD [ "/data/config.yml" ]
|
CMD [ "/data/config.yml" ]
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ go 1.19
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
ariga.io/atlas v0.9.1-0.20230119145809-92243f7c55cb
|
ariga.io/atlas v0.9.1-0.20230119145809-92243f7c55cb
|
||||||
entgo.io/ent v0.11.7
|
entgo.io/ent v0.11.8
|
||||||
github.com/ardanlabs/conf/v3 v3.1.3
|
github.com/ardanlabs/conf/v3 v3.1.4
|
||||||
github.com/go-chi/chi/v5 v5.0.8
|
github.com/go-chi/chi/v5 v5.0.8
|
||||||
github.com/go-playground/validator/v10 v10.11.2
|
github.com/go-playground/validator/v10 v10.11.2
|
||||||
github.com/gocarina/gocsv v0.0.0-20230123225133-763e25b40669
|
github.com/gocarina/gocsv v0.0.0-20230123225133-763e25b40669
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ ariga.io/atlas v0.9.1-0.20230119145809-92243f7c55cb h1:mbsFtavDqGdYwdDpP50LGOOZ2
|
|||||||
ariga.io/atlas v0.9.1-0.20230119145809-92243f7c55cb/go.mod h1:T230JFcENj4ZZzMkZrXFDSkv+2kXkUgpJ5FQQ5hMcKU=
|
ariga.io/atlas v0.9.1-0.20230119145809-92243f7c55cb/go.mod h1:T230JFcENj4ZZzMkZrXFDSkv+2kXkUgpJ5FQQ5hMcKU=
|
||||||
entgo.io/ent v0.11.7 h1:V+wKFh0jhAbY/FoU+PPbdMOf2Ma5vh07R/IdF+N/nFg=
|
entgo.io/ent v0.11.7 h1:V+wKFh0jhAbY/FoU+PPbdMOf2Ma5vh07R/IdF+N/nFg=
|
||||||
entgo.io/ent v0.11.7/go.mod h1:ericBi6Q8l3wBH1wEIDfKxw7rcQEuRPyBfbIzjtxJ18=
|
entgo.io/ent v0.11.7/go.mod h1:ericBi6Q8l3wBH1wEIDfKxw7rcQEuRPyBfbIzjtxJ18=
|
||||||
|
entgo.io/ent v0.11.8 h1:M/M0QL1CYCUSdqGRXUrXhFYSDRJPsOOrr+RLEej/gyQ=
|
||||||
|
entgo.io/ent v0.11.8/go.mod h1:ericBi6Q8l3wBH1wEIDfKxw7rcQEuRPyBfbIzjtxJ18=
|
||||||
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20OEh60=
|
||||||
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
|
||||||
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
|
||||||
@@ -11,6 +13,8 @@ github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6
|
|||||||
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
|
||||||
github.com/ardanlabs/conf/v3 v3.1.3 h1:16+Nzfc4PBd/ERtYERUFL/75eVKNyW15Y+vn3W1XZzQ=
|
github.com/ardanlabs/conf/v3 v3.1.3 h1:16+Nzfc4PBd/ERtYERUFL/75eVKNyW15Y+vn3W1XZzQ=
|
||||||
github.com/ardanlabs/conf/v3 v3.1.3/go.mod h1:bIacyuGeZjkTdtszdbvOcuq49VhHpV3+IPZ2ewOAK4I=
|
github.com/ardanlabs/conf/v3 v3.1.3/go.mod h1:bIacyuGeZjkTdtszdbvOcuq49VhHpV3+IPZ2ewOAK4I=
|
||||||
|
github.com/ardanlabs/conf/v3 v3.1.4 h1:c0jJYbqHJcrR/uYImbGC1q7quH3DYxH49zGCT7WLJH4=
|
||||||
|
github.com/ardanlabs/conf/v3 v3.1.4/go.mod h1:bIacyuGeZjkTdtszdbvOcuq49VhHpV3+IPZ2ewOAK4I=
|
||||||
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ export interface ItemUpdate {
|
|||||||
soldTime: Date | string;
|
soldTime: Date | string;
|
||||||
soldTo: string;
|
soldTo: string;
|
||||||
warrantyDetails: string;
|
warrantyDetails: string;
|
||||||
|
/** Sold */
|
||||||
warrantyExpires: Date | string;
|
warrantyExpires: Date | string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-vue": "^9.4.0",
|
"eslint-plugin-vue": "^9.4.0",
|
||||||
"isomorphic-fetch": "^3.0.0",
|
"isomorphic-fetch": "^3.0.0",
|
||||||
"nuxt": "3.1.1",
|
"nuxt": "3.2.0",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.8.3",
|
||||||
"vite-plugin-eslint": "^1.8.1",
|
"vite-plugin-eslint": "^1.8.1",
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"autoprefixer": "^10.4.8",
|
"autoprefixer": "^10.4.8",
|
||||||
"chart.js": "^4.0.1",
|
"chart.js": "^4.0.1",
|
||||||
"daisyui": "^2.24.0",
|
"daisyui": "^2.24.0",
|
||||||
"dompurify": "^2.4.1",
|
"dompurify": "^3.0.0",
|
||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
"pinia": "^2.0.21",
|
"pinia": "^2.0.21",
|
||||||
"postcss": "^8.4.16",
|
"postcss": "^8.4.16",
|
||||||
|
|||||||
@@ -212,14 +212,22 @@
|
|||||||
</form>
|
</form>
|
||||||
</Transition>
|
</Transition>
|
||||||
<div class="text-center mt-6">
|
<div class="text-center mt-6">
|
||||||
<button
|
<BaseButton
|
||||||
v-if="status && status.allowRegistration"
|
v-if="status && status.allowRegistration"
|
||||||
class="btn text-base-content text-lg hover:bg-primary hover:text-primary-content transition-colors duration-200"
|
class="btn-primary btn-wide"
|
||||||
@click="() => toggleLogin()"
|
@click="() => toggleLogin()"
|
||||||
>
|
>
|
||||||
|
<template #icon>
|
||||||
|
<Icon v-if="!registerForm" name="mdi-account-plus-outline" class="w-5 h-5 swap-off" />
|
||||||
|
<Icon v-else name="mdi-login" class="w-5 h-5 swap-off" />
|
||||||
|
<Icon name="mdi-arrow-right" class="w-5 h-5 swap-on" />
|
||||||
|
</template>
|
||||||
{{ registerForm ? "Login" : "Register" }}
|
{{ registerForm ? "Login" : "Register" }}
|
||||||
</button>
|
</BaseButton>
|
||||||
<p v-else class="text-base-content italic text-sm">Registration Disabled</p>
|
<p v-else class="text-base-content italic text-sm inline-flex items-center gap-2">
|
||||||
|
<Icon name="mdi-lock" class="w-4 h-4 inline-block" />
|
||||||
|
Registration Disabled
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
825
frontend/pnpm-lock.yaml
generated
825
frontend/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -6,12 +6,23 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
)
|
)
|
||||||
|
|
||||||
func dateTypes(names []string) map[*regexp.Regexp]string {
|
type ReReplace struct {
|
||||||
result := make(map[*regexp.Regexp]string)
|
Regex *regexp.Regexp
|
||||||
for _, name := range names {
|
Text string
|
||||||
result[regexp.MustCompile(fmt.Sprintf(`%s: string`, name))] = fmt.Sprintf(`%s: Date | string`, name)
|
}
|
||||||
|
|
||||||
|
func NewReReplace(regex string, replace string) ReReplace {
|
||||||
|
return ReReplace{
|
||||||
|
Regex: regexp.MustCompile(regex),
|
||||||
|
Text: replace,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewReDate(dateStr string) ReReplace {
|
||||||
|
return ReReplace{
|
||||||
|
Regex: regexp.MustCompile(fmt.Sprintf(`%s: string`, dateStr)),
|
||||||
|
Text: fmt.Sprintf(`%s: Date | string`, dateStr),
|
||||||
}
|
}
|
||||||
return result
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@@ -37,29 +48,24 @@ func main() {
|
|||||||
}
|
}
|
||||||
text += string(data)
|
text += string(data)
|
||||||
|
|
||||||
regexReplace := map[*regexp.Regexp]string{
|
replaces := [...]ReReplace{
|
||||||
regexp.MustCompile(` PaginationResultRepo`): " PaginationResult",
|
NewReReplace(` Repo`, " "),
|
||||||
regexp.MustCompile(` Repo`): " ",
|
NewReReplace(` PaginationResultRepo`, " PaginationResult"),
|
||||||
regexp.MustCompile(` Services`): " ",
|
NewReReplace(` Services`, " "),
|
||||||
regexp.MustCompile(` V1`): " ",
|
NewReReplace(` V1`, " "),
|
||||||
regexp.MustCompile(`\?:`): ":",
|
NewReReplace(`\?:`, ":"),
|
||||||
|
NewReDate("createdAt"),
|
||||||
|
NewReDate("updatedAt"),
|
||||||
|
NewReDate("soldTime"),
|
||||||
|
NewReDate("purchaseTime"),
|
||||||
|
NewReDate("warrantyExpires"),
|
||||||
|
NewReDate("expiresAt"),
|
||||||
|
NewReDate("date"),
|
||||||
}
|
}
|
||||||
|
|
||||||
for regex, replace := range dateTypes([]string{
|
for _, replace := range replaces {
|
||||||
"createdAt",
|
fmt.Printf("Replacing '%v' -> '%s'\n", replace.Regex, replace.Text)
|
||||||
"updatedAt",
|
text = replace.Regex.ReplaceAllString(text, replace.Text)
|
||||||
"soldTime",
|
|
||||||
"purchaseTime",
|
|
||||||
"warrantyExpires",
|
|
||||||
"expiresAt",
|
|
||||||
"date",
|
|
||||||
}) {
|
|
||||||
regexReplace[regex] = replace
|
|
||||||
}
|
|
||||||
|
|
||||||
for regex, replace := range regexReplace {
|
|
||||||
fmt.Printf("Replacing '%v' -> '%s'\n", regex, replace)
|
|
||||||
text = regex.ReplaceAllString(text, replace)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
err = os.WriteFile(path, []byte(text), 0644)
|
err = os.WriteFile(path, []byte(text), 0644)
|
||||||
|
|||||||
Reference in New Issue
Block a user