Pictures in Posts now works!

This commit is contained in:
2026-02-23 22:41:59 -07:00
parent c4cecbc8a9
commit 110e917921
12 changed files with 193 additions and 46 deletions
+43 -1
View File
@@ -1,6 +1,6 @@
/*
* Amsterdam Web Communities System
* Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
* Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34,6 +34,12 @@ var ENOACCOUNT error = errors.New("you cannot create a new account while logged
func LoginForm(ctxt ui.AmContext) (string, any) {
// Get target URI.
target := ctxt.Parameter("tgt")
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}
@@ -63,6 +69,12 @@ func Login(ctxt ui.AmContext) (string, any) {
if err == nil {
dlg.LoadFromForm(ctxt)
target := dlg.Field("tgt").Value
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}
@@ -166,6 +178,12 @@ func Logout(ctxt ui.AmContext) (string, any) {
func VerifyEmailForm(ctxt ui.AmContext) (string, any) {
// Get target URI.
target := ctxt.Parameter("tgt")
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}
@@ -222,6 +240,12 @@ func VerifyEMail(ctxt ui.AmContext) (string, any) {
if err == nil {
dlg.LoadFromForm(ctxt)
target := dlg.Field("tgt").Value
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}
@@ -276,6 +300,12 @@ func VerifyEMail(ctxt ui.AmContext) (string, any) {
func NewAccountUserAgreement(ctxt ui.AmContext) (string, any) {
// Get target URI.
target := ctxt.Parameter("tgt")
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}
@@ -302,6 +332,12 @@ func NewAccountUserAgreement(ctxt ui.AmContext) (string, any) {
func NewAccountForm(ctxt ui.AmContext) (string, any) {
// Get target URI.
target := ctxt.Parameter("tgt")
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}
@@ -337,6 +373,12 @@ func NewAccount(ctxt ui.AmContext) (string, any) {
if err == nil {
dlg.LoadFromForm(ctxt)
target := dlg.Field("tgt").Value
if target == "" {
v := ctxt.GetSession("lastKnownGood")
if v != nil {
target = v.(string)
}
}
if target == "" {
target = "/"
}