Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

[SDK] Permission system #606

Merged
merged 16 commits into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
248 changes: 248 additions & 0 deletions design/images/permission.dialog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
<html>
<head>
<script>
function onHeaderClick(header, contentId) {
for (const tab of document.querySelectorAll("nav li")) {
tab.classList.remove("active");
}
for (const tabContent of document.querySelectorAll('.tab_content')) {
tabContent.classList.remove("active");
}
header.classList.add("active");
document.getElementById(contentId).classList.add("active");
}
</script>
<style>
body {
width: 800px;
height: 450px;
border: solid white 3px;
border-radius: 20px;
background-color: #3a3a3a;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 20px;
color: white;
padding: 15px;

}
nav ul {
display: flex;
justify-content: space-around;
list-style: none;
font-size: 24px;
font-weight: bold;
padding: 0;
}
nav ul li.active {
text-decoration: underline;
}

.tab_content {
display: none;
}
.tab_content.active {
display: block;
}

.tab_layout {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}

#requests_body #prompt {
width: 80%;
display: flex;
flex-direction: column;
justify-content: center;
}
#requests_body #prompt p {
margin: .5em 0;
}
#requests_body #controls {
display: flex;
flex-direction: column;
align-items: center;
margin: 1em 0;
}

#here_body table td:nth-child(1) {
width: 45%;
}
#here_body table td:nth-child(2) {
width: 45%;
}
#here_body table td:nth-child(3) {
width: 10%;
}
#here_body .server {
font-size: 1.2em;
}
#here_body .names {
font-size: 0.8em;
color: lightgrey;
}

.button_row {
margin: 5px 0;
display: flex;
justify-content: center;
}
.button_row input[type=button] {
margin: 3px 10px;
padding: 5px 10px;
font-size: 20px;
background-color: #5d5d5d;
color: white;
border: solid white 3px;
border-radius: 15px;
}

.page_buttons {
font-weight: bold;
}
.page_buttons .icon {
margin: 0 10px;
}

.icon {
width: 22px;
height: 22px;
border: solid white 2px;
border-radius: 50%;
background-color: #5d5d5d;

display: inline-flex;
align-items: center;
justify-content: center;
}
.icon span {
position: relative;
top: -2px;
}

ul.checkbox_list {
margin: .5em 0;
position: relative;
list-style: none;
}
ul.checkbox_list li {
margin: .3em 0;
}
ul.checkbox_list li input[type=checkbox] {
position: absolute;
left: 10px;
}
</style>
</head>
<body>

<nav>
<ul>
<li onclick="onHeaderClick(this, 'settings_body')">Settings</li>
<li onclick="onHeaderClick(this, 'requests_body')" class="active">Requests</li>
<li onclick="onHeaderClick(this, 'here_body')">Here</li>
<li>All</li>
</ul>
</nav>
<hr/>

<div class="tab_content active" id="requests_body">
<div class="tab_layout">
<div id="prompt">
<p>"Wear A Hat" (&#128275; mres.altvr.com) requests the following permissions:</p>
<ul class="checkbox_list">
<li><label>
<input type="checkbox" checked disabled/><strong>Execution</strong>
- Allow this app to run. Denying this will disable the app altogether.
</label></li>
<li><label>
<input type="checkbox" checked disabled/><strong>User interaction</strong>
- You may pick things up, click buttons, have things attached to your avatar, or otherwise interact with this app.
</label></li>
<li><label>
<input type="checkbox"/><strong>User tracking</strong>
- This app will recognize you if you return.
</label></li>
</ul>
</div>

<div id="controls">
<label><input type="checkbox" checked/> Remember my choices for this server</label>
<div class="button_row">
<input type="button" value="Allow"/>
<input type="button" value="Allow All"/>
<input type="button" value="Deny All"/>
</div>
</div>

<div class="page_buttons">
<div class="icon"><span>&lt;</span></div>
&bull; &bull; &bull;
<div class="icon"><span>&gt;</span></div>
</div>
</div>
</div>

<div class="tab_content" id="settings_body">
<div class="tab_layout">
<ul class="checkbox_list">
<li><label>
<input type="checkbox" checked/>
Grant permission for all apps to run, unless explicitly revoked.
</label></li>
<li><label>
<input type="checkbox"/>
Grant permission for all apps to track me, unless explicitly revoked.
</label></li>
<li><label>
<input type="checkbox"/>
Grant permission for all apps to interact with me, unless explicitly revoked.
</label></li>
</ul>
</div>
</div>

<div class="tab_content" id="here_body">
<div class="tab_layout">
<table style="width: 100%;">
<tr class="app_overview">
<td>
<span class="server">&#128275; mres.altvr.com</span><br/>
<span class="names">Wear A Hat, Functional Tests</span>
</td>
<td>Execution, User Interaction, User Tracking</td>
<td>
<div class="icon" title="Edit">&#128393;</div>
<div class="icon" title="Forget">&#x1F5D9;</div>
</td>
</tr>
<tr class="app_overview">
<td>
<span class="server">&#128275; secure-mre.azurewebsites.net</span><br/>
<span class="names">Where In The World</span>
</td>
<td>Execution, User Interaction</td>
<td>
<div class="icon" title="Edit">&#128393;</div>
<div class="icon" title="Forget">&#x1F5D9;</div>
</td>
</tr>
<tr class="app_overview">
<td>
<span class="server">&#128275; helmets-mre.azurewebsites.net</span><br/>
<span class="names">Helmets</span>
</td>
<td>Execution, User Interaction</td>
<td>
<div class="icon" title="Edit">&#128393;</div>
<div class="icon" title="Forget">&#x1F5D9;</div>
</td>
</tr>
</table>
</div>
</div>

</body>
</html>
Binary file added design/images/permission.overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/images/permission.prompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/images/permission.prompt.xcf
Binary file not shown.
Binary file added design/images/permission.requests.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/images/permission.settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading