diff options
| author | 2022-08-30 05:44:39 -0400 | |
|---|---|---|
| committer | 2022-08-30 11:44:39 +0200 | |
| commit | ea902bb500f03ac6c2616bc94d3da3563763cf26 (patch) | |
| tree | 51dc03ef0c1bae14a70f0dfbea2a13896f4ce789 /web | |
| parent | [bugfix] Do not generate a notification when favouriting your own post (#780) (diff) | |
| download | gotosocial-ea902bb500f03ac6c2616bc94d3da3563763cf26.tar.xz | |
[Admin panel] Make Description boxes multi-line (#781)
Diffstat (limited to 'web')
| -rw-r--r-- | web/source/panels/admin/settings.js | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/web/source/panels/admin/settings.js b/web/source/panels/admin/settings.js index 2a10951a7..c9f470464 100644 --- a/web/source/panels/admin/settings.js +++ b/web/source/panels/admin/settings.js @@ -85,6 +85,7 @@ function editableObject(obj, path=[]) {  	const hiddenKeys = ["contact_account_", "urls"];  	const explicitShownKeys = ["contact_account_username"];  	const implementedKeys = "title, contact_account_username, email, short_description, description, terms, avatar, header".split(", "); +	const textareaKeys = ["short_description", "description"]  	let listing = Object.entries(obj).map(([key, val]) => {  		let fullkey = [...path, key].join("_"); @@ -155,11 +156,17 @@ function editableObject(obj, path=[]) {  			}  		} +		let field; +		if (textareaKeys.includes(fullkey)) { +			field = <textarea className={isImplemented} ref={setRef} {...inputProps}></textarea> +		} else { +			field = <input className={isImplemented} ref={setRef} {...inputProps} /> +		}  		return (  			<React.Fragment key={fullkey}>  				<label htmlFor={key} className="capitalize">{label}</label>  				<div className={isImplemented}> -					<input className={isImplemented} ref={setRef} {...inputProps} /> +					{field}  				</div>  			</React.Fragment>  		); | 
