Skip to content
Permalink
Browse files

Fix email template

1. Change email-related routes to static.munpanel.com
2. Update account verification logic so that static.munpanel.com loads correctly
3. Remove deprecated links in email template

Change-Id: I1bfd6dd01d4053e2bca7a324f1007d750bc250d8
  • Loading branch information...
adamyi committed Mar 5, 2018
1 parent 9c7d7d6 commit 6e1f6ffb3e9c11c098c4b7449f0a4791870862d6
Showing with 8 additions and 8 deletions.
  1. +1 −1 app/Http/Middleware/CheckVerification.php
  2. +5 −5 resources/views/emailTemplate.blade.php
  3. +2 −2 routes/web.php
@@ -34,7 +34,7 @@ public function handle($request, Closure $next)
{
$route = $request->route()->uri;
///*
if (substr($route, 0, 6) != 'verify' && $route != 'logout') {
if (substr($route, 0, 6) != 'verify' && $route != 'logout' && $request->getHost() != "static.munpanel.com") {
if ($user->emailVerificationToken != 'success')
return redirect()->guest(route('verifyEmail'));
if ($user->telVerifications != -1) //3/2/1: tries left; -1: activated
@@ -110,23 +110,23 @@
</head>
<body>
@if(!isset($webView) && !isset($fromHuman))
<div class="extra">完整HTML版邮件请见:{{mp_url('/showEmail/'.$id)}}</div>
<div class="extra">完整HTML版邮件请见:https://static.munpanel.com/showEmail/{{$id}}</div>
@endif
<div class="container">
<div class="header">
<img src="{{mp_url('/emailLogo.png?'.$id)}}">
<img src="https://static.munpanel.com/emailLogo.png?{{$id}}">
</div>
<div class="body">
<p>{!!$content!!}</p>

<div class="footer">
<a href="https://www.munpanel.com">MUNPANEL</a>
&middot;
<a href="https://kb.bjmun.org/console-lite/">Console Lite</a>
<a href="https://git.yiad.am">Open Source</a>
&middot;
<a href="https://bjmun.org/console-it/client">Console iT Client</a>
<a href="https://github.com/MUNPANEL">GitHub</a>
&middot;
<a href="https://munl.ink">MUNLink</a>
<a href="https://static.munpanel.com/terms/">Terms</a>{{--TODO: implement this.--}}
</div>
</div>
</div>
@@ -134,6 +134,8 @@
Route::get('/', function () {
return "MUNPANEL static caching service provided by Akamai and ChinaNetCenter (网宿科技)";
});
Route::get('/showEmail/{id}', 'EmailController@showEmail');
Route::get('/emailLogo.png', 'EmailController@emailLogo');
});
@@ -157,8 +159,6 @@
Route::get('/aboutDebug', 'HomeController@aboutDebug');
Route::get('/aboutSudo', 'HomeController@aboutSUDO');
Route::get('/showEmail/{id}', 'EmailController@showEmail');
Route::get('/emailLogo.png', 'EmailController@emailLogo');
//Route::get('/sendDaisResult', 'EmailController@sendDaisResult');
Route::get('/resendMail/{id}', 'EmailController@resend');
//Route::get('/daisBJMUN', 'EmailController@daisBJMUN');

0 comments on commit 6e1f6ff

Please sign in to comment.
You can’t perform that action at this time.