Skip to content

Commit

Permalink
fix new file button
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwiterrion committed Apr 8, 2024
1 parent 8d6f4de commit a580a13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 4 additions & 1 deletion ui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<meta name="msapplication-TileColor" content="#ffffff">

<link href="%PUBLIC_URL%/fontawesome.min.css" rel="stylesheet">
<script src="%PUBLIC_URL%/fontawesome.min.js"></script>
<script src="%PUBLIC_URL%/fontawesome.min.js" data-auto-replace-svg="nest"></script>

<link href="%PUBLIC_URL%/solid.min.css" rel="stylesheet">
<script src="%PUBLIC_URL%/solid.min.js"></script>
Expand All @@ -27,6 +27,9 @@
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script>
FontAwesomeConfig = { autoReplaceSvg: 'nest' }
</script>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
9 changes: 4 additions & 5 deletions ui/src/FileManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ function File({ newFilename, filename, content, ext, onClick, ...props }) {
border: 'none'
}}
onClick={onClick}
type="button" >
type="button">
{props.new ? <div>
<i className='fa-solid fa-file' />
<i className='fa-solid fa-file mx-2' />
<input type='text'
autoFocus
value={newFilename}
Expand Down Expand Up @@ -38,9 +38,8 @@ function File({ newFilename, filename, content, ext, onClick, ...props }) {
].includes(filename) && <span className='me-2' onClick={e => {
e.stopPropagation()
props.removeFile(filename)
}} >
<i className='fa-solid fa-times'
/>
}}>
<i className='fa-solid fa-times' />
</span>}
</div>}
</button>
Expand Down

0 comments on commit a580a13

Please sign in to comment.