Skip to content

Commit 2a0a958

Browse files
committed
settings bio length limit integrations
1 parent 4c7e2eb commit 2a0a958

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

OSL Programs/apps/System/.Install_system.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
"path": "Origin/(A) System/User Applications",
243243
"name": "Settings.osl",
244244
"icon": "c #6fa6eb w 10 square 0 0 5 5 c #111 w 8 square 0 0 5 5 dot 0 0 c #777 w 4 line 0 6 0 -6 line -5 3 5 -3 line 5 3 -5 -3 w 11.5 dot 0 0 w 7 c #111 dot 0 0 w 5 c #6fa6eb dot 0 0",
245-
"version":"14.5"
245+
"version":"14.6"
246246
},
247247
{
248248
"url": "https://origin.mistium.com/OSL%20Programs/apps/System/Calculator.osl",

OSL Programs/apps/System/Settings.osl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,12 +1094,25 @@ def "account" (
10941094
local bio_data = inputs.bio.join("\n")
10951095

10961096
goto w / -2 frame.top - (w / 3) - 70 + scroll_y
1097-
text "Bio (" ++ bio_data.len ++ "/200)" 10 : c#txtc
1097+
local bio_maxSize = 200
1098+
local user_maxSize = user.max_size.toNum()
1099+
if user_maxSize > 10_000_000 (
1100+
bio_maxSize = 1000
1101+
)
1102+
// this is enforced on the server too lol, this is just a display for it
1103+
c txtc
1104+
if bio_data.len > bio_maxSize (
1105+
c #fc3f3f
1106+
)
1107+
text "Bio (" ++ bio_data.len ++ "/" ++ bio_maxSize ++ ")" 10
10981108

10991109
if bio_data != user.bio (
11001110
set_x w / 2 - 10
11011111
icon "save" 0.7
11021112
if onclick (
1113+
if bio_data.len > bio_maxSize (
1114+
say "Bio too long"
1115+
)
11031116
network "update" "bio" inputs.bio.join("\n").strip()
11041117
)
11051118
)

0 commit comments

Comments
 (0)