Skip to content

Commit

Permalink
added refresh button after variables change
Browse files Browse the repository at this point in the history
  • Loading branch information
matryer committed Mar 10, 2021
1 parent 5c1cdf2 commit 68e7a36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/frontend/src/elements/Variables.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script>
import { createEventDispatcher } from 'svelte'
import { refreshAllPlugins } from '../rpc.svelte'
import Button from './Button.svelte'
// dispatch handles the following events:
// on:change - fired when the values change
Expand All @@ -23,6 +25,11 @@
}, debounce)
}
function onRefreshThePluginsClick() {
changed = false
refreshAllPlugins()
}
</script>

{#if variables && variables.length && values}
Expand Down Expand Up @@ -52,7 +59,7 @@
{/each}
</table>
<p class='pt-3 pb-6 opacity-75 text-sm max-w-sm'>
<span class='bg-yellow-100 bg-opacity-50 dark:bg-transparent' class:invisible={ !changed }>💡 Choose <strong>Preferences > Refresh all</strong> from an xbar menu for your changes to take effect.</span>
<span class='bg-yellow-100 bg-opacity-50 dark:bg-transparent' class:invisible={ !changed }>💡 To see your changes, <Button on:click={ onRefreshThePluginsClick }>Refresh the plugins</Button></span>
</p>
</div>
{/if}

0 comments on commit 68e7a36

Please sign in to comment.