Skip to content

Commit

Permalink
Merge pull request #122 from Codeinwp/development
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
selul authored Jul 22, 2019
2 parents 08edbb9 + 10484bb commit 6c71418
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
7 changes: 4 additions & 3 deletions assets/vue/components/exclusions.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<template>
<div :class="{ 'saving--option' : this.$store.state.loading }">
<div class="columns is-desktop" id="filters-list">
<div class="column ">
<div id="filters-list">
<div class="columns ">
<filter-control :type="'optimize'"></filter-control>
</div>
<div class="column " v-if="this.$store.state.site_settings.lazyload === 'enabled'">
<hr/>
<div class="columns " v-if="this.$store.state.site_settings.lazyload === 'enabled'">
<filter-control :type="'lazyload'"></filter-control>
</div>
</div>
Expand Down
21 changes: 14 additions & 7 deletions assets/vue/components/options.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:class="tab === 'resize' ? 'is-active' : ''"
:title="all_strings.settings_resize_menu_item+' '+all_strings.settings_menu_item">{{all_strings.settings_resize_menu_item}}</a>
</li>
<li><a @click="changeTab('lazyload')" href="#"
<li v-if="this.$store.state.site_settings.lazyload==='enabled'"><a @click="changeTab('lazyload')" href="#"
:class="tab === 'lazyload' ? 'is-active' : ''"
:title="all_strings.lazyload_settings_menu_item+' '+all_strings.lazyload_settings_menu_item">{{all_strings.lazyload_settings_menu_item}}</a>
</li>
Expand Down Expand Up @@ -54,14 +54,14 @@
</template>

<script>
import General from "./general.vue";
import Compression from "./compression.vue";
import Watermarks from "./watermarks.vue";
import Resize from "./resize.vue";
import Exclusions from "./exclusions.vue";
import General from "./general.vue";
import Compression from "./compression.vue";
import Watermarks from "./watermarks.vue";
import Resize from "./resize.vue";
import Exclusions from "./exclusions.vue";
import Lazyload from "./lazyload.vue";
export default {
export default {
name: "options",
components: {Lazyload, Exclusions, Resize, Watermarks, Compression, General},
data() {
Expand All @@ -79,6 +79,13 @@
methods: {
ToggleAdvanced() {
this.advancedOpen = !this.advancedOpen;
if (!this.advancedOpen) {
this.tab = 'general';
}
if (this.advancedOpen) {
this.tab = 'compression';
}
},
changeTab(value) {
this.tab = value;
Expand Down
2 changes: 1 addition & 1 deletion assets/vue/components/resize.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</p>
</label>

<div class="column is-5 ">
<div class="column is-6 ">
<div class="columns">
<div class="field column is-narrow has-addons">
<p class="control">
Expand Down
4 changes: 2 additions & 2 deletions inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function daily_sync() {

$request = new Optml_Api();
$data = $request->get_user_data( $api_key );
if ( $data === false ) {
if ( $data === false || is_wp_error( $data ) ) {
return;
}

Expand Down Expand Up @@ -551,7 +551,7 @@ private function get_dashboard_strings() {
'enable_network_opt_title' => __( 'Enable network based optimizations', 'optimole-wp' ),
'enable_resize_smart_title' => __( 'Enable Smart Cropping', 'optimole-wp' ),
'enable_lazyload_placeholder_title' => __( 'Enable generic lazyload placeholder', 'optimole-wp' ),
'enable_lazyload_placeholder_desc' => __( 'Optimole will use a generic lazyload placeholder instead of the low quality version of your image when doing the lazyload.', 'optimole-wp' ),
'enable_lazyload_placeholder_desc' => __( 'Enabling this might affect the user experience in some cases, however it will reduce the number of total requests and page weight. Try it out and see how works best for you!', 'optimole-wp' ),
'show' => __( 'Show', 'optimole-wp' ),
'filter_operator_contains' => __( 'contains', 'optimole-wp' ),
'filter_operator_is' => __( 'is', 'optimole-wp' ),
Expand Down

0 comments on commit 6c71418

Please sign in to comment.