Merge pull request #403 from JoeForks/feature/welcome-modal

Added welcome modal
This commit is contained in:
Joe Cohen 2015-01-18 16:31:22 -06:00
commit dddb6ed972
8 changed files with 179 additions and 0 deletions

View File

@ -19,6 +19,7 @@ html, body {
@import "partials/navbar";
@import "partials/sidebar";
@import "partials/content";
@import "partials/modals";
// Styles for specific page
@import "pages/login";

View File

@ -0,0 +1,55 @@
#welcome-modal .modal-dialog {
margin-top: 65px;
}
#welcome-modal .modal-content .modal-header {
border-bottom: 0;
}
#welcome-modal .modal-content .modal-body {
padding-bottom: 50px;
}
#welcome-modal .modal-content .modal-body header {
text-align: center;
font-weight: 600;
font-size: 22px;
color: #444;
margin-bottom: 23px;
}
#welcome-modal .modal-content .modal-body p {
font-size: 13px;
color: #555;
margin: 0 auto;
width: 80%;
text-align: center;
line-height: 20px;
}
#welcome-modal .modal-content .modal-body .get-started {
margin-top: 40px;
}
#welcome-modal .modal-content .modal-body .get-started .col-md-4 {
text-align: center;
padding-bottom: 50px;
}
#welcome-modal .modal-content .modal-body .get-started .col-md-4 i {
font-size: 38px;
color: $cachet-gray-darker;
}
#welcome-modal .modal-content .modal-body .get-started .col-md-4 a {
color: $cachet-gray-darker;
display: block;
margin-top: 12px;
font-size: 13px;
}
#welcome-modal .modal-content .modal-body .go-dashboard {
text-align: center;
display: block;
margin-top: 10px;
}

View File

@ -128,4 +128,19 @@ return [
'whoops' => 'Oops.',
],
// Welcome modal
'welcome' => [
'welcome' => 'Welcome to Cachet',
'message' => 'Your status page is almost ready! You might want to configure these extra settings',
'close' => 'Just go straight to my dashboard',
'steps' => [
'component' => 'Create components',
'incident' => 'Create incidents',
'customize' => 'Customize your Cachet Status Page.',
'team' => 'Add users to your team.',
'api' => 'Generate API token.',
'two-factor' => 'Enable Two Factor Authetication.',
],
],
];

View File

@ -135,4 +135,19 @@ return [
'whoops' => 'Whoops.',
],
// Welcome modal
'welcome' => [
'welcome' => 'Welcome to Cachet',
'message' => 'Your status page is almost ready! You might want to configure these extra settings',
'close' => 'Just go straight to my dashboard',
'steps' => [
'component' => 'Create components',
'incident' => 'Create incidents',
'customize' => 'Customize your Cachet Status Page.',
'team' => 'Add users to your team.',
'api' => 'Generate API token.',
'two-factor' => 'Enable Two Factor Authetication.',
],
],
];

View File

@ -134,4 +134,19 @@ return [
'whoops' => 'Oups.',
],
// Welcome modal
'welcome' => [
'welcome' => 'Welcome to Cachet',
'message' => 'Your status page is almost ready! You might want to configure these extra settings',
'close' => 'Just go straight to my dashboard',
'steps' => [
'component' => 'Create components',
'incident' => 'Create incidents',
'customize' => 'Customize your Cachet Status Page.',
'team' => 'Add users to your team.',
'api' => 'Generate API token.',
'two-factor' => 'Enable Two Factor Authetication.',
],
],
];

View File

@ -44,4 +44,12 @@
</div>
</div>
</div>
@if(Session::get('setup.done'))
@include('partials.dashboard.welcome-modal')
<script>
$(function() {
$('#welcome-modal').modal('show');
});
</script>
@endif
@stop

View File

@ -0,0 +1,67 @@
<!-- First time welcome Modal -->
<div class="modal fade" id="welcome-modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
<header>
{{ trans('dashboard.welcome.welcome') }}
</header>
<p>
{{ trans('dashboard.welcome.message') }}
</p>
<div class="get-started">
<div class="row">
<div class="col-md-4 animated fadeInDown">
<i class="icon ion-ios-keypad"></i>
<a href="{{ route('dashboard.components.add') }}">
{{ trans('dashboard.welcome.steps.component') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown two">
<i class="icon ion-android-alert"></i>
<a href="{{ route('dashboard.incidents.add') }}">
{{ trans('dashboard.welcome.steps.incident') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown three">
<i class="icon ion-ios-paper-outline"></i>
<a href="{{ route('dashboard.settings.theme') }}">
{{ trans('dashboard.welcome.steps.customize') }}
</a>
</div>
</div>
<div class="row">
<div class="col-md-4 animated fadeInDown">
<i class="icons ion-ios-people"></i>
<a href="{{ route('dashboard.team.add') }}">
{{ trans('dashboard.welcome.steps.team') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown two">
<i class="icon ion-code-working"></i>
<a href="{{ route('dashboard.user') }}">
{{ trans('dashboard.welcome.steps.api') }}
</a>
</div>
<div class="col-md-4 animated fadeInDown three">
<i class="icon ion-unlocked"></i>
<a href="{{ route('dashboard.user') }}">
{{ trans('dashboard.welcome.steps.two-factor') }}
</a>
</div>
</div>
</div>
<a href="#" data-dismiss="modal" class="go-dashboard">
{{ trans('dashboard.welcome.close') }}
<i class="fa fa-angle-double-right"></i>
</a>
</div>
</div>
</div>
</div>

View File

@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Response;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\View;
@ -104,6 +105,8 @@ class SetupController extends Controller
]);
}
Session::flash('setup.done', true);
if (Request::ajax()) {
return Response::json(['status' => 1]);
}