Skip to content

Commit

Permalink
Merge pull request #15 from baddiservices/dev
Browse files Browse the repository at this point in the history
Undo queue delay
  • Loading branch information
5baddi authored Jan 1, 2021
2 parents d42579e + 1df82af commit c169aec
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 56 deletions.
1 change: 0 additions & 1 deletion app/Http/Controllers/InfluencerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace App\Http\Controllers;

use App\Brand;
use App\Campaign;
use App\Influencer;
use App\InfluencerPost;
use App\BrandInfluencer;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/TrackerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ public function create(CreateTrackerRequest $request)
]);

// Dispatch scraping job
ScrapURLContentJob::dispatch($ShortLink->load('tracker'))->onQueue('trackers')->delay(Carbon::now()->addSeconds(60));
ScrapURLContentJob::dispatch($ShortLink->load('tracker'))->onQueue('trackers');
}

// Dispatch scraping job
if(in_array($tracker->platform, ['instagram', 'youtube']) && $tracker->type === 'post')
ScrapPostJob::dispatch($tracker)->onQueue('trackers')->delay(Carbon::now()->addSeconds(60));
ScrapPostJob::dispatch($tracker)->onQueue('trackers');

return response()->success(
"Tracker created successfully.",
Expand Down
2 changes: 1 addition & 1 deletion config/scraper.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

return [
'version' => '0.3.9',
'version' => '0.4.0',
'support' => env('SUPPORT_EMAIL'),
'usd2eur' => env('USD2EUR'),
'fbcost_perimpressions' => env('FBCOSTPERIMPRESSIONS'),
Expand Down
76 changes: 43 additions & 33 deletions public/5.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ({
data: function data() {
return {
isNavOpen: true
navCurrentState: true
};
},
props: {
Expand All @@ -113,33 +113,31 @@ __webpack_require__.r(__webpack_exports__);
computed: {
currentRouteName: function currentRouteName() {
return this.$route.name;
},
isNavOpen: function isNavOpen() {
return this.navCurrentState;
}
},
methods: {
toggle: function toggle() {
this.isNavOpen = !this.isNavOpen;
this.navCurrentState = !this.navCurrentState;

if (this.navCurrentState === false) {
document.body.classList.add("nav-collapsed");
document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass);
} else {
document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass);
document.body.classList.remove("nav-collapsed");
}
},
addClass: function addClass() {
document.body.classList.add("nav-collapsed");
},
removeClass: function removeClass() {
document.body.classList.remove("nav-collapsed");
}
},
watch: {
isNavOpen: {
handler: function handler(newValue, oldValue) {
if (newValue === false) {
document.body.classList.add("nav-collapsed");
document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass);
} else if (newValue === true) {
document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass);
document.body.classList.remove("nav-collapsed");
}
}
}
}
});

Expand Down Expand Up @@ -524,23 +522,35 @@ var render = function() {
{ staticClass: "logo" },
[
_c("router-link", { attrs: { to: { name: "dashboard" } } }, [
_vm.isNavOpen
? _c("img", {
attrs: {
src: __webpack_require__(/*! @assets/img/log-inf.png */ "./resources/assets/img/log-inf.png"),
alt: "logo"
}
})
: _vm._e(),
_c("img", {
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.isNavOpen,
expression: "isNavOpen"
}
],
attrs: {
src: __webpack_require__(/*! @assets/img/log-inf.png */ "./resources/assets/img/log-inf.png"),
alt: "logo"
}
}),
_vm._v(" "),
!_vm.isNavOpen
? _c("img", {
attrs: {
src: __webpack_require__(/*! @assets/img/log-inf-mini.png */ "./resources/assets/img/log-inf-mini.png"),
alt: "logo"
}
})
: _vm._e()
_c("img", {
directives: [
{
name: "show",
rawName: "v-show",
value: !_vm.isNavOpen,
expression: "!isNavOpen"
}
],
attrs: {
src: __webpack_require__(/*! @assets/img/log-inf-mini.png */ "./resources/assets/img/log-inf-mini.png"),
alt: "logo"
}
})
])
],
1
Expand Down
36 changes: 17 additions & 19 deletions resources/js/components/navigations/MainNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div class="dashboard__sidebar--content">
<div class="logo">
<router-link :to="{name : 'dashboard'}">
<img v-if="isNavOpen" src="@assets/img/log-inf.png" alt="logo" />
<img v-if="!isNavOpen" src="@assets/img/log-inf-mini.png" alt="logo" />
<img v-show="isNavOpen" src="@assets/img/log-inf.png" alt="logo" />
<img v-show="!isNavOpen" src="@assets/img/log-inf-mini.png" alt="logo" />
</router-link>
</div>
</div>
Expand Down Expand Up @@ -92,7 +92,7 @@
export default {
data() {
return {
isNavOpen: true
navCurrentState: true
};
},
props:{
Expand All @@ -103,11 +103,24 @@ export default {
computed: {
currentRouteName() {
return this.$route.name;
},
isNavOpen(){
return this.navCurrentState;
}
},
methods: {
toggle() {
this.isNavOpen = !this.isNavOpen;
this.navCurrentState = !this.navCurrentState;
if(this.navCurrentState === false){
document.body.classList.add("nav-collapsed");
document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass);
}else{
document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass);
document.body.classList.remove("nav-collapsed");
}
},
addClass() {
document.body.classList.add("nav-collapsed");
Expand All @@ -116,20 +129,5 @@ export default {
document.body.classList.remove("nav-collapsed");
}
},
watch: {
isNavOpen: {
handler(newValue, oldValue) {
if (newValue === false) {
document.body.classList.add("nav-collapsed");
document.getElementById("main-sidebar").addEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").addEventListener("mouseleave", this.addClass);
} else if (newValue === true) {
document.getElementById("main-sidebar").removeEventListener("mouseenter", this.removeClass);
document.getElementById("main-sidebar").removeEventListener("mouseleave", this.addClass);
document.body.classList.remove("nav-collapsed");
}
}
}
}
};
</script>

0 comments on commit c169aec

Please sign in to comment.