mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add in debug pop up
This commit is contained in:
parent
767b220fab
commit
cc522f5d07
3 changed files with 39 additions and 0 deletions
|
@ -430,6 +430,10 @@
|
||||||
div
|
div
|
||||||
a(href="#", title='Show Hot Keys List')#hotkeysLink Hot keys
|
a(href="#", title='Show Hot Keys List')#hotkeysLink Hot keys
|
||||||
|
|
||||||
|
script(type='text/template')#DebugLinkTemplate
|
||||||
|
div
|
||||||
|
a(href="#", title='Show Debug Information')#debugLink Debug
|
||||||
|
|
||||||
script(type='text/template')#trackChangesPanelTemplate
|
script(type='text/template')#trackChangesPanelTemplate
|
||||||
#trackChangesPanel
|
#trackChangesPanel
|
||||||
.track-changes-side-bar
|
.track-changes-side-bar
|
||||||
|
|
32
services/web/public/coffee/debug/DebugManager.coffee
Normal file
32
services/web/public/coffee/debug/DebugManager.coffee
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
define [
|
||||||
|
"utils/Modal"
|
||||||
|
], (Modal) ->
|
||||||
|
class DebugManager
|
||||||
|
template: $("#DebugLinkTemplate").html()
|
||||||
|
|
||||||
|
constructor: (@ide) ->
|
||||||
|
@$el = $(@template)
|
||||||
|
$("#toolbar-footer").append(@$el)
|
||||||
|
@$el.on "click", (e) =>
|
||||||
|
e.preventDefault()
|
||||||
|
@showDebugModal()
|
||||||
|
|
||||||
|
showDebugModal: () ->
|
||||||
|
useragent = navigator.userAgent
|
||||||
|
server_id = document.cookie.match(/SERVERID=([^;]*)/)?[1]
|
||||||
|
transport = @ide.socket.socket.transport.name
|
||||||
|
|
||||||
|
new Modal(
|
||||||
|
title: "Debug info"
|
||||||
|
message: """
|
||||||
|
Please give this information to the ShareLaTeX team:
|
||||||
|
<p><pre>
|
||||||
|
user-agent: #{useragent}
|
||||||
|
server-id: #{server_id}
|
||||||
|
transport: #{transport}
|
||||||
|
</pre></p>
|
||||||
|
"""
|
||||||
|
buttons: [
|
||||||
|
text: "OK"
|
||||||
|
]
|
||||||
|
)
|
|
@ -26,6 +26,7 @@ define [
|
||||||
"tour/IdeTour"
|
"tour/IdeTour"
|
||||||
"analytics/AnalyticsManager"
|
"analytics/AnalyticsManager"
|
||||||
"track-changes/TrackChangesManager"
|
"track-changes/TrackChangesManager"
|
||||||
|
"debug/DebugManager"
|
||||||
"ace/ace"
|
"ace/ace"
|
||||||
"libs/jquery.color"
|
"libs/jquery.color"
|
||||||
"libs/jquery-layout"
|
"libs/jquery-layout"
|
||||||
|
@ -59,6 +60,7 @@ define [
|
||||||
IdeTour,
|
IdeTour,
|
||||||
AnalyticsManager,
|
AnalyticsManager,
|
||||||
TrackChangesManager
|
TrackChangesManager
|
||||||
|
DebugManager
|
||||||
) ->
|
) ->
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,6 +196,7 @@ define [
|
||||||
ide.hotkeysManager = new HotkeysManager ide
|
ide.hotkeysManager = new HotkeysManager ide
|
||||||
ide.layoutManager.resizeAllSplitters()
|
ide.layoutManager.resizeAllSplitters()
|
||||||
ide.tourManager = new IdeTour ide
|
ide.tourManager = new IdeTour ide
|
||||||
|
ide.debugManager = new DebugManager(ide)
|
||||||
|
|
||||||
ide.savingAreaManager =
|
ide.savingAreaManager =
|
||||||
$savingArea : $('#saving-area')
|
$savingArea : $('#saving-area')
|
||||||
|
|
Loading…
Reference in a new issue