Commit Graph

234 Commits

Author SHA1 Message Date
wolfcode
963febc15c feat(admin): 新增弹框是否允许在新标签页中打开 add option to open iframe in new tab
- Add 'iframe_open_top' configuration to admin site settings
- Implement functionality to open iframe in new tab if configured
- Update admin layout to include new configuration option
- Modify easy-admin.js to support new tab opening for iframes

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
v8.0.2
2024-10-21 16:27:48 +08:00
wolfcode
f78edd2fd5 refactor(css): simplify table styles and remove redundant code
- Remove duplicate styles for .layui-table-tool
- Delete unused styles for .layui-table-view and .layui-table-box
- Simplify border styles for light and dark themes- Remove unnecessary padding and positioning styles- Improve readability of table header text

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-16 22:21:20 +08:00
wolfcode
83aa399f95 feat(easy-admin): prevent rapid form submission
Add a mechanism to handle quick consecutive form submissions by displaying a message when a user tries to submit the form before the previous submission is completed. This
update introduces a wait period during which subsequent submissions are prevented,
enhancing the user experience and preventing potential errors.

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-16 11:05:26 +08:00
wolfcode
3096aa8985 🚀Layui v2.9.18 2024-10-15 11:08:50 +08:00
wolfcode
c7f7ca9af7 Update README.md 2024-10-14 18:00:48 +08:00
wolfcode
352484c69e fix(layout): adjust column layout for better responsiveness
Changed the column layout in both goods add and edit pages to ensure better responsiveness across different screen sizes. The left column is now fixed at 5 units, while the right column is set to 12 units for improved flexibility on smaller screens.

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-14 17:31:51 +08:00
wolfcode
dfe15f7e88 feat(admin): 新增过滤不需要记录后台日志的方法 add ignoreLog property to exclude log recording for specific actions
- Add 'ignoreLog' property to the Log controller to specify actions that should not be logged
- Implement logic in SystemLog middleware to check if the current action is in the ignoreLog list
- Skip logging for actions listed in ignoreLog, improving performance and reducing log clutter

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
v8.0.1
2024-10-12 17:21:56 +08:00
wolfcode
4d7365921e chore(deps): bump wolf-leo/phplogviewer from 0.08.0 to 0.10.0
Update the wolf-leo/phplogviewer package from version 0.08.0 to 0.10.0 in composer.json.
This update may include new features, bug fixes, and performance improvements in the PHP log viewer library.

- Update wolf-leo/phplogviewer from ^0.08.0 to ^0.10.0 in composer.json
- Modify return type of System\Log\record() method to Json|string for improved type hinting

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-12 14:00:14 +08:00
wolfcode
d613f3c26f Update composer.json 2024-10-10 15:01:51 +08:00
wolfcode
74c21d2397 Update public.css v8.0.0 2024-10-09 13:37:46 +08:00
wolfcode
f1d049fc0a Update logviewer.php 2024-10-09 11:12:27 +08:00
wolfcode
a6ec0f143a feat(log): 新增框架日志查看器,integrate log viewer and improve log management
- Add log viewer functionality using wolf-leo/phplogviewer package
- Implement log record feature in admin system
- Update log table to include log record button
- Configure default and common log modules in logviewer config

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-09 10:02:42 +08:00
wolfcode
a1d4aa97d5 feat(log): 新增框架日志查看器,integrate log viewer and improve log management
- Add log viewer functionality using wolf-leo/phplogviewer package
- Implement log record feature in admin system
- Update log table to include log record button
- Configure default and common log modules in logviewer config

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-09 09:51:25 +08:00
wolfcode
4b8e163454 feat(goods): optimize goods add and edit pages
- Adjust layout of goods add and edit forms for better readability- Enhance editor visibility on the right side of the page
- Increase dialog size for adding and editing goods to improve usability

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-07 13:26:49 +08:00
wolfcode
c2762fa2ad feat(goods): optimize goods add and edit pages
- Adjust layout of goods add and edit forms for better readability- Enhance editor visibility on the right side of the page
- Increase dialog size for adding and editing goods to improve usability

Signed-off-by: wolfcode <37436228+wolf-leo@users.noreply.github.com>
2024-10-07 13:07:17 +08:00
wolfcode
de92299a4f Update README.md 2024-09-27 16:59:48 +08:00
wolfcode
a4782ad38e 🚀Layui v2.9.17 2024-09-25 10:05:01 +08:00
wolfcode
36038516e0 fix(SystemLog): limit response content in admin middleware
Implement a limitation on the amount of response content recorded in the system logs
to avoid excessively large entries. The response is now truncated to 3000 characters,
enhancing performance and readability while still capturing essential data.
2024-09-20 09:51:17 +08:00
wolfcode
aeb3b28184 fix(SystemLog): limit response content in admin middleware
Implement a limitation on the amount of response content recorded in the system logs
to avoid excessively large entries. The response is now truncated to 3000 characters,
enhancing performance and readability while still capturing essential data.
2024-09-20 09:49:26 +08:00
wolfcode
cb34bf1758 fix(log): allow text wrapping in table cells
Modified the log table's line style to enable 'word-break: break-all' property, which permits text to break and wrap within table cells. This adjustment addresses the issue
where long strings of text would overflow or extend beyond the cell's boundary, now
ensuring that all content remains neatly contained within the structure of the table.
2024-09-19 16:34:24 +08:00
wolfcode
84f0bdcc77 refactor(admin/middleware): update request type to app\Request
Change the type of the request parameter in middleware handle functions to use
app\Request instead of the plain $request. This update clarifies the expected
request object type for better type checking and autocompletion support.
2024-09-14 17:33:07 +08:00
wolfcode
ef40aa27b7 fix(goods): 添加属性显示与否演示 add visible check for stock button in admin mallImplement a conditional 'visible' attribute for the 'stock' button within the goods
management section of the admin mall interface, ensuring the button only appears
when the goods status is set to 1 (active). This change streamlines the UI by
hiding irrelevant options for inactive goods items.
2024-09-13 10:56:27 +08:00
wolfcode
e69fddd2f7 feat(table): 新增 visible 参数值控制属性显示与否 pass data param to buildOperatHtml for visibility logic
Pass the `data` parameter to the `buildOperatHtml` function to support dynamic visibility checks for table operations. This allows operation visibility to be conditionally determined
based on the provided data.
2024-09-13 10:51:11 +08:00
wolfcode
229c74fbea feat(admin): add DEBUG mode button to welcome page
Display the status of the DEBUG mode on the welcome page with a button that changes color
and text based on the value of `APP_DEBUG` environment variable. Include a grey badge
提示 to prompt users to switch off DEBUG mode in production environments.
2024-09-12 18:38:56 +08:00
wolfcode
336ca82729 feat(search-form): 新增默认关闭搜索表单自动补全功能 add autocomplete control and other improvements
- Add an attribute 'searchTableAutocomplete' to enable/disable form autocomplete.
- Set 'searchTableShow' attribute to control the visibility of the search form.
- Remove redundant form initialization code for a cleaner setup.
2024-09-11 16:46:09 +08:00
wolfcode
5b444f7fc1 fix(admin): remove version param from require.js to use cache
Removed the version parameter from the require.js src attribute to enable browser caching
of the script. This change will improve load times and performance by leveraging cached
versions of the script when users revisit the site.
2024-09-11 09:45:17 +08:00
wolfcode
7375b7cbf0 fix(admin): remove version param from require.js to use cache
Removed the version parameter from the require.js src attribute to enable browser caching
of the script. This change will improve load times and performance by leveraging cached
versions of the script when users revisit the site.
2024-09-11 09:43:44 +08:00
wolfcode
62a3d80fa3 fix(wangEditor): correctly access wangEditor instances
Correct the way wangEditor instances are accessed and stored in the window object. The previous
implementation using `eval` could lead to security risks and is removed in favor of direct
window property access. This change improves code security and reliability by eliminating `eval`
and clarifying the object property name construction.
2024-09-05 09:33:38 +08:00
wolfcode
ea733d0acb feat(admin): 新增 markdown 编辑器支持,integrate EasyMDE markdown editor for admin interface
Introduce the EasyMDE markdown editor into the admin interface, providing enhanced
markdown editing capabilities. This integration caters to users preferring a dedicated
markdown editor with additional features and a streamlined user experience.
2024-09-02 16:09:36 +08:00
wolfcode
857533704e fix(admin-controller): ensure page and limit are integers
Cast page and limit values to integers in AdminController's filter method to prevent
type-related errors. This change guarantees that these parameters are whole numbers,
which is essential for consistent database pagination and filtering operations.
2024-08-27 18:49:26 +08:00
wolfcode
af419ff25b feat(cache): set default cache prefix to 'EA8TP'
To prevent cache data residuals between different versions, the default cache prefix
has been changed from an empty string to 'EA8TP'. This ensures each version's cache
is distinctly separated.

BREAKING CHANGE: The cache prefix 'EA8TP' is now used by default. If your application
depends on the default cache prefix being empty, you will need to explicitly set the
prefix to an empty string.
2024-08-26 18:03:16 +08:00
wolfcode
dcbb944fbf 🚀 Layui v2.9.16 2024-08-26 10:39:44 +08:00
wolfcode
5081a21a0b fix(easy-admin): 表格 toolbar 支持元素传入
The renderToolbar function in easy-admin now checks if the provided data is an object before
attempting to iterate over it. This fix prevents errors when the data parameter is not an object,
ensuring that the function does not break down and correctly returns the provided data.
2024-08-23 17:20:19 +08:00
wolfcode
92c75e52ba feat(admin-view): update welcome page layout and information display
Admin welcome page has been redesigned to improve the layout and readability of displayed
information. Real-time statistics panels have been adjusted with new color schemes, and the
information presentation has been refined with appropriate heading sizes. Additionally, the
page now links to the layui documentation and includes a reminder about the open-source
nature of the framework.

- Redesign the overall layout of the welcome page.
- Refactor real-time statistics panels with updated styles and content.
- Improve the display of quick entry modules.
- Add links to layui documentation and policy reminders.
- Ensure consistent use of spaces and clean up the footer section.
2024-08-22 10:42:30 +08:00
wolfcode
2b7f57cc9f Update echarts.min.js 2024-08-22 10:25:55 +08:00
wolfcode
0708435d91 feat(switch): add 'is_show' to switch field optionsInclude 'is_show' as an option in the switchFields array to enable the use of a switch
component for toggling the visibility of fields in the admin panel's build form.
2024-08-21 14:15:07 +08:00
wolfcode
c3a6118387 fix(admin-config): ensure required JS loads on DOM ready; add error handling
Moved the RequireJS dynamic load of the controller-specific JavaScript to execute upon
the 'load' event of the window, guaranteeing that all required DOM elements are available
before the script execution begins. Also, added error handling to log any require failures
to the console for easier debugging.
2024-08-20 17:41:32 +08:00
wolfcode
d7dcfb95b6 fix(admin-config): ensure required JS loads on DOM ready; add error handling
Moved the RequireJS dynamic load of the controller-specific JavaScript to execute upon
the 'load' event of the window, guaranteeing that all required DOM elements are available
before the script execution begins. Also, added error handling to log any require failures
to the console for easier debugging.
2024-08-20 17:22:54 +08:00
wolfcode
55c4743417 🚀 更新CRUD/CRUD可视化操作,新增支持可视化命令行
Extend the CURD generation functionality to support command line operations, supplementing
the existing visual generation method. This update includes modifications to the admin interface, enabling the system to process both types of CURD generation commands effectively.
2024-08-20 09:40:34 +08:00
wolfcode
f56e3630b6 🚀 Layui v2.9.15 2024-08-20 09:39:31 +08:00
wolfcode
6dfdffeab9 feat(console): add CRUD support and update usage warning
Extend the console command configuration to include 'crud' alongside the existing 'curd'
command for better supporting CRUD operations in the application. Additionally, update the
user warning message to recommend using the visual generation features for CRUD functionality
within the system, indicating that further support for command-line CURD/CRUD will be phased out.Adjust the related fields handling in the Curd command class methods to use 'onlyField' for
consistency with the singular form of field manipulations, and ensure correct method parameter
names are reflected in the relation setup.
2024-08-16 11:32:13 +08:00
wolfcode
ed0e14cb32 fix(admin): use direct IP retrieval for system logs
Direct IP retrieval method has been updated to improve accuracy in the admin system log.
This change involves modifying the IP address retrieval logic from considering the
`HTTP_X_FORWARDED_FOR` header to directly using the `ip()` method, potentially enhancing
the security and reliability of IP logging.
2024-08-12 15:58:23 +08:00
wolfcode
772ffc6328 fix(admin): correct admin login page redirect
After the admin session expires, the system now correctly redirects to the specified admin login URL, addressing the issue where the redirect would
sometimes point to an incorrect path.
2024-08-12 13:57:33 +08:00
wolfcode
c9f65c838e Update Curd.php 2024-08-06 19:49:24 +08:00
wolfcode
7f3a3a85f3 CURD生成器:增强字段类型设置和模板调整
本次更新增强了CURD生成器的字段类型自定义功能,允许开发者通过Web界面设置特定字段的类型,例如忽略字段、下拉字段、单选字段、多选字段、图片字段、多选图片字段、日期字段、日期时间字段和编辑器字段。这些设置会直接影响生成的控制器、模型和视图文件,从而提供更高的灵活性和定制化能力。此外,还对代码模板进行了调整,引入了`$notes`变量来存储字段定义,简化了视图中的脚本处理,并优化了控制器和模型中的代码结构。这些改动旨在改善代码的可读性和可维护性,同时使CURD生成器的使用更加直观和便捷。

通过这次更新,我们希望进一步提升CURD生成器的实用性和用户体验,减少开发者在日常 CRUD操作中重复编写代码的工作量。相关的代码改动包括对`BuildCurd.php`文件的多处调整,以实现新的字段类型设置功能;对`CommonTool.php`的修改,以支持新的数组字符串处理逻辑;对`controller.code`、`curd_generate.js`、`curd_generate.php`、`index.code`和`index.html`等文件的修改,以确保生成的代码与新的设置逻辑兼容,并改善前端交互体验。
2024-07-31 14:47:24 +08:00
wolfcode
c5a091c732 移除Vue实例并优化配置项加载逻辑
删除了`config.js`中的Vue实例创建过程,简化了上传类型的数据绑定。通过直接操作`app.upload_type`来响应上传类型的变化。
2024-07-26 10:20:18 +08:00
wolfcode
4f184abb08 移除Vue实例并优化配置项加载逻辑
删除了`config.js`中的Vue实例创建过程,简化了上传类型的数据绑定。通过直接操作`app.upload_type`来响应上传类型的变化。
2024-07-26 10:08:09 +08:00
wolfcode
1365fd08a0 fix(system/config): correct upload button reference in admin background config
Update the data-upload attribute on the upload button in the admin background
configuration page to correctly reference 'admin_background' instead of
'site_ico', ensuring the button functions as intended when uploading a new
background image.
2024-07-26 09:38:54 +08:00
wolfcode
71aee61345 Merge remote-tracking branch 'origin/main' 2024-07-19 21:14:39 +08:00
wolfcode
efbf557cc0 fix(admin): ensure CheckAuth is enabled for route verification
Enable CheckAuth in the admin route configuration which was previously
commented out, ensuring that node permissions are validated as expected.
2024-07-19 21:14:28 +08:00