172 lines
7.3 KiB
HTML
172 lines
7.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>RGBWifi</title>
|
|
<meta name="theme-color" content="#000000">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="bundle.css">
|
|
<script src="bundle.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<div v-cloak>
|
|
<div class="notificationContainer">
|
|
<div class="notification" :class="{ error: notification != null && notification.error }" v-if="notification != null" @click.prevent="hideNotification">
|
|
<span class="message">{{ notification.message }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="container">
|
|
<div class="header">
|
|
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXBJREFUeNrsWdENgjAQLcYBcAPcACdQN4AN2MC4gRsYJ9ENdAPYADaADepdUhM1qFjurgp9ScMHgd713V3ftUp5eHgMF1rrGEau6VHD2HMbH5qJOLHra+fkzbsYRshM8pLTgUIgSgvuMMoYw+iMYTr6QhNYMrNiNywILlyVKdcyyPsmcRsyU50kgHtQQu2AdNJFpDkAK4I/LIWMb2AsIBcq0iRGeQGPTZfV6QE0+gDGF2rosGEgMQxIAhnZAiPN84upRf0/OlpsLCBp3yq0chgtCUUZrRw6QDO3EWHSqF9tarZaSKJXeJDdbQlsE0KD6JN/KoRsGhxXKClCKHJIfkThwMWhA6dBSolRijkJOd1ZUv9yQ9OpqbHpiaUVaEbZE7tIIjoBKXysos1c4V8ebLEdbv2bcMsE7gjuBdvXRSJ4F+/wqIXXrIGwmX3zwacLDheNO91OjLQKd14VMDCnYgCxVjI3NTe1mSoPD49x4SrAAG9qPn4eovCMAAAAAElFTkSuQmCC" />
|
|
<h1>{{ $t('title') }}</h1>
|
|
<h2>{{ status.systemID !== null ? $t('systemID') + ': ' + status.systemID : '' }}</h2>
|
|
|
|
<div class="wifistatus">
|
|
<div class="connection">
|
|
<div class="indicator" :data-status="wifiStatus.ap.enabled ? 'connected' : 'disconnected'"></div> {{ $t('wifiStatus.accesspoint.title') }} {{ wifiStatus.ap.enabled ? wifiStatus.ap.ip : $t('wifiStatus.accesspoint.disabled') }}
|
|
</div>
|
|
<div class="connection">
|
|
<div class="indicator" :data-status="getWiFiStationStatus()"></div> {{ $t('wifiStatus.stationmode.title') }} {{ getWiFiStationStatusText() }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div v-if="loading" class="loading">
|
|
{{ $t('loading') }} {{ loadingIndicator }}
|
|
</div>
|
|
|
|
<div v-if="!loading">
|
|
<div class="warning" v-if="hasResetError">
|
|
<p>
|
|
{{ $t('error.resetError') }}
|
|
</p>
|
|
|
|
<p class="resetReason">
|
|
{{ $t('error.resetReason.' + status.resetReason) }}
|
|
</p>
|
|
|
|
<p v-if="status.stackTrace">
|
|
{{ $t('error.stackTrace') }}
|
|
</p>
|
|
|
|
<a class="button button-primary" href="/api/stacktrace/get" v-if="status.stackTrace">{{ $t('error.stackTraceDownload') }}</a>
|
|
<a class="button" @click="deleteStackTrace">{{ $t('error.stackTraceDelete') }}</a>
|
|
</div>
|
|
|
|
|
|
<div class="navigation tabs">
|
|
<a class="button" :class="{ 'active': activeTab == 'status' }" @click="activeTab = 'status'">{{ $t('status.tabTitle') }}</a><a class="button" :class="{ 'active': activeTab == 'connection' }" @click="activeTab = 'connection'">{{ $t('connection.tabTitle') }}</a><a class="button" :class="{ 'active': activeTab == 'system' }" @click="activeTab = 'system'">{{ $t('system.tabTitle') }}</a>
|
|
</div>
|
|
|
|
<div v-if="activeTab == 'status'">
|
|
<!--
|
|
|
|
Status tab
|
|
|
|
-->
|
|
<h3>{{ $t('status.title') }}</h3>
|
|
</div>
|
|
|
|
<div v-if="activeTab == 'connection'">
|
|
<!--
|
|
|
|
Connection tab
|
|
|
|
-->
|
|
<form @submit.prevent="applyConnection">
|
|
<h3>{{ $t('connection.title') }}</h3>
|
|
|
|
<check v-model.boolean="connection.accesspoint" :title="$t('connection.accesspoint')"></check>
|
|
<span class="hint">{{ $t('connection.accesspointHint') }}</span>
|
|
|
|
<check v-model.boolean="connection.station" :title="$t('connection.stationmode')"></check>
|
|
<span class="hint">{{ $t('connection.stationmodeHint') }}</span>
|
|
|
|
<label for="ssid">{{ $t('connection.ssid') }}</label>
|
|
<input type="text" id="ssid" v-model="connection.ssid" :disabled="!connection.station">
|
|
|
|
<label for="password">{{ $t('connection.password') }}</label>
|
|
<input type="password" id="password" v-model="connection.password" :disabled="!connection.station">
|
|
|
|
<check v-model.boolean="connection.dhcp" :disabled="!connection.station" :title="$t('connection.dhcp')" class="form-control"></check>
|
|
<span class="hint">{{ $t('connection.dhcpHint') }}</span>
|
|
|
|
|
|
<div class="suboptions">
|
|
<label for="ip">{{ $t('connection.ipaddress') }}</label>
|
|
<input type="text" id="ip" v-model="connection.ip" :disabled="!connection.station || connection.dhcp">
|
|
|
|
<label for="subnetmask">{{ $t('connection.subnetmask') }}</label>
|
|
<input type="text" id="subnetmask" v-model="connection.subnetmask" :disabled="!connection.station || connection.dhcp">
|
|
|
|
<label for="gateway">{{ $t('connection.gateway') }}</label>
|
|
<input type="text" id="gateway" v-model="connection.gateway" :disabled="!connection.station || connection.dhcp">
|
|
</div>
|
|
|
|
|
|
<label for="hostname">{{ $t('connection.hostname') }}</label>
|
|
<input type="text" :placeholder="$t('connection.hostnamePlaceholder')" id="hostname" v-model="connection.hostname" :disabled="!connection.station">
|
|
|
|
<div class="buttons">
|
|
<input type="submit" :disabled="saving" :value="saving ? $t('applyButtonSaving') : $t('applyButton')">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div v-if="activeTab == 'system'">
|
|
<!--
|
|
|
|
System tab
|
|
|
|
-->
|
|
<form @submit.prevent="uploadFirmware">
|
|
<h3>{{ $t('system.firmwareTitle') }}</h3>
|
|
|
|
<input type="file" id="firmwareFile">
|
|
|
|
<div class="buttons">
|
|
<input type="submit" :disabled="saving" :value="saving ? $t('applyButtonSaving') : $t('applyButton')">
|
|
</div>
|
|
|
|
<div v-if="uploadProgress !== false">
|
|
{{ uploadProgress }}%
|
|
</div>
|
|
</form>
|
|
|
|
<form @submit.prevent="applySystem">
|
|
<h3>{{ $t('system.pinsTitle') }}</h3>
|
|
|
|
<div class="horizontal">
|
|
<label for="pinLEDAP">{{ $t('system.pinLEDAP') }}</label>
|
|
<input type="number" id="pinLEDAP" v-model.number="system.pins.ledAP">
|
|
</div>
|
|
|
|
<div class="horizontal">
|
|
<label for="pinLEDSTA">{{ $t('system.pinLEDSTA') }}</label>
|
|
<input type="number" id="pinLEDSTA" v-model.number="system.pins.ledSTA">
|
|
</div>
|
|
|
|
<div class="horizontal">
|
|
<label for="pinAPButton">{{ $t('system.pinAPButton') }}</label>
|
|
<input type="number" id="pinAPButton" v-model.number="system.pins.apButton">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
</div>
|
|
<div class="version">
|
|
{{ $t('copyright') }}<br>
|
|
{{ status.version !== null ? $t('firmwareVersion') + status.version : '' }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script language="javascript">
|
|
startApp();
|
|
</script>
|
|
</body>
|
|
</html> |