chatr/ChatrServer/wwwroot/user/index.html

132 lines
6.4 KiB
HTML
Raw Permalink Normal View History

2022-08-24 11:34:56 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chatr User: {{ othername }}</title>
<link rel="stylesheet" href="./css/material.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="manifest" href="./site.webmanifest">
<link rel="icon" type="image/x-icon" href="./favicon.ico">
</head>
<body>
<!-- Always shows a header, even in smaller screens. -->
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<!-- Title -->
<span class="mdl-layout-title">Chatr User: {{ othername }}</span>
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Navigation. We hide it in small screens. -->
<nav class="mdl-navigation mdl-layout--large-screen-only">
<a class="mdl-navigation__link" href="./">Home</a> <a class="mdl-navigation__link" href="{{ url }}">{{ name }}</a>
</nav>
</div>
</header>
<div class="mdl-layout__drawer">
<span class="mdl-layout-title">Chatr</span>
<nav class="mdl-navigation">
<a class="mdl-navigation__link" href="{{ url }}">{{ name }}</a>
<a class="mdl-navigation__link" href="./">Home</a>
</nav>
</div>
<main class="mdl-layout__content">
<div class="page-content">
<h1>{{ othername }}</h1>
{{ if notloggedin }}
<h3>Send Anonymous Message</h3>
<form action="./api/msg" method="POST">
<input type="hidden" name="message_to" value="{{ uname }}">
<input type="hidden" name="redirect_to" value="/user?name={{ uname }}">
<div class="mdl-textfield mdl-js-textfield">
<textarea class="mdl-textfield__input" type="text" rows= "6" id="sample5" name="body" ></textarea>
<label class="mdl-textfield__label" for="sample5">Message Body</label>
</div>
<br>
<input type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" value="Send">
</form>
{{ else if loggedinnotme }}
<h3>Send Message</h3>
<form action="./api/msg" method="POST">
<input type="hidden" name="message_to" value="{{ uname }}">
<input type="hidden" name="redirect_to" value="/user?name={{ uname }}">
<div class="mdl-textfield mdl-js-textfield">
<textarea class="mdl-textfield__input" type="text" rows= "6" id="sample5" name="body" ></textarea>
<label class="mdl-textfield__label" for="sample5">Message Body</label>
</div>
<br>
<input type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" value="Send">
</form>
{{ else }}
<h3>Send Message To Self</h3>
<form action="./api/msg" method="POST">
<input type="hidden" name="message_to" value="{{ uname }}">
<input type="hidden" name="redirect_to" value="/user?name={{ uname }}">
<div class="mdl-textfield mdl-js-textfield">
<textarea class="mdl-textfield__input" type="text" rows= "6" id="sample5" name="body" ></textarea>
<label class="mdl-textfield__label" for="sample5">Message Body</label>
</div>
<br>
<input type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" value="Send">
</form>
{{ end }}
{{ if loggedinme }}
<h3>Options</h3>
<a class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" href="./api/logout">Logout</a>
<form action="./api/user-setting" method="POST">
<h3>User Settings</h3>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-1">
<input type="checkbox" id="checkbox-1" class="mdl-checkbox__input" name="hide_bots" {{ opt.hidebotschecked }}>
<span class="mdl-checkbox__label">Hide Bots</span>
</label>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-2">
<input type="checkbox" id="checkbox-2" class="mdl-checkbox__input" name="show_user" {{opt.showuserchecked}}>
<span class="mdl-checkbox__label">Show User To Everybody</span>
</label>
<h3>Show/Hide Users</h3>
{{ for user in opt.users }}
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-3">
<input type="checkbox" id="checkbox-3" class="mdl-checkbox__input" name="user{{ user.hash }}" {{ user.shown }}>
<span class="mdl-checkbox__label">{{ user.text }}</span>
</label>
{{ end }}
<h3>Show/Hide Bots</h3>
{{ for bot in opt.bots }}
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="checkbox-3">
<input type="checkbox" id="checkbox-3" class="mdl-checkbox__input" name="bot{{ bot.hash }}" {{ bot.shown }}>
<span class="mdl-checkbox__label">{{ bot.text }}</span>
</label>
{{ end }}
<input type="submit" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" value="Save">
</form>
{{ end }}
</div>
</main>
</div>
<script src="./js/material.min.js"></script>
</body>
</html>