aboutsummaryrefslogtreecommitdiffstats
path: root/apps/remoteStorage/templates/settings.php
blob: 147378dda39efc32370ca7ac4a89fa223e2a330d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
	<fieldset class="personalblock">
		<?php
			echo '<img src="../apps/remoteStorage/remoteStorage.png" style="width:16px"> '
				.'<strong>'.$l->t('remoteStorage').'</strong> user address: '
				.OCP\USER::getUser().'@'.$_SERVER['SERVER_NAME']
				.' (<a href="http://unhosted.org/">more info</a>)';
		?>
		<p><em>Apps that currently have access to your ownCloud:</em></p>
		<script>
			function revokeToken(token) {
				var xhr = new XMLHttpRequest();
				xhr.open('POST', '/apps/remoteStorage/ajax/revokeToken.php', true);
				xhr.send(token);
			}
		</script>
		<ul>
		<?php
			foreach(OC_remoteStorage::getAllTokens() as $token => $details) {
				echo '<li onmouseover="'
					.'document.getElementById(\'revoke_'.$token.'\').style.display=\'inline\';"'
					.'onmouseout="document.getElementById(\'revoke_'.$token.'\').style.display=\'none\';"'
					.'> <strong>'.$details['appUrl'].'</strong>: '.$details['categories']
					.' <a href="#" title="Revoke" class="action" style="display:none" id="revoke_'.$token.'" onclick="'
					.'revokeToken(\''.$token.'\');this.parentNode.style.display=\'none\';"'
					.'><img src="/core/img/actions/delete.svg"></a></li>'."\n";
			}
		?></ul>
	</fieldset>