* [task#149200] process the display of AI buttons.
This commit is contained in:
@@ -1356,7 +1356,6 @@ $(document).ready(
|
||||
|
||||
allAppsItemsMap.set(item.code, item);
|
||||
}
|
||||
if(!canConverse) $('.ai-panel-root').remove();
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user