Skip to content

Commit

Permalink
Merge branch '2.x-release/v2.2.7' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
themodernpk committed Mar 13, 2024
2 parents 5e594cf + a69a8f8 commit a5590ed
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 44 deletions.
2 changes: 1 addition & 1 deletion Config/vaahcms.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$settings = [
'app_name' => 'VaahCMS',
'app_slug' => 'vaahcms',
'version' => '2.2.6',
'version' => '2.2.7',
'php_version_required' => '8.1',
'get_config_version' => false,
'website' => 'https://vaah.dev/cms',
Expand Down
40 changes: 20 additions & 20 deletions Resources/assets/backend/vaahtwo/build/Sidebar.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Resources/assets/backend/vaahtwo/build/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Resources/assets/backend/vaahtwo/build/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Vue/vaahtwo/pages/settings/update/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ onMounted(async () => {
<div class="col-3">
<ol class="pl-3">
<li class="mb-2">
{{root.assets.language_strings.update_vaah.downloading_latest_version}}
{{root.assets.language_strings.update.downloading_latest_version}}
<i v-if="store.status.download_latest_version === 'success'"
class="pi pi-check"></i>
<i v-else-if="store.status.download_latest_version === 'pending'"
Expand Down
5 changes: 4 additions & 1 deletion Vue/vaahtwo/pages/users/components/FileUploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ function uploadFile(e){
}
}).then(res=>{
upload_refs.value.uploadedFiles[0] = file;
store.storeAvatar(res.data.data);
if(res && res.data && res.data.data){
store.storeAvatar(res.data.data);
}
});
})
}
Expand Down
15 changes: 9 additions & 6 deletions Vue/vaahtwo/stores/store-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export const useModuleStore = defineStore({
*/
default:
options.method = 'PATCH';
options.callback_params = item.id;
ajax_url += '/'+item.id+'/action/'+type;
break;
}
Expand All @@ -433,7 +434,7 @@ export const useModuleStore = defineStore({
);
},
//---------------------------------------------------------------------
async itemActionAfter(data, res)
async itemActionAfter(data, res, item_id = null)
{
if(data)
{
Expand All @@ -446,14 +447,16 @@ export const useModuleStore = defineStore({
await root.reloadAssets();
await this.formActionAfter();
this.getItemMenu();
if(data.item){
await this.resetActivateBtnLoader(this.form.action,data.item);
}

}

if(item_id){
await this.resetActivateBtnLoader(this.form.action,item_id);
}
},
//---------------------------------------------------------------------
async resetActivateBtnLoader(action,item) {
let index = this.active_action.indexOf(action+'_'+item.id);
async resetActivateBtnLoader(action,item_id) {
let index = this.active_action.indexOf(action+'_'+item_id);
this.active_action.splice(index,1);
},
//---------------------------------------------------------------------
Expand Down
13 changes: 7 additions & 6 deletions Vue/vaahtwo/stores/store-themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ export const useThemeStore = defineStore({
*/
default:
options.method = 'PATCH';
options.callback_params = item.id;
ajax_url += '/'+item.id+'/action/'+type;
break;
}
Expand All @@ -433,7 +434,7 @@ export const useThemeStore = defineStore({
);
},
//---------------------------------------------------------------------
async itemActionAfter(data, res)
async itemActionAfter(data, res, item_id = null)
{
if (data)
{
Expand All @@ -444,10 +445,10 @@ export const useThemeStore = defineStore({
this.item = data;
await root.reloadAssets();
await this.formActionAfter();
if(data.item){
await this.resetActivateBtnLoader(this.form.action,data.item)
}
}

if(item_id){
await this.resetActivateBtnLoader(this.form.action,item_id);
}
},
//---------------------------------------------------------------------
Expand Down Expand Up @@ -489,8 +490,8 @@ export const useThemeStore = defineStore({
}
},
//---------------------------------------------------------------------
async resetActivateBtnLoader(action,item) {
let index = this.active_action.indexOf(action+'_'+item.id);
async resetActivateBtnLoader(action,item_id) {
let index = this.active_action.indexOf(action+'_'+item_id);
this.active_action.splice(index,1);
},
//---------------------------------------------------------------------
Expand Down
13 changes: 8 additions & 5 deletions Vue/vaahtwo/vaahvue/pinia/vaah.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const vaah = defineStore({
query: null,
headers: null,
show_success: true,
callback_params: null,
}
) {

Expand All @@ -33,7 +34,8 @@ export const vaah = defineStore({
method: 'get',
query: null,
headers: null,
show_toast: true,
show_success: true,
callback_params: null,
}

if(options)
Expand All @@ -48,7 +50,8 @@ export const vaah = defineStore({
let method = default_option.method.toLowerCase();
let query = default_option.query;
let headers = default_option.headers;
let show_toast = default_option.show_toast;
let show_success = default_option.show_success;
let callback_params = default_option.callback_params;



Expand Down Expand Up @@ -99,16 +102,16 @@ export const vaah = defineStore({
let ajax = await axios[method](url, params, q)
.then(function (response) {
self.show_progress_bar = false;
if(show_toast){
if(show_success){
self.processResponse(response);
}
if(callback)
{
if(response.data && response.data.data)
{
callback(response.data.data, response);
callback(response.data.data, response,callback_params);
} else{
callback(false, response);
callback(false, response,callback_params);
}
}
return response;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webreinvent/vaahcms",
"version": "2.2.6",
"version": "2.2.7",
"description": "VaahCMS is a laravel based open-source web application development platform shipped with headless content management system.",
"keywords": ["vaahcms", "headless", "hmvc", "laravel", "cms", "vue", "pinia"],
"homepage": "https://webreinvent.com",
Expand Down

0 comments on commit a5590ed

Please sign in to comment.