settings.php 1.2 KB

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