Web: Script Review #2
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: StrafesNET/maps-service#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The website needs a script review webpage, only to be used by me personally, so it doesn't need to be fancy.
How does script review work?
Resources
GET /script-policy?Page=1&Limit=1&Policy=0
.GET /script-policy
request returns a ScriptPolicy which is displayed in an editable text box, potentially with Lua syntax highlighting. The page is a form for updating the "None" ScriptPolicy with a different policy. The available policies are:Quaternions selects a policy from the radio menu, and clicks submit. If the policy selection is "Replace", a new Script will need to be created with
POST /scripts
, before updating the script policy, including ToScriptID.POST /scripts
which returns the ScriptID of the newly created script. Then, update the policy withPOST /script-policy/{ScriptPolicyID}
using theScriptPolicyUpdate
openapi data structure. Include the fields"Policy":4
(Replace) and"ToScriptID":ScriptID
.ScriptPolicyUpdate
isPolicy
.Bonus points:
Some useful packages for the web development process to keep in mind that would help with this,
Syntax highlighting, line numbers, and editing
https://shiki.matsu.io/ (Luau supported)
https://highlightjs.org/
https://microsoft.github.io/monaco-editor/ (Vscode base)
Diff viewer
https://github.com/praneshr/react-diff-viewer