File tree Expand file tree Collapse file tree 5 files changed +31
-46
lines changed Expand file tree Collapse file tree 5 files changed +31
-46
lines changed Original file line number Diff line number Diff line change 88
88
<p >Created with <code class =" text-theme" >FetchCV</code ></p >
89
89
90
90
</div >
91
- <!-- future settings panel (for use with customizing profile card and accessing account settings) -->
92
- <div class =" settings-toolbar hidden flex fixed bottom-0 w-screen px-0 py-1 bg-zinc-700 border-[1px] border-zinc-700 border-t-zinc-600" >
91
+ </div >
92
+ <!-- future settings panel (for use with customizing profile card and accessing account settings) -->
93
+ <div
94
+ class =" settings-toolbar hidden flex fixed bottom-0 w-screen px-0 py-1 bg-zinc-700 border-[1px] border-zinc-700 border-t-zinc-600" >
93
95
<div class =" absolute bottom-0 -z-10 -left-40 w-[140%] h-full caution-tape" ></div >
94
- <div class =" inline-flex justify-center transition-all p-2 mx-1 shadow-lg bg-zinc-800 border-[1px] border-zinc-700 border-t-zinc-600 rounded-md text-black" >
95
- <span class =" material-symbols-rounded text-private" onclick =" toggleEditMode()" >settings</span >
96
+ <div
97
+ class =" inline-flex justify-center transition-all p-2 mx-1 shadow-lg bg-zinc-800 border-[1px] border-zinc-700 border-t-zinc-600 rounded-md text-black" >
98
+ <span class =" material-symbols-rounded text-private" onclick ="
99
+ window.location.href = window.location.origin + '/edit-profile';
100
+ " >settings</span >
96
101
</div >
97
102
</div >
98
-
99
- </div >
100
103
</body >
101
104
<style >
102
105
p {
112
115
<script src =" /scripts/github/displayData.js" ></script >
113
116
<script src =" /scripts/userProfile.js" ></script >
114
117
<script src =" /scripts/showEditProfile.js" ></script >
115
- </html >
118
+
119
+ </html >
Original file line number Diff line number Diff line change 1
- // functions
2
- function toggleEditMode ( ) {
3
- let editPanel = document . querySelector ( ".edit-controls" ) ;
4
- if ( editPanel ?. classList . contains ( "hidden" ) ) {
5
- editPanel ?. classList . remove ( "hidden" ) ;
6
- prepareEditMode ( ) ;
7
- }
8
- else {
9
- editPanel ?. classList . add ( "hidden" ) ;
10
- }
11
- }
12
-
13
1
function showChangesBanner ( ) {
14
2
let banner = document . querySelector ( ".changes-saved-banner" ) ;
15
3
toggleVisibility ( banner ) ;
Original file line number Diff line number Diff line change 1
1
async function isLoggedIn ( ) {
2
- let loggedIn ;
3
- fetch ( "/is-logged-in" )
4
- . then ( response => {
5
- if ( ! response . ok ) {
6
- throw new Error ( "Network error" ) ;
7
- }
8
- return response . json ( ) ;
9
- } )
10
- . then ( data => {
11
- loggedIn = data . loggedIn ;
12
- } )
13
- . catch ( console . error ) ;
14
- return loggedIn ;
2
+ let loggedIn = "no" ;
3
+ await fetch ( "/is-logged-in" )
4
+ . then ( response => {
5
+ if ( ! response . ok ) {
6
+ throw new Error ( "Network error" ) ;
7
+ }
8
+ return response . json ( ) ;
9
+ } )
10
+ . then ( data => {
11
+ loggedIn = data . loggedIn ;
12
+ } )
13
+ . catch ( error => {
14
+ console . error ( error ) ;
15
+ } ) ;
16
+ return loggedIn
15
17
}
16
18
17
19
async function checkUser ( ) {
Original file line number Diff line number Diff line change 1
- // functions
2
- function toggleEditMode ( ) {
3
- let editPanel = document . querySelector ( ".edit-controls" ) ;
4
- if ( editPanel ?. classList . contains ( "hidden" ) ) {
5
- editPanel ?. classList . remove ( "hidden" ) ;
6
- prepareEditMode ( ) ;
7
- }
8
- else {
9
- editPanel ?. classList . add ( "hidden" ) ;
10
- }
11
- }
12
1
function showChangesBanner ( ) {
13
2
let banner = document . querySelector ( ".changes-saved-banner" ) ;
14
3
toggleVisibility ( banner ) ;
Original file line number Diff line number Diff line change 1
1
async function isLoggedIn ( ) {
2
- let loggedIn ;
3
- fetch ( "/is-logged-in" )
2
+ let loggedIn = "no" ;
3
+ await fetch ( "/is-logged-in" )
4
4
. then ( response => {
5
5
if ( ! response . ok ) {
6
6
throw new Error ( "Network error" ) ;
@@ -10,7 +10,9 @@ async function isLoggedIn() {
10
10
. then ( data => {
11
11
loggedIn = data . loggedIn ;
12
12
} )
13
- . catch ( console . error ) ;
13
+ . catch ( error => {
14
+ console . error ( error ) ;
15
+ } ) ;
14
16
return loggedIn ;
15
17
}
16
18
async function checkUser ( ) {
You can’t perform that action at this time.
0 commit comments