Skip to content

Commit

Permalink
only show file upload button on pad page
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Nov 24, 2024
1 parent cc511e9 commit 1daa601
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pad/editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1749,12 +1749,18 @@ pub fn Editor<'a>(
on:click=toggle_settings_open>
"⚙️"
</button>
<button
class="editor-right-button"
data-title="Upload file"
on:click=upload_file_dialog>
"📄"
</button>
{
if mode == EditorMode::Pad {
Some(view!(<button
class="editor-right-button"
data-title="Upload file"
on:click=upload_file_dialog>
"📄"
</button>))
} else {
None
}
}
<div id="example-tracker">{example_text}</div>
</div>
</div>
Expand Down

0 comments on commit 1daa601

Please sign in to comment.