forked from axiom-team/astrXbian
g1scan
This commit is contained in:
parent
2bbc5cd43c
commit
fc716098e1
|
@ -0,0 +1,112 @@
|
||||||
|
<html><head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<title>G1 scan</title>
|
||||||
|
<link rel="icon" type="image/png" href="https://schmich.github.io/instascan/favicon.png">
|
||||||
|
<link rel="stylesheet" href="g1scan_fichiers/style.css">
|
||||||
|
<script type="text/javascript" src="g1scan_fichiers/adapter.js"></script>
|
||||||
|
<script type="text/javascript" src="g1scan_fichiers/vue.js"></script>
|
||||||
|
<script type="text/javascript" src="g1scan_fichiers/instascan.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<a href="https://git.p2p.legal/axiom-team/astrXbian"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 1" src="g1scan_fichiers/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875.png" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"></a>
|
||||||
|
<div id="app"><div class="sidebar"><section class="cameras"><h2>Cameras</h2> <ul><!----> <li><span title="(unknown)" class="active">(unknown)</span> <!----></li></ul></section> <section class="scans"><h2>Scans</h2> <ul><li class="empty">No scans yet</li></ul> <ul></ul></section></div> <div class="preview-container"><video id="preview" autoplay="autoplay" style="transform: scaleX(-1);" class="active"></video></div></div>
|
||||||
|
<script type="text/javascript" src="g1scan_fichiers/app.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="wrapper-auto-scrolling" style="display: none;"><div id="modal-auto-scrolling" class="modal">
|
||||||
|
<a href="#close" class="modal-overlay" data-close-modal-auto-scrolling="" aria-label="Close"></a>
|
||||||
|
<div class="modal-container">
|
||||||
|
<div class="modal-header">
|
||||||
|
<a href="#close" class="btn btn-clear float-right" data-close-modal-auto-scrolling="" aria-label="Close"></a>
|
||||||
|
<div class="modal-title h3">Options | AutoScrolling</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div id="speed-wrapper-auto-scrolling">
|
||||||
|
<strong>Scrolling speed(scroll/sec):</strong>
|
||||||
|
<input type="number" class="scrolling-speed" id="scrolling-speed" value="20">
|
||||||
|
<p>The value is scrolling speed. A unit is scroll / sec.<br>
|
||||||
|
Max is 3000, and min is 1.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Enable transmission scrolling:</strong>
|
||||||
|
<input type="checkbox" id="enable-transmission-scrolling">
|
||||||
|
<p class="mb-0">
|
||||||
|
If enabled, you can change scrolling speed per gear.
|
||||||
|
The gears are Slow / Middle / Fast.
|
||||||
|
The gears are cycled between
|
||||||
|
<mark>Slow</mark>, <mark>Middle</mark>, <mark>Fast</mark>
|
||||||
|
by <i>single/double-clicking</i> browser icon.
|
||||||
|
</p>
|
||||||
|
<table id="transmission-wrapper-auto-scrolling" class="d-hide">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th>Fast:</th>
|
||||||
|
<td><input type="number" class="scrolling-speed" id="transmission-gear-of-fast" value="2000">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Middle:</th>
|
||||||
|
<td><input type="number" class="scrolling-speed" id="transmission-gear-of-middle" value="500">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>Slow:</th>
|
||||||
|
<td><input type="number" class="scrolling-speed" id="transmission-gear-of-slow" value="20">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Scrolling stop by click:</strong>
|
||||||
|
<input type="checkbox" id="stop-scrolling-by-click">
|
||||||
|
<p>If enabled the option, scrolling is stopped when you click the scrolling window.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Stop scrolling by cursor hovering over something:</strong>
|
||||||
|
<input type="checkbox" id="stop-scrolling-by-click-on-hover">
|
||||||
|
<p>If enabled the option, scrolling is stopped temporally when mouse cursor is hovering over something.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Keyboard shortcut for single-click action:</strong>
|
||||||
|
<input type="text" id="keybind-single-click" value="Alt+Shift+PageDown">
|
||||||
|
<p class="mb-0">Fire a single-click action by keyboard shortcut<br>
|
||||||
|
</p><ul>
|
||||||
|
<li>Start scrolling when window is stopped</li>
|
||||||
|
<li>Stop scrolling when window is scrolling</li>
|
||||||
|
<li>Close option modal window when the window is opened</li>
|
||||||
|
</ul>
|
||||||
|
The keybind should be a combination of keycodes concatenated with the '+' sign. <br>
|
||||||
|
<i>Ex: Ctrl+Shift+Insert.</i><br>
|
||||||
|
Check out the link for the keycodes: <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#Key_combinations" target="_blank">Key combinations</a><br>
|
||||||
|
<span class="text-gray">Notice: Some key combinations are reserved by the browser and can't be reassigned to this.<span><p></p>
|
||||||
|
</span></span></div>
|
||||||
|
<div>
|
||||||
|
<strong>Stop scrolling on focus out:</strong>
|
||||||
|
<input type="checkbox" id="stop-scrolling-on-focus-out">
|
||||||
|
<p>If enabled the option, scrolling is stopped when focus for the browser is moved to another application or browser window.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Disable double click action:</strong>
|
||||||
|
<input type="checkbox" id="disable-double-click">
|
||||||
|
<p class="mb-0">If enabled the option</p>
|
||||||
|
<ul>
|
||||||
|
<li>cannot open modal window</li>
|
||||||
|
<li>start/stop scrolling is immediately</li>
|
||||||
|
</ul>
|
||||||
|
<p></p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Restore scrolling from switch back:</strong>
|
||||||
|
<input type="checkbox" id="restore-scrolling-from-switch-back">
|
||||||
|
<p>If this option is enabled, scrolling which stopped by tab changing restarts when user is back to a tab that was scrolling.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<strong>Stop when bottom of window:</strong>
|
||||||
|
<input type="checkbox" id="stop-when-bottom-of-window" checked="checked">
|
||||||
|
<p>If enabled, scrolling is stopped when window position is reached at bottom.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div></div></body></html>
|
Binary file not shown.
After Width: | Height: | Size: 7.7 KiB |
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,36 @@
|
||||||
|
var app = new Vue({
|
||||||
|
el: '#app',
|
||||||
|
data: {
|
||||||
|
scanner: null,
|
||||||
|
activeCameraId: null,
|
||||||
|
cameras: [],
|
||||||
|
scans: []
|
||||||
|
},
|
||||||
|
mounted: function () {
|
||||||
|
var self = this;
|
||||||
|
self.scanner = new Instascan.Scanner({ video: document.getElementById('preview'), scanPeriod: 5 });
|
||||||
|
self.scanner.addListener('scan', function (content, image) {
|
||||||
|
self.scans.unshift({ date: +(Date.now()), content: content });
|
||||||
|
});
|
||||||
|
Instascan.Camera.getCameras().then(function (cameras) {
|
||||||
|
self.cameras = cameras;
|
||||||
|
if (cameras.length > 0) {
|
||||||
|
self.activeCameraId = cameras[0].id;
|
||||||
|
self.scanner.start(cameras[0]);
|
||||||
|
} else {
|
||||||
|
console.error('No cameras found.');
|
||||||
|
}
|
||||||
|
}).catch(function (e) {
|
||||||
|
console.error(e);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
formatName: function (name) {
|
||||||
|
return name || '(unknown)';
|
||||||
|
},
|
||||||
|
selectCamera: function (camera) {
|
||||||
|
this.activeCameraId = camera.id;
|
||||||
|
this.scanner.start(camera);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,77 @@
|
||||||
|
body, html {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font-family: 'Helvetica Neue', 'Calibri', Arial, sans-serif;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
#app {
|
||||||
|
background: #263238;
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
justify-content: stretch;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.sidebar {
|
||||||
|
background: #eceff1;
|
||||||
|
min-width: 250px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: flex-start;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.sidebar h2 {
|
||||||
|
font-weight: normal;
|
||||||
|
font-size: 1.0rem;
|
||||||
|
background: #607d8b;
|
||||||
|
color: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.sidebar ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
.sidebar li {
|
||||||
|
line-height: 175%;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-wrap: none;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
.cameras ul {
|
||||||
|
padding: 15px 20px;
|
||||||
|
}
|
||||||
|
.cameras .active {
|
||||||
|
font-weight: bold;
|
||||||
|
color: #009900;
|
||||||
|
}
|
||||||
|
.cameras a {
|
||||||
|
color: #555;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.cameras a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.scans li {
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
.scans-enter-active {
|
||||||
|
transition: background 3s;
|
||||||
|
}
|
||||||
|
.scans-enter {
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
.empty {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
.preview-container {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue