123 lines
4.0 KiB
HTML
123 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<!-- change to a much simpler tab title -->
|
|
<title>SMS Viewer</title>
|
|
|
|
<script src="/js/alpinejs.min.js" defer></script>
|
|
<link rel="stylesheet" href="/css/bulma.css" />
|
|
<link rel="stylesheet" type="text/css" href="/css/admin.css" />
|
|
<link rel="stylesheet" href="styles.css" />
|
|
</head>
|
|
|
|
<body>
|
|
<!-- START NAV -->
|
|
<nav class="navbar is-black" x-data="{ isOpen: false }">
|
|
<div class="container">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item brand-text" href="/"> Simple Admin </a>
|
|
<a
|
|
role="button"
|
|
class="navbar-burger burger"
|
|
@click="isOpen = !isOpen"
|
|
>
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
<span aria-hidden="true"></span>
|
|
</a>
|
|
</div>
|
|
<div
|
|
id="navMenu"
|
|
class="navbar-menu"
|
|
:class="isOpen ? 'is-active' : ''"
|
|
>
|
|
<div class="navbar-start">
|
|
<a class="navbar-item" href="/"> Connection Info </a>
|
|
<a class="navbar-item" href="/atcommander.html"> AT Commands </a>
|
|
<a class="navbar-item" href="/bandlock.html"> Simple Network </a>
|
|
<a class="navbar-item" href="/sms.html"> SMS </a>
|
|
<a class="navbar-item" href="/ttl.html"> TTL Changer </a>
|
|
<a class="navbar-item" href="/speedtest.html"> OpenSpeedtest </a>
|
|
<a class="navbar-item" href="/console"> Console </a>
|
|
<a class="navbar-item" href="/logout.html"> Logout </a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<!-- END NAV -->
|
|
<div class="container" x-data="atCommands()">
|
|
<div class="columns">
|
|
<div class="column is-12">
|
|
<div class="columns">
|
|
<div class="column is-8">
|
|
<div class="card">
|
|
<header class="card-header">
|
|
<p class="card-header-title">SMS Viewer</p>
|
|
<div class="field">
|
|
<p class="control">
|
|
<button
|
|
class="button is-success"
|
|
@click="sendAtCommand()"
|
|
:disabled="isLoading"
|
|
>
|
|
Refresh
|
|
</button>
|
|
</p>
|
|
</div>
|
|
<div class="field">
|
|
<p class="control">
|
|
<button
|
|
class="button is-danger"
|
|
@click="sendAtCommand()"
|
|
:disabled="isLoading"
|
|
>
|
|
Delete
|
|
</button>
|
|
</p>
|
|
</div>
|
|
</header>
|
|
<div class="card-content">
|
|
<div class="content">
|
|
<textarea
|
|
class="textarea"
|
|
placeholder="SMS Viewer (Make sure to run: AT+CMGF=1 first)"
|
|
readonly
|
|
rows="10"
|
|
cols="50"
|
|
x-model="atCommandResponse"
|
|
:disabled="isLoading"
|
|
></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function atCommands() {
|
|
return {
|
|
isLoading: false,
|
|
atCommandResponse: "",
|
|
// get the SMS list through cgi-bin/get_sms
|
|
sendAtCommand() {
|
|
this.isLoading = true;
|
|
fetch("/cgi-bin/get_sms")
|
|
.then((response) => response.text())
|
|
.then((data) => {
|
|
this.atCommandResponse = data;
|
|
console.log(data);
|
|
this.isLoading = false;
|
|
});
|
|
},
|
|
};
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|