add back to project button; pre-filled inline snippets from projects
This commit is contained in:
@@ -2,4 +2,4 @@ extends ./template
|
||||
block content
|
||||
p #{text}
|
||||
form(method='post' action=destination)
|
||||
button(type='submit') Yes, I'm sure.
|
||||
button.btn(type='submit') Yes, I'm sure.
|
||||
@@ -26,8 +26,11 @@ html
|
||||
a#navbar-usage(href='/dash/v1/using_devbug/main') Using DevBug
|
||||
li.navbar-right
|
||||
a#navbar-logout(href='/auth/logout') Logout
|
||||
if show_back
|
||||
if show_back && (!project || window_back)
|
||||
li.navbar-right
|
||||
a#navbar-back(href='javascript:window.history.back()') Back
|
||||
else if show_back && project
|
||||
li.navbar-right
|
||||
a#navbar-back(href='/dash/v1/project/view/'+project.id) Back to Project
|
||||
script(src="/assets/dash_v1.js")
|
||||
block scripts
|
||||
|
||||
17
app/views/dash_v1/in_editor.pug
Normal file
17
app/views/dash_v1/in_editor.pug
Normal file
@@ -0,0 +1,17 @@
|
||||
extends ./editor_template
|
||||
block content
|
||||
pre#editor #{ editor_code ? editor_code : '' }
|
||||
input#preset_mode(type='hidden' value=editor_lang ? editor_lang : 'ace/mode/text')
|
||||
block scripts
|
||||
script(src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.5/ace.js")
|
||||
script.
|
||||
const readonly = #{!!readonly}
|
||||
const preset_mode = document.getElementById('preset_mode').value
|
||||
const editor = ace.edit('editor');
|
||||
editor.setTheme(window.devbug_editor_theme);
|
||||
console.log('preset mode: ', preset_mode);
|
||||
editor.session.setMode(preset_mode);
|
||||
|
||||
if ( readonly ){
|
||||
editor.setOption('readOnly', true)
|
||||
}
|
||||
@@ -17,9 +17,12 @@ html
|
||||
block navbar-left
|
||||
li.navbar-right
|
||||
a#navbar-logout(href='/auth/logout') Logout
|
||||
if show_back
|
||||
if show_back && (!project || window_back)
|
||||
li.navbar-right
|
||||
a#navbar-back(href='javascript:window.history.back()') Back
|
||||
else if show_back && project
|
||||
li.navbar-right
|
||||
a#navbar-back(href='/dash/v1/project/view/'+project.id) Back to Project
|
||||
block navbar-right
|
||||
.content
|
||||
block content
|
||||
|
||||
@@ -2,6 +2,21 @@ extends ./template
|
||||
block content
|
||||
h3 Project API Key: #{project.uuid}
|
||||
|
||||
h2 Inline Helpers
|
||||
p You can use the links below to generate inline helper scripts which are pre-configured for this project.
|
||||
ul(style='list-style-type: none; margin: 0; padding: 0;')
|
||||
li.action-li
|
||||
a.btn(href=project.id+'/inline/node') Node.js
|
||||
//li.action-li
|
||||
// a.btn(href=project.id+'/inline/ecma') JavaScript (Web)
|
||||
li.action-li
|
||||
a.btn(href=project.id+'/inline/php') PHP
|
||||
//li.action-li
|
||||
// a.btn(href=project.id+'/inline/api') DevBug API
|
||||
|
||||
br
|
||||
br
|
||||
|
||||
h2 Code Snippets
|
||||
a.btn(href='/dash/v1/project/snippet/'+project.id+'/new') +
|
||||
table
|
||||
|
||||
Reference in New Issue
Block a user