Compare commits

...

2 Commits

Author SHA1 Message Date
occheung 49488577f8 fix order hardware button text centering 2021-06-02 09:07:46 +08:00
occheung 8c3a35cea4 fix JSON validation 2021-06-01 17:03:26 +08:00
3 changed files with 5 additions and 11 deletions

View File

@ -183,10 +183,6 @@ class Layout extends React.PureComponent {
checkValidation(conf) {
let conf_obj;
if (!conf) {
conf = this.state.customconf;
}
try {
conf_obj = JSON.parse(conf);
} catch (e) {
@ -281,7 +277,7 @@ class Layout extends React.PureComponent {
}
handleClickLoad() {
this.checkValidation();
this.checkValidation(this.state.customconf);
if (this.props.onClickLoadCustomConf) {
this.props.onClickLoadCustomConf(this.state.customconf_ready);

View File

@ -227,10 +227,6 @@ var Layout = /*#__PURE__*/function (_React$PureComponent) {
value: function checkValidation(conf) {
var conf_obj;
if (!conf) {
conf = this.state.customconf;
}
try {
conf_obj = JSON.parse(conf);
} catch (e) {
@ -315,7 +311,7 @@ var Layout = /*#__PURE__*/function (_React$PureComponent) {
}, {
key: "handleClickLoad",
value: function handleClickLoad() {
this.checkValidation();
this.checkValidation(this.state.customconf);
if (this.props.onClickLoadCustomConf) {
this.props.onClickLoadCustomConf(this.state.customconf_ready);

View File

@ -83,7 +83,9 @@
<div class="dropdown-menu shadow-none shadow-lg text-left text-lg-left" aria-labelledby="navbarDropdown">
{% for tmp_page in subsection.pages %}
{% if tmp_page.extra.menu_item and tmp_page.extra.menu_item == "th1" %}
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink }}">{{ tmp_page.title }}</a>
<a class="dropdown-item pt-2 pb-2 mx-4 mt-2 mb-2 mt-sm-3 mb-sm-3 w-auto btn btn-primary btn-inversed {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink }}">
<center>{{ tmp_page.title }}</center>
</a>
{% else %}
<a class="dropdown-item pt-2 pb-2 {% if current_path == tmp_page.path %}active{% endif %}" href="{{ tmp_page.permalink }}">{{ tmp_page.title }}</a>
{% endif %}