118 lines
4.8 KiB
HTML
118 lines
4.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<meta charset="utf-8">
|
|
<title>MoneroSMS</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<script src="https://unpkg.com/vue@3.2.41/dist/vue.global.js" integrity="sha384-Oz4EwsIKBQvJDUayW6Bxtt3CwJEmUqI2UYxNiONOlISf30PLyX7Xt3enDht1O4uA" crossorigin="anonymous"></script>
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%2210 0 100 100%22><text y=%22.90em%22 font-size=%2290%22>📨</text></svg>">
|
|
<link rel="stylesheet" href="main.css">
|
|
<!--begin div hell-->
|
|
<body>
|
|
<div id="app">
|
|
<div class="main">
|
|
<div v-if="userID">
|
|
<div class="showUserID">
|
|
<button v-if="! showUserID" @click="showUserID = userID">Show User ID (KEEP SAFE & SECRET)</button>
|
|
<span v-else><input type="text" v-model="showUserID"></span>
|
|
</div>
|
|
|
|
<div><span v-if="! RegExp('Error|Getting').test(moneroAddress)">Monero Address: </span>{{ moneroAddress }}</div>
|
|
<div><span v-if="! RegExp('Error|Getting').test(credits)">Credit Balance: </span>{{ credits }}</div>
|
|
|
|
<span>
|
|
<div><span>Phone Number: </span>{{ formatPhone(ownedNumber) }}</div>
|
|
</span>
|
|
<div v-if="RegExp('No').test(ownedNumber)">
|
|
<button @click="showNumbers()" v-if="! availableNumbers">Show Available Virtual Numbers</button>
|
|
<div v-if="availableNumbers">
|
|
<h1>Available Virtual Numbers</h1>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Number</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(number,i) in availableNumbers" :key="i">
|
|
<th scope="row" v-if="number">{{ formatPhone(number) }}</th>
|
|
<td><button @click="buyNum" v-if="number" :data-number="number">Buy</button></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div v-if="availableNumbers.length === 0">No numbers available</div>
|
|
<div v-if="numberPurchaseMessage">{{ numberPurchaseMessage }}</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-else>
|
|
<div v-if="threads.length">
|
|
<br>
|
|
<span v-for="person in threads">
|
|
<button @click="openThread(person)">{{ formatPhone(person) }} - Open Thread</button>
|
|
<br><br>
|
|
</span>
|
|
<div v-if="showingThreadNum">
|
|
<div v-for="message in threadMessages">
|
|
<div :class="message[1]">{{ message[0] }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
No threads
|
|
</div>
|
|
<form class="draft" @submit="sendSMS">
|
|
<label>
|
|
Phone Number:
|
|
<input type="tel" v-model="sendToNumber" placeholder="Phone Number" maxlength="10" minlength="10" size="10" pattern="^\d{10}$" required>
|
|
</label>
|
|
<label>
|
|
Message:
|
|
<textarea v-model="messageToSend" placeholder="Message" required></textarea>
|
|
</label>
|
|
<input @submit.prevent="onSubmit" type="submit" :disabled="disableSMSSend" value="Send">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div v-else>
|
|
<pre class="desktopHeader">
|
|
|
|
__ __ _____ __ __ _____
|
|
| | __. , __ ___ .___ __. ( | | (
|
|
|\ /| .' \ |' `. .' ` / \ .' \ `--. |\ /| `--.
|
|
| \/ | | | | | |----' | ' | | | | \/ | |
|
|
/ / `._.' / | `.___, / `._.' \___.' / / \___.'
|
|
|
|
</pre>
|
|
<h1 class="mobileHeader">MoneroSMS</h1>
|
|
<form class="login">
|
|
<input type="password" v-model="userIDInput" placeholder="Enter your account ID" required>
|
|
|
|
<button @submit.prevent="onSubmit" @click="userID = userIDInput; userLogin()">Login</button>
|
|
<button @submit.prevent="onSubmit" @click="userID = crypto.randomUUID(); userLogin()">Generate Account</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="main.js"></script>
|
|
|
|
|
|
<!--
|
|
MoneroSMS Web Frontend
|
|
Copyright (C) 2022 VoidNetwork LLC
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
-->
|
|
</body>
|