0cfcf6b2b220

remove signature image controls from profile settings (v3.0.127)

time
2026-09-29 21:28 UTC · 1 week ago
machine
Junes-MacBook-Pro.local
agent
gpt-6-sol
session
simplify profile settings
parent
419974952a84
3 files package.json+1 −1src/admin/site.ts+0 −15tests/console.test.ts+2 −0
package.json+1 −1
@@ -1,6 +1,6 @@11 {22 	"name": "kepr",3-	"version": "3.0.126",3+	"version": "3.0.127",44 	"private": true,55 	"type": "module",66 	"scripts": {

view file

src/admin/site.ts+0 −15
@@ -108,7 +108,6 @@108108 	fields?: Record<string, string>,109109 ): string {110110 	const profile = (fields?.section ?? c.req.query("section")) === "profile";111-	const signature = setting(ctx.kepr, "signature");112111 	// The support page's box starts from the words it shows today.113112 	const value = (key: string) =>114113 		fields@@ -139,20 +138,6 @@139138 		(fields ? fields.support === "1" : !setting(ctx.kepr, "support_off")) && " checked"140139 	}>141140 show the support page</label>`142-}143-${144-	profile &&145-	html`146-<label class="issues-label" for="signature">signature image147-<span class="muted">(PNG, JPEG or WebP, under 60 KB)</span></label>148-${signature && html`<img class="profile-signature" src="/static/assets/${encodeURIComponent(signature)}" alt="current signature">`}149-<input class="issues-input" id="signature" name="signature" type="file" accept="image/png,image/jpeg,image/webp">150-${151-	signature &&152-	html`<label class="issues-label"><input type="checkbox" name="remove_signature" value="1">153-remove the signature</label>`154-}155-`156141 }157142 <button class="issues-submit" type="submit">save ${profile ? "profile" : "site"}</button>158143 </form>`;

view file

tests/console.test.ts+2 −0
@@ -388,6 +388,8 @@388388 		expect(profile).toContain('aria-label="operator workspace"');389389 		expect(profile).toContain('href="/@ada"');390390 		expect(profile).not.toContain('name="site_name"');391+		expect(profile).not.toContain('name="signature"');392+		expect(profile).not.toContain('name="remove_signature"');391393 		expect(392394 			(393395 				await operator.post("/admin/site", {

view file