From 64100805fdaa8371f4b3604655a4fde21df0beb2 Mon Sep 17 00:00:00 2001 From: flashwave Date: Thu, 22 Sep 2016 22:14:28 +0200 Subject: [PATCH] misc --- .../Settings/AdvancedController.php | 4 -- .../views/yuuno/settings/account/details.twig | 19 -------- .../views/yuuno/settings/account/master.twig | 30 ------------- .../yuuno/settings/advanced/deactivate.twig | 5 ++- .../settings/advanced/deactivate_bye.twig | 11 ----- resources/views/yuuno/settings/master.twig | 44 +++++++++++++++++++ resources/views/yuuno/user/profile.twig | 2 +- 7 files changed, 48 insertions(+), 67 deletions(-) delete mode 100644 resources/views/yuuno/settings/advanced/deactivate_bye.twig diff --git a/app/Controllers/Settings/AdvancedController.php b/app/Controllers/Settings/AdvancedController.php index 90e6dc8..763adb6 100644 --- a/app/Controllers/Settings/AdvancedController.php +++ b/app/Controllers/Settings/AdvancedController.php @@ -70,10 +70,6 @@ class AdvancedController extends Controller */ public function deactivate() { - if (CurrentSession::$user->permission(Site::DEACTIVATED)) { - return view('settings/advanced/deactivate_bye'); - } - if (!CurrentSession::$user->permission(Site::DEACTIVATE_ACCOUNT)) { throw new HttpMethodNotAllowedException(); } diff --git a/resources/views/yuuno/settings/account/details.twig b/resources/views/yuuno/settings/account/details.twig index 213afed..fda2b2b 100644 --- a/resources/views/yuuno/settings/account/details.twig +++ b/resources/views/yuuno/settings/account/details.twig @@ -6,25 +6,6 @@

Alter the details of your account, leave fields blank to leave them unchanged.

{% endblock %} -{% block js %} - {{ parent() }} - -{% endblock %} - {% block settingsContent %}
{% if edit_email %} diff --git a/resources/views/yuuno/settings/account/master.twig b/resources/views/yuuno/settings/account/master.twig index a203503..3748acb 100644 --- a/resources/views/yuuno/settings/account/master.twig +++ b/resources/views/yuuno/settings/account/master.twig @@ -1,33 +1,3 @@ {% extends 'settings/master.twig' %} {% set category = 'Account' %} - -{% block js %} - -{% endblock %} diff --git a/resources/views/yuuno/settings/advanced/deactivate.twig b/resources/views/yuuno/settings/advanced/deactivate.twig index 794fe0d..8ce1182 100644 --- a/resources/views/yuuno/settings/advanced/deactivate.twig +++ b/resources/views/yuuno/settings/advanced/deactivate.twig @@ -3,9 +3,10 @@ {% set mode = 'Deactivate' %} {% block description %} -

You can deactivate your account here if you want to leave :(.

-

This will remove your account from every rank it's a part of and make you unable to login.

+

You can deactivate your account here if you want to leave.

+

This will remove your account from every rank it's a part of.

If you have an active Tenshi tag on your account it won't pause while your account is deactivated.

+

You can reactivate your account by logging in within 30 days, after that period your account will be removed.

{% endblock %} {% block settingsContent %} diff --git a/resources/views/yuuno/settings/advanced/deactivate_bye.twig b/resources/views/yuuno/settings/advanced/deactivate_bye.twig deleted file mode 100644 index 89e6fab..0000000 --- a/resources/views/yuuno/settings/advanced/deactivate_bye.twig +++ /dev/null @@ -1,11 +0,0 @@ -{% extends 'master.twig' %} - -{% set title = 'Farewell!' %} - -{% block content %} -
-

Farewell!

-

-

Remember that you can reactivate your account anytime if you decide to come back!

-
-{% endblock %} diff --git a/resources/views/yuuno/settings/master.twig b/resources/views/yuuno/settings/master.twig index 3a5f949..f45b544 100644 --- a/resources/views/yuuno/settings/master.twig +++ b/resources/views/yuuno/settings/master.twig @@ -2,6 +2,50 @@ {% set title = category ~ ' / ' ~ mode %} +{% block js %} + +{% endblock %} + {% block content %}
diff --git a/resources/views/yuuno/user/profile.twig b/resources/views/yuuno/user/profile.twig index e6b3018..d2ea6c7 100644 --- a/resources/views/yuuno/user/profile.twig +++ b/resources/views/yuuno/user/profile.twig @@ -78,7 +78,7 @@ window.addEventListener('load', function () { {% if profile.lastfm %} var np = new Sakura.AJAX(); - np.SetUrl("{{ route('user.nowplaying', user.id) }}"); + np.SetUrl("{{ route('user.nowplaying', profile.id) }}"); np.AddCallback(200, function () { var data = np.JSON(), artist = Sakura.DOM.ID('np-artist'),