Skip to content

Commit

Permalink
Add open folder option after download
Browse files Browse the repository at this point in the history
  • Loading branch information
achhabra2 committed Jan 6, 2022
1 parent cff26fb commit ebcebbc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/dist/bundle.js.map

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion frontend/src/receiver.svelte
Expand Up @@ -32,6 +32,12 @@
go.main.App.OpenFile(receivePath);
}
function openDownloadsFolder() {
go.main.App.GetUserPrefs().then(prefs => {
go.main.App.OpenFile(prefs.downloadsDirectory);
});
}
function onCancel() {
go.main.App.CancelWormholeRequest().then(() => {
isReceiving = false;
Expand Down Expand Up @@ -86,7 +92,10 @@
<div class="icon-lg receive-file-icon" />
<span class="text-gray-200">{receiveFileName}</span>
{#if !isReceiving}
<button class="open-button text-sm" on:click={openFile}>Open</button>
<div class="inline-flex space-x-1">
<button class="open-button text-sm" on:click={openFile}>Open File</button>
<button class="open-button text-sm" on:click={openDownloadsFolder}>Open Folder</button>
</div>
{/if}
</div>
{/if}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/styles.pcss
Expand Up @@ -14,7 +14,7 @@ div {

@layer components {
.open-button {
@apply rounded-lg p-2 bg-green-500 duration-150 text-gray-200 hover:bg-green-700 active:bg-green-800;
@apply rounded-lg px-2 py-1 bg-green-600 duration-150 text-gray-200 hover:bg-green-700 active:bg-green-800;
}
.send-input {
@apply border border-transparent focus:outline-none focus:ring-2 focus:ring-green-300 focus:border-transparent bg-gray-700 text-gray-200 rounded-l-md shadow-inner shadow-md;
Expand All @@ -23,7 +23,7 @@ div {
@apply block text-sm text-gray-300;
}
.send-button {
@apply rounded-lg px-4 py-2 bg-green-600 duration-150 text-gray-200 hover:bg-green-700 disabled:opacity-50 active:bg-green-800;
@apply rounded-lg shadow-md px-4 py-2 bg-green-600 duration-150 text-gray-200 hover:bg-green-700 disabled:opacity-50 active:bg-green-800;
}

.copy-button {
Expand All @@ -37,7 +37,7 @@ div {
@apply block text-sm text-gray-300;
}
.receive-button {
@apply rounded-r-md px-4 py-2 bg-green-600 duration-150 text-gray-200 hover:bg-green-700 disabled:opacity-50 active:bg-green-800;
@apply rounded-r-md shadow-md px-4 py-2 bg-green-600 duration-150 text-gray-200 hover:bg-green-700 disabled:opacity-50 active:bg-green-800;
}

.about-button {
Expand Down

0 comments on commit ebcebbc

Please sign in to comment.