Commit 859ffc24 authored by Joel Collins's avatar Joel Collins
Browse files

Initial vue commit

parent b561513c
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
.vscode/
 No newline at end of file
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*

README.md

0 → 100644
+29 −0
Original line number Diff line number Diff line
# vue3

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

0 → 100644
+5 −0
Original line number Diff line number Diff line
module.exports = {
  presets: [
    '@vue/app'
  ]
}

index.html

deleted100644 → 0
+0 −117
Original line number Diff line number Diff line
<html>
  <head>
    <title>OpenFlexure Microscope API Demo</title>

    <link rel= "stylesheet" type= "text/css" href="./static/style.css">
    <script type="text/javascript" src="./static/main.js"></script>

    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui, maximum-scale=1.0, user-scalable=0">

  </head>
  <body>

    <div class="row">
      <div class="column left" id="left-sb">
        <h2>Settings</h2>
        Host: <input type="text" id="microscopeHostInput" value="192.168.1.126"><br>
        Port: <input type="number" id="microscopePortInput" value=5000><br>
        <button type="button" onclick="setHostFromInput();">Connect</button>

        <h3>Position</h3>
        <p>
          x: <input type="number" id="x_abs"><br>
          y: <input type="number" id="y_abs"><br>
          z: <input type="number" id="z_abs"><br>
        </p>
        <p>
          <button type="button" onclick="setStagePositionsFromInput();">GO</button>
          <button type="button" onclick="getStagePositions();">Update</button>
        </p>

        <p>
          Doubleclick to position: <input type="checkbox" id="clickPositionCheck" checked><br>
          <div class="flexbox">
              <div class="flexgrow">FOV width:</div> 
              <div> 
                <input type="number" id="fovXText" onchange="fovX = Number(this.value); updateTextBoxes();" style="width: 7em" >
              </div> 
          </div>

          <div class="flexbox">
              <div class="flexgrow">FOV height:</div> 
              <div> 
                  <input type="number" id="fovYText" onchange="fovY = Number(this.value); updateTextBoxes();" style="width: 7em" >
              </div> 
          </div>
        </p>

        
        <h3>Move</h3>

        <p>
          <b>Up/down/left/right:</b> <br>
          Move stage in x-y. <br>
          <b>PgUp/PgDn: </b> <br>
          Move stage in z/focus.
        </p>

        <h4>Velocity:</h4>
        <div class="flexbox">
          <div class="flexgrow">x-y:</div>
          <div> 
            <input type="range" id="stageVelocityInput" min="50" max="200" oninput="stageVelocity = Number(this.value); updateTextBoxes();">
            <input type="text" id="stageVelocityText" size="3" disabled>
          </div>
        </div>
        <div class="flexbox">
          <div class="flexgrow">z:</div>
          <div> 
            <input type="range" id="focusVelocityInput" min="10" max="100" oninput="focusVelocity = Number(this.value); updateTextBoxes();">
            <input type="text" id="focusVelocityText" size="3" disabled>
          </div>
        </div>

    
        <p>Scroll to focus: <input type="checkbox" id="scrollFocusCheck" checked></p>

      </div>

      <div class="column middle">
        <div id="left-sb-btn" class="sb-btn">
          <button type="button" onclick="toggleClassToDiv('left-sb', 'hidden');">
              <img src="./static/icons/baseline-settings-20px.svg">
          </button>
        </div>
        <div id="right-sb-btn" class="sb-btn">
            <button type="button" onclick="toggleClassToDiv('right-sb', 'hidden');">
                <img src="./static/icons/baseline-camera_alt-24px.svg">
            </button>
        </div>
        <div class="scrolltarget" id="streambox">No active stream</div>
      </div>

      <div class="column right" id="right-sb">
        <h2>Capture</h2>
        Filename: <br>
        <input type="text" id="captureFilenameInput" placeholder="Leave blank for default"><br>
        Store on Pi: <input type="checkbox" id="captureKeepOnDiskCheck"><br>
        Full resolution: <input type="checkbox" id="captureFullResolutionCheck"><br>
        Keep raw data: <input type="checkbox" id="captureBayerCheck"><br>
        Resize capture: <input type="checkbox" id="captureResizeCheck" onclick="newCaptureResizeToggle(this);"><br>
        <input type="number" id="captureWidthInput" value="640" style="width: 7em" disabled>
        <input type="number" id="captureHeightInput" value="480" style="width: 7em" disabled><br>

        <button type="button" onclick="newCaptureFromInput();">Capture</button>

        <h2>Captures</h2>
        <button type="button" onclick="getCaptures();">Update</button>
        <button type="button" onclick="deleteAllCaptures();">Delete all</button>
        <div id="captures"></div>
        
      </div>

    </div>

  </body>

</html>

package-lock.json

0 → 100644
+10289 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading