From 958773bdfc7c71bf4e8a93bf32ea853e38c8c2cd Mon Sep 17 00:00:00 2001 From: wangzemei Date: Thu, 11 Sep 2025 15:47:22 +0800 Subject: [PATCH] * [task#149200] process the display of AI buttons. --- module/index/js/index.ui.js | 1 - module/index/ui/index.html.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/module/index/js/index.ui.js b/module/index/js/index.ui.js index b1298a36f5..c8c33af72c 100644 --- a/module/index/js/index.ui.js +++ b/module/index/js/index.ui.js @@ -1356,7 +1356,6 @@ $(document).ready( allAppsItemsMap.set(item.code, item); } - if(!canConverse) $('.ai-panel-root').remove(); } ); diff --git a/module/index/ui/index.html.php b/module/index/ui/index.html.php index ea319d8c57..1b80b8dbd5 100644 --- a/module/index/ui/index.html.php +++ b/module/index/ui/index.html.php @@ -221,12 +221,12 @@ div /* Inject zai config to index page. */ if($zaiConfig && !empty($zaiConfig->host) && !empty($zaiConfig->token)) { + if(!hasPriv('aiapp', 'conversation')) $zaiConfig->privs = 'disable-all'; to::head ( h::js('window.zai = ' . js::value($zaiConfig) . ';'), h::importJs($app->getWebRoot() . 'js/zui3/ai.js', setID('aiJS')) ); - jsVar('canConverse', hasPriv('aiapp', 'conversation')); } /**