Skip to content

Commit

Permalink
Removed hide splash screen preference. Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejolly committed Oct 4, 2020
1 parent 0d6c5f5 commit e164f77
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
3 changes: 3 additions & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Because SvelteTurk is built on [web technologies](https://www.electronjs.org/),

![](assets/devtools.png)


## MTurk API

In it's current form SvelteTurk makes the entire [Mturk Javascript API](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/MTurk.html) available to you right from this console! This means you can *technically* interact with Mturk almost entirely through code without ever using SvelteTurk's user interface. This can be particularly handy by writing and save [code snippets](https://medium.com/@ishwar.rimal/running-javascript-snippets-with-chrome-dev-tool-94d541b22db3) in this developer console. You can create and save snippets by clicking on the following menu options in the console: Sources > >> Arrow > Snippets. From the left you can create a new snippet and save and run it by pressing `cmd+enter`. The picture below demos asking Mturk for your account balance using the API asynchronously. This is the same thing SvelteTurk is doing behind the scenes!

![](assets/devtoolsSnippet.png)
Expand Down
2 changes: 1 addition & 1 deletion docs/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Overview

SvelteTurk's layout is organized with a sidebar on the left and a page view to the right. On successful startup, this view will always being on your home page.
SvelteTurk's layout is organized with a sidebar on the left and a page view to the right. On successful startup, this view will always be the home page.

## Sidebar

Expand Down
5 changes: 4 additions & 1 deletion docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

At any point in time you can change SvelteTurk settings by clicking on the Settings button in the side bar. As development on SvelteTurk continues, the number of configurable settings will grow. If you have recommendations or suggestions feel free to [open a github issue and apply a feature request label](https://github.com/ejolly/svelte-turk/issues/new).

## Updates

SvelteTurk will automatically check for updates on startup. You can also force checking for an update by reloading the window.

## Current Configurable Settings

| Setting Name | Default Value | Description |
| --------------------- | ------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Refresh Frequency | 30 | How often (*in seconds*) SvelteTurk will try to refresh HIT and Assignment data from Mturk servers. Setting this too low may produce errors as Amazon limits the total number of requests in a given period. Setting this too high will result infrequent updates. Something in the range 10-60 should provide reasonable updates. |
| Allow Repeat Bonusing | False | Whether SvelteTurk should allow Bonusing a Worker more than once. |
| Display Help Text | True | Whether SvelteTurk should display explanations under each input on the Create page |
| Hide Splash Screen | False | Whether SvelteTurk should display its loading animation on startup. **Note:** A current bug may break the rendering other UI elements if this is turned on, so it's currently recommend to leave it at its default value. |

## Svelte Data Storage

Expand Down
1 change: 0 additions & 1 deletion main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ let userSettings = {
refreshFrequency: 30,
repeatBonuses: false,
createHITHelpers: true,
hideSplash: false,
};
if (fs.existsSync(settingsFile)) {
fs.readFile(settingsFile, (err, data) => {
Expand Down
6 changes: 2 additions & 4 deletions renderer/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@
userSettings.set(resp.userSettings);
initMTurk();
bindAPI();
if (!$userSettings.hideSplash) {
await wait(3000);
}
await wait(3000);
ready = true;
stLog.info('app ready');
}
Expand Down Expand Up @@ -200,7 +198,7 @@
<Tailwindcss />
<Modal bind:showModal bind:modalType bind:modalText />
<!-- Main app container full window size not responsive-->
{#if !ready && !$userSettings.hideSplash}
{#if !ready}
<Splash {updating} {updateComplete} />
{:else}
<div class="w-screen h-screen">
Expand Down
5 changes: 0 additions & 5 deletions renderer/src/components/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,6 @@
<input type="checkbox" class="mx-4" bind:checked={$userSettings.createHITHelpers} />
</label>
</div>
<div class="inline-flex px-3 space-x-4">
<label>Hide splash screen on startup
<input type="checkbox" class="mx-4" bind:checked={$userSettings.hideSplash} />
</label>
</div>
<hr class="block w-full mt-2 mb-4 border-gray-500" />
<button class="button" type="submit">Save</button>
</div>
Expand Down

0 comments on commit e164f77

Please sign in to comment.