diff --git a/r2/r2/lib/pages/pages.py b/r2/r2/lib/pages/pages.py index f013bc92c..5be3e43de 100755 --- a/r2/r2/lib/pages/pages.py +++ b/r2/r2/lib/pages/pages.py @@ -3620,6 +3620,9 @@ class AccountActivityPage(BoringPage): class UserIPHistory(Templated): def __init__(self): + from r2.controllers.oauth2 import scope_info + self.my_apps = [(app, [scope_info[scope] for scope in scopes]) + for app, scopes in OAuth2Client._by_user(c.user)] self.ips = ips_by_account_id(c.user._id) super(UserIPHistory, self).__init__() diff --git a/r2/r2/lib/strings.py b/r2/r2/lib/strings.py index 3b27fb8a8..520638ef3 100644 --- a/r2/r2/lib/strings.py +++ b/r2/r2/lib/strings.py @@ -170,6 +170,11 @@ string_dict = dict( unvotable_message = _("sorry, this has been archived and can no longer be voted on"), account_activity_blurb = _("This page shows a history of recent activity on your account. If you notice unusual activity, you should change your password immediately. Location information is guessed from your computer's IP address and may be wildly wrong, especially for visits from mobile devices. Note: due to a bug, private-use addresses (starting with 10.) sometimes show up erroneously in this list after regular use of the site."), your_current_ip_is = _("You are currently accessing reddit from this IP address: %(address)s."), + account_activity_apps_blurb = _(""" +These apps are authorized to access your account. Logging out of all sessions +will revoke access from all apps. You may also revoke access from individual +apps below. +"""), traffic_promoted_link_explanation = _("Below you will see your promotion's impression and click traffic per hour of promotion. Please note that these traffic totals will lag behind by two to three hours, and that daily totals will be preliminary until 24 hours after the link has finished its run."), traffic_processing_slow = _("Traffic processing is currently running slow. The latest data available is from %(date)s. This page will be updated as new data becomes available."), diff --git a/r2/r2/public/static/css/reddit.css b/r2/r2/public/static/css/reddit.css index a510345f0..0acd8bcfa 100755 --- a/r2/r2/public/static/css/reddit.css +++ b/r2/r2/public/static/css/reddit.css @@ -5883,6 +5883,7 @@ tr.gold-accent + tr > td { padding: 7px; position: relative; width: 880px; + font-size: x-small; } .developed-app.collapsed, .authorized-app { height: 100px; } @@ -5900,8 +5901,8 @@ tr.gold-accent + tr > td { vertical-align: top; } -.app-details h2 { font-size: medium; } -.app-details h3 { font-size: x-small; } +.app-details h2 { font-size: medium; margin: 0px; } +.app-details h3 { font-size: x-small; margin: 0px; } .app-icon { display: inline-block; diff --git a/r2/r2/templates/prefapps.html b/r2/r2/templates/prefapps.html index 2919f5d88..6730c6c21 100644 --- a/r2/r2/templates/prefapps.html +++ b/r2/r2/templates/prefapps.html @@ -165,10 +165,7 @@ %def> -%if thing.my_apps: -