kempo 4.2.26 → 4.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
const myPerms = new Set(permData?.permissions ?? []);
|
|
94
94
|
|
|
95
95
|
const fields = [
|
|
96
|
-
{ name: '
|
|
96
|
+
{ name: 'locked', label: '', size: 40, calculator: r => r.locked ? html`<k-icon name="lock"></k-icon>` : html`` },
|
|
97
97
|
{ name: 'name', label: 'Name', size: 200 },
|
|
98
98
|
{ name: 'file', label: 'File', size: 300 },
|
|
99
99
|
{ name: 'author', label: 'Author', size: 150 },
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
Toast.error(error.msg || 'Failed to load fragments');
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
const toEditPath = f => ({ ...f, editPath: f.file.replace(/\.fragment\.html$/, '')
|
|
119
|
+
const toEditPath = f => ({ ...f, editPath: f.file.replace(/\.fragment\.html$/, '') });
|
|
120
120
|
const custom = data.fragments.filter(f => f.owner === 'custom').map(toEditPath);
|
|
121
121
|
const extension = data.fragments.filter(f => f.owner !== 'custom' && f.owner !== 'system').map(toEditPath);
|
|
122
122
|
const system = data.fragments.filter(f => f.owner === 'system').map(toEditPath);
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
const myPerms = new Set(permData?.permissions ?? []);
|
|
95
95
|
|
|
96
96
|
const fields = [
|
|
97
|
-
{ name: '
|
|
97
|
+
{ name: 'locked', label: '', size: 40, calculator: r => r.locked ? html`<k-icon name="lock"></k-icon>` : html`` },
|
|
98
98
|
{ name: 'name', label: 'Name', size: 200 },
|
|
99
99
|
{ name: 'location', label: 'Location', size: 150 },
|
|
100
100
|
{ name: 'priority', label: 'Priority', size: 80 },
|
|
@@ -112,17 +112,15 @@
|
|
|
112
112
|
const $extensionTable = document.getElementById('extensionTable');
|
|
113
113
|
const $systemTable = document.getElementById('systemTable');
|
|
114
114
|
|
|
115
|
-
const addBadge = e => ({ ...e, lockedBadge: e.locked ? '<k-icon name="lock"></k-icon>' : '' });
|
|
116
|
-
|
|
117
115
|
const loadEntries = async () => {
|
|
118
116
|
const [error, data] = await listGlobalContent();
|
|
119
117
|
if(error){
|
|
120
118
|
Toast.error(error.msg || 'Failed to load global content');
|
|
121
119
|
return;
|
|
122
120
|
}
|
|
123
|
-
const custom = data.entries.filter(e => e.owner === 'custom')
|
|
124
|
-
const extension = data.entries.filter(e => e.owner !== 'custom' && e.owner !== 'system')
|
|
125
|
-
const system = data.entries.filter(e => e.owner === 'system')
|
|
121
|
+
const custom = data.entries.filter(e => e.owner === 'custom');
|
|
122
|
+
const extension = data.entries.filter(e => e.owner !== 'custom' && e.owner !== 'system');
|
|
123
|
+
const system = data.entries.filter(e => e.owner === 'system');
|
|
126
124
|
$customTable.setData({ records: custom, fields });
|
|
127
125
|
$extensionTable.setData({ records: extension, fields: extensionFields });
|
|
128
126
|
$systemTable.setData({ records: system, fields });
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
const myPerms = new Set(permData?.permissions ?? []);
|
|
124
124
|
|
|
125
125
|
const fields = [
|
|
126
|
-
{ name: '
|
|
126
|
+
{ name: 'locked', label: '', size: 40, calculator: r => r.locked ? html`<k-icon name="lock"></k-icon>` : html`` },
|
|
127
127
|
{ name: 'name', label: 'Name', size: 150 },
|
|
128
128
|
{ name: 'directory', label: 'Directory', size: 200 },
|
|
129
129
|
{ name: 'author', label: 'Author', size: 150 },
|
|
@@ -149,8 +149,7 @@
|
|
|
149
149
|
const toEditPath = t => ({
|
|
150
150
|
...t,
|
|
151
151
|
directory: t.directory === '.' ? '/' : t.directory,
|
|
152
|
-
editPath: (t.directory === '.' ? t.name : `${t.directory}/${t.name}`)
|
|
153
|
-
lockedBadge: t.locked ? '<k-icon name="lock"></k-icon>' : ''
|
|
152
|
+
editPath: (t.directory === '.' ? t.name : `${t.directory}/${t.name}`)
|
|
154
153
|
});
|
|
155
154
|
const custom = data.templates.filter(t => t.owner === 'custom').map(toEditPath);
|
|
156
155
|
const extension = data.templates.filter(t => t.owner !== 'custom' && t.owner !== 'system').map(toEditPath);
|