Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.1
v0.0.2
2 changes: 1 addition & 1 deletion info.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "LaswitchTech",
"email": "support@laswitchtech.com",
"date": "2025-08-25",
"version": "v0.0.1",
"version": "v0.0.2",
"tags": "extensions, plugins, modules, themes, management",
"description": "Manage installed modules, plugins, and themes in your application.",
"repository": "https://github.com/LaswitchTech/core-plugin-components",
Expand Down
82 changes: 41 additions & 41 deletions library.js
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ builder.add('layouts','index', class extends builder.ComponentClass {
advancedSearch: false,
showButtonsLabel: false,
interval: 15000,
autoStart: true,
autoStart: false,
callback: {},
};
this._data = {};
Expand Down Expand Up @@ -782,49 +782,49 @@ builder.add('layouts','index', class extends builder.ComponentClass {
// Set _datatable
self.datatable(datatable);

// Check if autoStart is enabled
if(self._properties.autoStart){

// Retrieve Records
$.ajax({
url: self._properties.url,
headers: {'X-CSRF-Authorization': CSRF_KEY},
type: 'POST',dataType: 'json',
data: {
conditions: self._properties.conditions,
},
error: function(xhr, status, error) {
let color = 'info', icon = 'question-circle', title = builder.Locale.get(xhr.statusText), content = builder.Locale.get(xhr.responseText);
switch(xhr.status){
case 403: color = 'danger'; icon = 'shield-lock'; break;
case 404: color = 'warning'; icon = 'question-diamond'; break;
case 500: color = 'danger'; icon = 'bug'; break;
}
self._builder.Component(
"alert",
self._component,
{
class: {
component: 'm-3',
},
dismissible: false,
icon:icon,
color:color,
title:title
// Retrieve Records
$.ajax({
url: self._properties.url,
headers: {'X-CSRF-Authorization': CSRF_KEY},
type: 'POST',dataType: 'json',
data: {
conditions: self._properties.conditions,
},
error: function(xhr, status, error) {
let color = 'info', icon = 'question-circle', title = builder.Locale.get(xhr.statusText), content = builder.Locale.get(xhr.responseText);
switch(xhr.status){
case 403: color = 'danger'; icon = 'shield-lock'; break;
case 404: color = 'warning'; icon = 'question-diamond'; break;
case 500: color = 'danger'; icon = 'bug'; break;
}
self._builder.Component(
"alert",
self._component,
{
class: {
component: 'm-3',
},
function(alert,component){
component.content.html('<pre class="m-0 p-2">'+content+'</pre>');
}
);
},
success: function(response) {

// Add Records
for(const [key, record] of Object.entries(response.records)){
self.add(record);
dismissible: false,
icon:icon,
color:color,
title:title
},
function(alert,component){
component.content.html('<pre class="m-0 p-2">'+content+'</pre>');
}
);
},
success: function(response) {

// Add Records
for(const [key, record] of Object.entries(response.records)){
self.add(record);
}
});
}
});

// Check if autoStart is enabled
if(self._properties.autoStart){

// Start
self.start();
Expand Down