Skip to content

Commit

Permalink
chore: add API dropdown check
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschubek committed Jun 20, 2024
1 parent 253249f commit 46ad429
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,10 @@ function toggletheme() {
<ul class="dropdown-menu">
<!-- <li><a class="dropdown-item stopprop" onclick="actionDownload()">Download</a></li> -->
<!-- <li><span class="dropdown-item stopprop">Download</span></li> -->
$[if `process.env.API === "true"`]$
<li><span class="dropdown-item stopprop" onclick="window.open('${{`process.env.BASE_PATH ?? ''`}}$<?= $file->url ?>?<?= $file->is_dir ? "ls" : "info"?>')"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-external-link"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6" /><path d="M11 13l9 -9" /><path d="M15 4h5v5" /></svg>API</span></li>
<hr style="margin:0;margin-top: 2px;margin-bottom: 2px;"/>
$[end]$
<li><span class="dropdown-item stopprop <?= $file->is_dir ? "disabled" : ""?>" onclick="getHashViaApi('${{`process.env.BASE_PATH ?? ''`}}$<?= $file->url ?>?info')"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-copy"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" /></svg> Hash</span></li>
<li><span class="dropdown-item stopprop" onclick="navigator.clipboard.writeText('<?= $file->name ?>')"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-copy"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" /></svg> Filename</span></li>
<li><span class="dropdown-item stopprop" onclick="navigator.clipboard.writeText('<?= $file->dl_count ?>')"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-copy"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z" /><path d="M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1" /></svg> Downloads</span></li>
Expand Down

0 comments on commit 46ad429

Please sign in to comment.