Skip to content

Commit

Permalink
[#732] Updated ServicePanel
Browse files Browse the repository at this point in the history
  • Loading branch information
vasek committed Apr 6, 2016
1 parent d693151 commit 3bf40e4
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 33 deletions.
44 changes: 16 additions & 28 deletions frontend/src/ServicePanel/ServicePanel.less
@@ -1,9 +1,11 @@
@import '../common/mixins';

.ServicePanel {
clear: both;

&-wrapper {
overflow-y: hidden;
max-height: 500px;
max-height: 600px;
margin: 20px 0;

transition-property: margin, max-height;
Expand All @@ -16,41 +18,27 @@
}
}


&.welcome-panel {
margin-top: 0;
margin-bottom: 0;
padding-bottom: 20px;
padding: 20px;
}

&-row {
padding: 10px 0;
clear: both;
&-warning {
margin-top: 0 !important;
border-left: 5px solid #ffba00;
font-size: 18px !important;
padding: 1em;
}

&-label {
display: block;
font-weight: bold;
cursor: pointer;
&-inner {
width: 90%;
max-width: 1000px;
}

&-input {
input,
textarea {
line-height: 1.5;
width: 300px;
padding: 5px;
display: block;
}

textarea {
height: 6em;
resize: none;
}

&[data-description]:after {
display: block;
content: attr(data-description);
}
li {
font-size: 14px;
line-height: 1.65;
margin-bottom: 10px;
}
}
24 changes: 23 additions & 1 deletion frontend/src/ServicePanel/ServicePanel.react.tsx
@@ -1,6 +1,7 @@
/// <reference path='../../typings/typings.d.ts' />

import * as React from 'react';
import config from '../config';

import './ServicePanel.less';

Expand All @@ -12,11 +13,32 @@ export default class ServicePanel extends React.Component<ServicePanelProps, {}>

render() {
const className = 'ServicePanel-wrapper' + (this.props.display ? '' : ' ServicePanel-wrapper--hide');
const systemInfoUrl = config.api.adminUrl + '/admin.php?page=versionpress/admin/system-info.php';

return (
<div className={className}>
<div className='ServicePanel welcome-panel'>
<h3>VersionPress Service Panel</h3>
<div className='ServicePanel-inner'>
<p className='ServicePanel-warning'>
Currently, VersionPress is in an <a href="http://docs.versionpress.net/en/getting-started/about-eap"><strong>Early Access phase</strong></a>.<br />
Please understand that EAP releases are early versions of the software and as such might not fully support certain workflows, 3rd party plugins, hosts etc.
</p>

<h3>Community and support</h3>
<ul>
<li>
Having trouble using VersionPress?
Our <a href="http://docs.versionpress.net">documentation</a> has you covered.
</li>
<li>
Can’t find what you need?
Please visit our <a href="https://github.com/versionpress/support">support&nbsp;repository</a>.
</li>
<li>
<a href={systemInfoUrl}>System information</a> page.
</li>
</ul>
</div>
</div>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions frontend/src/VersionPressConfig.d.ts
Expand Up @@ -2,6 +2,7 @@ interface VersionPressConfig {

api?: {
root?: string;
adminUrl?: string;
urlPrefix?: string;
queryParam?: string;
permalinkStructure?: boolean|string;
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/config.local.sample.ts
Expand Up @@ -3,7 +3,8 @@
const config = {

api: {
root: 'http://localhost/wordpress'
root: 'http://localhost/wordpress',
adminUrl: 'http://localhost/wordpress/wp-admin'
}

};
Expand Down
1 change: 1 addition & 0 deletions frontend/src/config.ts
Expand Up @@ -8,6 +8,7 @@ const defaultConfig: VersionPressConfig = {

api: {
root: '',
adminUrl: '',
urlPrefix: 'wp-json',
queryParam: 'rest_route',
permalinkStructure: false,
Expand Down
1 change: 1 addition & 0 deletions plugins/versionpress/admin/inc/javascriptGui.php
@@ -1,6 +1,7 @@
<?php
$apiConfig = array(
'root' => get_site_url(),
'adminUrl' => get_admin_url(),
'urlPrefix' => rest_get_url_prefix(),
'queryParam' => 'rest_route',
'permalinkStructure' => get_option('permalink_structure'),
Expand Down
3 changes: 1 addition & 2 deletions plugins/versionpress/admin/system-info.php
@@ -1,7 +1,6 @@
<?php

use Utils\SystemInfo;
use VersionPress\Utils\RequirementsChecker;
use VersionPress\Utils\SystemInfo;

defined('ABSPATH') or die("Direct access not allowed");

Expand Down
1 change: 0 additions & 1 deletion plugins/versionpress/src/Utils/BugReporter.php
Expand Up @@ -2,7 +2,6 @@

namespace VersionPress\Utils;
use CURLFile;
use Utils\SystemInfo;

/**
* Helper class for sending bug reports
Expand Down

0 comments on commit 3bf40e4

Please sign in to comment.