sharing and UX improvements

This commit is contained in:
glmdev
2019-06-23 12:17:35 -05:00
parent 1bd6ad1830
commit 2a80e65c35
14 changed files with 473 additions and 56 deletions

View File

@@ -0,0 +1,15 @@
extends ./template
block content
p
| These code snippets are designed to be included in-line. You can store outputs using the
code out()
| function. Then, call the
code breakpoint()
| function to send those outputs to DevBug.
p
| You'll need to ensure that the DevBug server URL and Project API Key are correct. These are local variables in the
code breakpoint()
| function.
h2 PHP
pre
code #{devbug.code.php}

View File

@@ -17,7 +17,27 @@ block content
ul(style='list-style-type: none; margin: 0; padding: 0;')
li
a.action(href='/dash/v1/project/view/'+project.id) View
li
a.action(href='/dash/v1/project/share/'+project.id) Share
li
a.action(href='/dash/v1/project/delete/'+project.id) Delete
li
a.action(href='/dash/v1/project/edit/'+project.id) Edit
if shared_projects
h3 Projects Shared With Me
table
thead
tr
th(scope='col' style='min-width: 250px') Name
th(scope='col') Actions
tbody
each project in shared_projects
tr
td #{project.name}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
li
a.action(href='/dash/v1/project/view/'+project.id) View
li
a.action(href='/dash/v1/project/share/'+project.id+'/revoke/'+user.uuid) Remove

View File

@@ -1,5 +1,4 @@
extends ./template
block content
pre
code
div #{prettyd}
script(src='/assets/dash_v1.js')
script output(syntaxHighlight(`#{prettyd}`));

View File

@@ -0,0 +1,45 @@
extends ./template
block content
h2 Shared With
table
thead
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.shared
tr
td #{(user.uuid === project.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === project.user_id)
li
a.action(href='/dash/v1/project/share/'+project.id+'/revoke/'+user.uuid) Revoke
li
a.action(href='/dash/v1/project/share/'+project.id+'/transfer/'+user.uuid) Transfer Ownership
else
li
strike Revoke
li
strike Transfer Ownership
br
h2 Share With New User
table
thead
tr
th(scope='col' style='min-width: 250px') Username
th(scope='col') Actions
tbody
each user in sharing.to_share
tr
td #{(user.uuid === project.user_id ? user.username + " (Owner)" : user.username)}
td
ul(style='list-style-type: none; margin: 0; padding: 0;')
if !(user.uuid === project.user_id)
li
a.action(href='/dash/v1/project/share/' + project.id + '/share/'+user.uuid) Share
else
li
strike Share
li
a.action(href='/dash/v1/project/share/' + project.id + '/transfer/' + user.uuid) Transfer Ownership

View File

@@ -2,17 +2,23 @@ html
head
title #{(title ? title+' | DevBug' : 'DevBug Dashboard')}
link(rel='stylesheet' href='/assets/dash_v1.css')
script(src='/assets/dash_v1.js')
body
if title_small
h3 #{(title ? title+' | DevBug' : 'DevBug Dashboard')}
else
h1 #{(title ? title+' | DevBug' : 'DevBug Dashboard')}
ul.navul
li.navli
a.nava(href='/dash/v1') Home
li.navli
a.nava(href='/auth/logout') Logout
if show_back
.page-header
.devbug-header DevBug | v#{devbug.version} #{(user ? " | User: "+user.username : "")} #{(project ? " | Project: "+project.name+" | API: "+project.uuid : "")} #{((_flitter.config('server.environment') === 'development') ? " | Development" : "" )}
if title_small
h3 #{(title ? title : 'Dashboard')}
else
h1 #{(title ? title : 'Dashboard')}
ul.navul
li.navli
a.nava(href='javascript:window.history.back()') Back
block content
a.nava(href='/dash/v1') Home
li.navli
a.nava(href='/dash/v1/code') Code Snippets
li.navli
a.nava(href='/auth/logout') Logout
if show_back
li.navli
a.nava(href='javascript:window.history.back()') Back
.spacer
block content

View File

@@ -17,4 +17,4 @@ block content
li
a.action(href='/dash/v1/out/view/'+out.id) View
li
a.action(href='/dash/v1/out/delete/'+out.id) Delete
a.action(href='/dash/v1/out/delete/'+out.id+'/'+project.id) Delete