forked from evilsocket/pwnagotchi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: refactored webui into separate files instead of strings
- Loading branch information
1 parent
2aa73d1
commit 81032fe
Showing
7 changed files
with
104 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.block { | ||
-webkit-appearance: button; | ||
-moz-appearance: button; | ||
appearance: button; | ||
|
||
display: block; | ||
cursor: pointer; | ||
text-align: center; | ||
} | ||
|
||
img#ui { | ||
width:100%; | ||
} | ||
|
||
.full { | ||
position: absolute; | ||
top:0; | ||
left:0; | ||
width:100%; | ||
} | ||
|
||
.pixelated { | ||
image-rendering:optimizeSpeed; /* Legal fallback */ | ||
image-rendering:-moz-crisp-edges; /* Firefox */ | ||
image-rendering:-o-crisp-edges; /* Opera */ | ||
image-rendering:-webkit-optimize-contrast; /* Safari */ | ||
image-rendering:optimize-contrast; /* CSS3 Proposed */ | ||
image-rendering:crisp-edges; /* CSS4 Proposed */ | ||
image-rendering:pixelated; /* CSS4 Proposed */ | ||
-ms-interpolation-mode:nearest-neighbor; /* IE8+ */ | ||
} | ||
|
||
form.action { | ||
display:inline; | ||
} | ||
|
||
div.status { | ||
position: absolute; | ||
top:0; | ||
left:0; | ||
width:100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
window.onload = function() { | ||
var image = document.getElementById("ui"); | ||
function updateImage() { | ||
image.src = image.src.split("?")[0] + "?" + new Date().getTime(); | ||
} | ||
setInterval(updateImage, 1000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<html> | ||
<head> | ||
<title>{{ title }}</title> | ||
<link rel="stylesheet" type="text/css" href="/css/style.css"/> | ||
</head> | ||
<body> | ||
<div class="full pixelated"> | ||
<img src="/ui" id="ui"/> | ||
<br/> | ||
<hr/> | ||
|
||
<form class="action" method="POST" action="/shutdown" | ||
onsubmit="return confirm('This will halt the unit, continue?');"> | ||
<input style="display:inline;" type="submit" class="block" value="Shutdown"/> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> | ||
</form> | ||
|
||
<form class="action" method="POST" action="/restart" | ||
onsubmit="return confirm('This will restart the service in {{ other_mode }} mode, continue?');"> | ||
<input style="display:inline;" type="submit" class="block" value="Restart in {{ other_mode }} mode"/> | ||
<input type="hidden" name="mode" value="{{ other_mode }}"/> | ||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> | ||
</form> | ||
</div> | ||
|
||
<script type="text/javascript" src="/js/refresh.js"></script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<head> | ||
<title>{{ title }}</title> | ||
<meta http-equiv="refresh" content="{{ go_back_after }};URL=/"> | ||
<link rel="stylesheet" type="text/css" href="/css/style.css"/> | ||
</head> | ||
<body> | ||
<div class="status"> | ||
{{ message }} | ||
</div> | ||
</body> | ||
</html> |