style settings page; add bookmark editor page
This commit is contained in:
parent
cda43b5c5c
commit
3e4ba42aab
@ -43,3 +43,14 @@ h1 {
|
||||
max-height: 350px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.settings-grid > div {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.settings-grid .btn {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
padding: 20px;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
@ -11,17 +11,22 @@
|
||||
<body>
|
||||
${header}
|
||||
<div class="container">
|
||||
<div class="col-12">
|
||||
<h1>Settings</h1>
|
||||
<div class="row">
|
||||
<h1 class="col-12">Settings</h1>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<a href="settings/general">General settings</a>
|
||||
<div class="row settings-grid">
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="settings/general">General settings</a>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<a href="settings/sdr">SDR device settings</a>
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="settings/sdr">SDR device settings</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="settings/bookmarks">Bookmark editor</a>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<a class="btn btn-secondary" href="features">Feature report</a>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<a href="features">Feature report</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
19
htdocs/settings/bookmarks.html
Normal file
19
htdocs/settings/bookmarks.html
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<title>OpenWebRX Settings</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="../static/favicon.ico" />
|
||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../static/css/admin.css" />
|
||||
<script src="../compiled/settings.js"></script>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
${header}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<h1 class="col-12">Bookmarks</h1>
|
||||
</div>
|
||||
make me pretty!
|
||||
</div>
|
||||
</body>
|
12
owrx/controllers/bookmarks.py
Normal file
12
owrx/controllers/bookmarks.py
Normal file
@ -0,0 +1,12 @@
|
||||
from owrx.controllers.template import WebpageController
|
||||
from owrx.controllers.admin import AuthorizationMixin
|
||||
|
||||
|
||||
class BookmarksController(AuthorizationMixin, WebpageController):
|
||||
def header_variables(self):
|
||||
variables = super().header_variables()
|
||||
variables["assets_prefix"] = "../"
|
||||
return variables
|
||||
|
||||
def indexAction(self):
|
||||
self.serve_template("settings/bookmarks.html", **self.template_variables())
|
@ -5,6 +5,7 @@ from owrx.controllers.websocket import WebSocketController
|
||||
from owrx.controllers.api import ApiController
|
||||
from owrx.controllers.metrics import MetricsController
|
||||
from owrx.controllers.settings import SettingsController, GeneralSettingsController, SdrSettingsController
|
||||
from owrx.controllers.bookmarks import BookmarksController
|
||||
from owrx.controllers.session import SessionController
|
||||
from owrx.controllers.profile import ProfileController
|
||||
from owrx.controllers.imageupload import ImageUploadController
|
||||
@ -108,6 +109,7 @@ class Router(object):
|
||||
"/settings/general", GeneralSettingsController, method="POST", options={"action": "processFormData"}
|
||||
),
|
||||
StaticRoute("/settings/sdr", SdrSettingsController),
|
||||
StaticRoute("/settings/bookmarks", BookmarksController),
|
||||
StaticRoute("/login", SessionController, options={"action": "loginAction"}),
|
||||
StaticRoute("/login", SessionController, method="POST", options={"action": "processLoginAction"}),
|
||||
StaticRoute("/logout", SessionController, options={"action": "logoutAction"}),
|
||||
|
Loading…
Reference in New Issue
Block a user