mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: The application cannot be embedded (#1931)
This commit is contained in:
parent
c6f821ce53
commit
17616205b9
|
|
@ -279,7 +279,8 @@ class ApplicationSerializer(serializers.Serializer):
|
|||
'x_type': float_location.get('x', {}).get('type', 'right'),
|
||||
'x_value': float_location.get('x', {}).get('value', 0),
|
||||
'y_type': float_location.get('y', {}).get('type', 'bottom'),
|
||||
'y_value': float_location.get('y', {}).get('value', 30)}))
|
||||
'y_value': float_location.get('y', {}).get('value', 30),
|
||||
'max_kb_id': str(uuid.uuid1()).replace('-', '')}))
|
||||
response = HttpResponse(s, status=200, headers={'Content-Type': 'text/javascript'})
|
||||
return response
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ const initChat=(root)=>{
|
|||
function initMaxkb(){
|
||||
const maxkb=document.createElement('div')
|
||||
const root=document.createElement('div')
|
||||
const maxkbId = 'maxkb-'+crypto.randomUUID().split('-')[0]
|
||||
const maxkbId = 'maxkb-'+'{{max_kb_id}}'
|
||||
root.id=maxkbId
|
||||
initMaxkbStyle(maxkb, maxkbId)
|
||||
maxkb.appendChild(root)
|
||||
|
|
|
|||
Loading…
Reference in New Issue