fix(plugins): JSON-serialize CallFunctionJSON return values + backward compat Lua args

Root cause: CallFunctionJSON used .String() on Lua return values, which
for tables produces 'table: 0x...' — not valid JSON. Frontend does
JSON.parse() on the result and silently caught the parse error.

Fix:
- runtime.go: convert Lua return value to JSON via luaValueToGo +
  json.Marshal so tables become proper JSON arrays/objects
- main.lua: add backward compat in get_events() and update_event()
  to accept both positional args (start, end) and table params
- CalendarPluginPage.svelte: show errors in UI instead of silent catch;
  restructure template to always show iframe + error overlay
This commit is contained in:
2026-06-08 11:31:18 +08:00
parent fddbd3a98a
commit f769daa617
9 changed files with 61 additions and 25 deletions
+2 -2
View File
@@ -19,8 +19,8 @@
background: #13131f;
}
</style>
<script type="module" crossorigin src="/assets/main-Ch0NvF0Q.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-BdKe9T_7.css">
<script type="module" crossorigin src="/assets/main-BZoJ6Hxg.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-B1PBee3I.css">
</head>
<body>
<div id="app"></div>