Commit graph

100 commits

Author SHA1 Message Date
Max
621290d578 Enhance guard handling and template configuration merging
- Update the OAuth guard to prevent automatic response writing on failure, allowing for custom error handling.
- Introduce a mechanism to register default guard redirects from template configurations, improving guard management.
- Refactor the page configuration merging process to prioritize page-specific settings while allowing inheritance from templates.
- Ensure guards can be explicitly disabled in page configurations, enhancing flexibility in guard application.
2026-02-15 16:34:31 +08:00
Max
d598394337 Update asset metadata timestamps and enhance translation handling
- Update timestamps in `bindata.go` for various asset files to reflect recent modifications.
- Modify translation handling in `parser.go` to merge messages from YAML locale files with script messages, ensuring all translation keys are available at runtime.
- Refactor `writeLocaleFiles` in `page.go` to accept a build context, allowing for better integration of script translations during the build process.
2026-02-12 19:06:56 +08:00
Max
ef63718941 Enhance Attachment Process with Plain Text and UTF-8 Support
- Added tests for saving plain text and Chinese text directly, ensuring proper handling of content without data URI encoding.
- Updated the `parseDataURI` function to support plain text storage, returning the correct content type and data bytes.
- Improved the `getAssistants` method to support nested assistants, enhancing directory scanning for assistant pages.
- Refactored the `Page` method to accommodate assistant IDs with nested structures, improving route handling for pages.
2026-01-25 17:32:50 +08:00
Max
0825e06dbe Implement Multi-Directory Watching and Enhance Locale File Handling
- Introduced the IWatchDirs interface to support watching multiple directories for changes, allowing templates to specify directories dynamically.
- Updated the watch command to handle multiple directories and display watched directories in the output.
- Added functionality to write locale files from a page's __locales directory to the public directory, improving localization support.
- Enhanced error handling during directory watching and locale file processing for better reliability and logging.
2026-01-03 14:39:57 +08:00
Max
097fb73416 Refactor SUI Command Arguments and Enhance Default Template Handling
- Updated the `build` and `watch` commands to accept a single argument for `<sui>` and made the `<template>` argument optional, improving usability.
- Introduced a default template assignment for the `agent` SUI, ensuring a more intuitive setup for users.
- Enhanced error messages for command usage to provide clearer guidance on expected input format.
- Added new OpenAPI file to the bindata, improving the framework's capabilities for API integration.
2026-01-01 10:28:45 +08:00
Max
77efc03582 feat: Enhance global build context and component handling
- Update NewGlobalBuildContext to accept a template parameter for improved context management.
- Refactor component handling in Compile method to include JIT components, enhancing dynamic component loading.
- Modify TemplateRender to utilize the updated global context, improving template processing.
- Adjust component attribute parsing to use "s:route" for better clarity in component identification.
2025-04-23 16:08:10 +08:00
Max
07353d0084 Add s:route attribute to real time render components 2024-09-03 17:40:31 +08:00
Max
80779bb0fc [feat] add SUI template.render process 2024-08-10 16:58:38 +08:00
Max
d170ab6e53 Optimize $backend function call 2024-08-04 11:40:15 +08:00
Max
6f1f558ecd feat: Add source map URL to libsui.min.js for better debugging 2024-08-03 17:08:38 +08:00
Max
5f5af44018 Optimize libsui js-sdk loading logic 2024-08-03 08:37:54 +08:00
Max
44eb60377d Update file extensions for backend scripts 2024-08-01 18:43:15 +08:00
Max
a91e47b072 Refactor template build tests to use advanced template in sui/storages/local/build_test.go 2024-07-29 13:56:55 +08:00
Max
fe247d1e28 Refactor SUI core to load backend scripts for templates 2024-07-25 16:10:21 +08:00
Max
58ca39a32b [feat] Sharing the Constants variable between frontend and backend scripts 2024-07-25 15:37:23 +08:00
Max
9418133b32 Refactor SUI core to load backend scripts for templates 2024-07-25 10:10:54 +08:00
Max
a8c37e78a4 Refactor page test to check for minimum number of pages and children 2024-07-24 17:04:25 +08:00
Max
1257337765 fix error handling in SUI core tests 2024-07-24 08:26:24 +08:00
Max
47064422a9 Optimize error handling in SUI core build and compile functions 2024-07-24 08:15:50 +08:00
Max
bafe3bb20f Refactor event binding logic in SUI core 2024-07-20 09:44:58 +08:00
Max
af3a8a4ac4 Refactor locale file writing logic in SUI page 2024-07-19 08:21:59 +08:00
Max
8e8a0ac885 Fix trans passing bug in SUI components 2024-07-19 07:20:57 +08:00
Max
49c66870f8 Refactor copySlots method to remove unnecessary context parameter 2024-07-18 18:45:38 +08:00
Max
11a66d0aed [feat] SUI i18n client-side script support 2024-07-17 17:59:09 +08:00
Max
f6a94fdba3 [feat] sui i18n direction, timezone and format support 2024-07-17 16:23:53 +08:00
Max
1005556c2f optimize SUI page writeLocaleSource and writeLocaleFiles logic 2024-07-17 09:16:11 +08:00
Max
61f297b3dc optimize SUI page writeLocaleSource and writeLocaleFiles logic 2024-07-17 08:25:52 +08:00
Max
b85e5eecd8 Fix the bug in the SUI language pack path 2024-07-15 16:57:28 +08:00
Max
931394b36b feat: Add yao sui trans command for automatic translation support 2024-07-15 10:15:05 +08:00
Max
ef8b8027cf [add] sui.trans.all and sui.trans.page to support automatic translation 2024-07-15 09:24:44 +08:00
Max
61205ced5f refactor i18n support 2024-07-11 20:20:36 +08:00
Max
da955f2c48 fix sui GlobRoutes bug and add s:click support 2024-07-11 09:38:58 +08:00
Max
8dd5f02a7b feat: output warning messages during sui page build 2024-07-09 05:56:29 +08:00
Max
31cf9061e8 fix SUI test cases 2024-07-08 10:45:11 +08:00
Max
ffb858b76f refactor: Update parsing logic for JIT components 2024-07-08 10:31:35 +08:00
Max
b4ed405e4e optimize sui page injection script 2024-07-07 22:34:10 +08:00
Max
6542c6e46b refactor: optimize the SUI page compiler 2024-07-06 21:24:36 +08:00
Max
4f3f83523a chore: Update local build test to remove files before building 2024-07-05 17:05:15 +08:00
Max
cf45040a1c feat: Add and optimize SUI CompileAsComponent support 2024-07-05 16:19:57 +08:00
Max
a435b1ad6e [chore] Update sui test cases 2024-07-04 17:06:42 +08:00
Max
671a6b409e refactor: Update go.mod dependencies to latest versions 2024-07-04 03:12:30 +08:00
Max
28537e2163 [add] Support for JIT mode in SUI component imports ( dev ) 2024-07-02 20:40:35 +08:00
Max
6fa9eb51ab refactor: Update SUI page build process to execute before and after build scripts 2024-06-29 21:38:40 +08:00
Max
c01b4ccb97 refactor: Improve SUI page build performance by adding script execution time measurement 2024-06-29 20:44:48 +08:00
Max
7db3940914 refactor: Update code to support translation attributes and nodes 2024-06-28 16:20:57 +08:00
Max
6dcd704ea4 [add] Configuring SUI page caching to optimize static page loading speed 2024-06-27 20:02:03 +08:00
Max
6ff2ad2ead [add] Generating language packs during SUI compilation 2024-06-27 17:15:36 +08:00
Max
72d88cddc4 Remove redundant code for syncing asset files 2024-03-13 20:16:13 +08:00
Max
76b78e2102 [add] sui.sync.assetfile process 2024-03-13 19:39:53 +08:00
Max
b82f6f6029 Refactor build process and add data parameter to BuildOption 2024-02-28 21:21:56 +08:00