Compare commits

...

2 Commits

Author SHA1 Message Date
vilmibm 1ca0893c2e minor 2023-03-16 21:38:54 +00:00
vilmibm ccc357591e fix SignupURL in stats 2023-03-16 07:09:28 +00:00
4 changed files with 21 additions and 8 deletions

View File

@ -8,11 +8,15 @@ commands:
- `request` (invokved on town as `town request-gitea` or `town request-gemini`), a helper command for requesting certain featuers be enabled for your town account
- `stats` (invoked as `town stats`), a command that prints out information about the town and its users in JSON.
- `visit` an experimental command for "visiting" a user.
- `signup` command that powers `ssh join@tilde.town`
- `welcome` command that powers `ssh welcome@tilde.town`
- `review` a TUI for town admins to review signups
There are also sundry helpers and scripts under `cmd/`.
A lot of this behavior (for example, `stats`) is exposed as a library. if you want to make some stuff for town and want to work in Go feel free to import this and use it.
## TODO
- [ ] expose `stats` as a library
- [ ] add a command for contributing scripts to the launcher's index
- [ ] consider bringing the launcher's index of commands into this git repo so it can be tracked
- [ ] add a Makefile

View File

@ -233,6 +233,9 @@ func _main() error {
reviewForm.AddButton("submit", func() {
currSignup := signups[signupIx]
cleanEmail := reviewForm.GetFormItemByLabel("clean email").(*tview.InputField).GetText()
defer func() {
cleanEmailInput.SetText("")
}()
currSignup.CleanEmail = cleanEmail
decision := models.SignupRejected
@ -338,8 +341,14 @@ func _main() error {
}
emailVal := signups[signupIx].Email
providedEmailView.SetText(emailVal)
cleanEmailInput.SetPlaceholder(
strings.TrimSpace(strings.ReplaceAll(emailVal, "\n", " ")))
/*
TODO the placeholder doesn't appear to become the default text which is
what I wanted it to do. Just taking this out so the blank box beckons
input. Also, it seems like the AcceptanceFunc didn't work since a blank
value got through.
cleanEmailInput.SetPlaceholder(
strings.TrimSpace(strings.ReplaceAll(emailVal, "\n", " ")))
*/
decisionFI.SetCurrentOption(1)
pages.SwitchToPage("review")
app.SetFocus(cleanEmailInput)

View File

@ -1,6 +1,6 @@
# townstats
This program dumps information about tilde.town in the [Tilde Data Protocol](http://protocol.club/~datagrok/beta-wiki/tdp.html).
Code for dumping information about tilde.town in the [Tilde Data Protocol](http://protocol.club/~datagrok/beta-wiki/tdp.html).
# author
@ -8,4 +8,4 @@ vilmibm, based on python work by [datagrok](https://datagrok.org)
# license
gplv3+
gplv3+

View File

@ -318,7 +318,7 @@ func Stats() (TildeData, error) {
return TildeData{
Name: "tilde.town",
URL: "https://tilde.town",
SignupURL: "https://cgi.tilde.town/users/signup",
SignupURL: "https://tilde.town/signup",
WantUsers: true,
AdminEmail: "root@tilde.town",
Description: description,