File tree Expand file tree Collapse file tree 3 files changed +20
-17
lines changed
Expand file tree Collapse file tree 3 files changed +20
-17
lines changed Original file line number Diff line number Diff line change 55 import Projects from ' ./Projects.svelte' ;
66 import Main from ' ./Main.svelte' ;
77 import Welcome from ' ./Welcome.svelte' ;
8+ import Remove from ' ./Remove.svelte' ;
89
910 export let status;
1011
6465 {#if status .currentProject }
6566 <Lock {status }></Lock >
6667 {/if }
68+
6769 <Projects {status }></Projects >
70+
71+ {#if status .currentProject }
72+ <Remove {status }></Remove >
73+ {/if }
6874 </aside >
6975
7076 {/if }
Original file line number Diff line number Diff line change 1+ <script >
2+ export let status;
3+ </script >
4+
5+ <form action ="./ {status .currentProject .name }/remove" method =" post" class =" sidebar-section bg-light p-3 mb-3" >
6+ <h4 >Remove project</h4 >
7+
8+ <p >Please lock this project in order to remove.</p >
9+
10+ <button class ="btn btn-danger" disabled ={! status .currentProject .lock || status .currentProject .lock .user !== status .currentUser }>
11+ ☠ Remove this project
12+ </button >
13+ </form >
Original file line number Diff line number Diff line change 1616 <button class =" btn btn-success" type =" submit" >git clone</button >
1717 </span >
1818 </div >
19- </form >
20-
21- {#if status .allProjects .length > 0 }
22- <h3 class =" p-1" >Remove a project</h3 >
23-
24- <table class =" table table-striped" >
25- {#each status .allProjects as project }
26- <tr >
27- <td >
28- <form action ="./ {project .name }/remove" method =" post" class =" form-inline" >
29- <button class ="btn btn-sm btn-outline-danger confirm" data-confirm-text ="Are you sure to remove {project .name }?" >{project .name }</button >
30- </form >
31- </td >
32- </tr >
33- {/each }
34- </table >
35- {/if }
19+ </form >
You can’t perform that action at this time.
0 commit comments