Gave up on that silly QR nonsense

master
Keith Irwin 2022-11-07 13:40:30 -07:00
parent 2942d68462
commit fb5954e2d7
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
6 changed files with 2 additions and 13 deletions

View File

@ -1,3 +1,3 @@
FROM httpd:2.4
COPY admin.html /usr/local/apache2/htdocs/index.html
COPY admin.js knockout.min.js qrcode.min.js /usr/local/apache2/htdocs/
COPY admin.js knockout.min.js /usr/local/apache2/htdocs/

View File

@ -52,7 +52,6 @@
<div id="qrcode"></div>
<script src="/knockout.min.js" integrity="sha512-vs7+jbztHoMto5Yd/yinM4/y2DOkPLt0fATcN+j+G4ANY2z4faIzZIOMkpBmWdcxt+596FemCh9M18NUJTZwvw=="></script>
<script src="/qrcode.min.js" integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA=="></script>
<script src="/admin.js"></script>
</body>
</html>

View File

@ -1,3 +1,3 @@
FROM httpd:2.4
COPY dashboard.html /usr/local/apache2/htdocs/index.html
COPY dashboard.js knockout.min.js qrcode.min.js /usr/local/apache2/htdocs/
COPY dashboard.js knockout.min.js /usr/local/apache2/htdocs/

View File

@ -28,11 +28,9 @@
<p>After clicking "Add", the new peer's config will appear below. Copy and paste it into your wireguard client and start the service. <b>This configuration will not be shown again!</b> If you lose the config, you will need to delete the peer and recreate it. </p>
<hr>
<pre data-bind="text:newConfigText"></pre>
<div id="qrcode" style="border:5px solid white"></div>
<script src="/knockout.min.js" integrity="sha512-vs7+jbztHoMto5Yd/yinM4/y2DOkPLt0fATcN+j+G4ANY2z4faIzZIOMkpBmWdcxt+596FemCh9M18NUJTZwvw==
"></script>
<script src="/qrcode.min.js" integrity="sha512-CNgIRecGo7nphbeZ04Sc13ka07paqdeTu0WR1IM4kNcpmBAUSHSQX0FslNhTDadL4O5SAGapGt4FodqL8My0mA=="></script>
<script src="/dashboard.js"></script>
</body>
</html>

View File

@ -86,13 +86,6 @@ function PeerList() {
cantDelete: true,
}))
self.newConfigText(parsedRes)
const qrSize = (document.documentElement.clientWidth>document.documentElement.clientHeight)?
document.documentElement.clientHeight : document.documentElement.clientWidth
new QRCode(document.getElementById('qrcode'),{
text: parsedRes,
width: qrSize - 10,
height: qrSize - 10,
})
}
}
}

1
front/qrcode.min.js vendored

File diff suppressed because one or more lines are too long