Skip to content

Commit f178de0

Browse files
slusarzsirainen
authored andcommitted
settings: Allow types to hide default entry completely
1 parent e3922e1 commit f178de0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

components/SettingsComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const d = Object.fromEntries(Object.entries(data).filter(([k, v]) =>
7575
7676
<table class="settingsListTable">
7777
<tbody>
78-
<tr>
78+
<tr v-if="!v.no_default">
7979
<th>Default</th>
8080
<td>
8181
<span v-if="v.default !== undefined" v-html="v.default" />

lib/data/settings.data.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ async function normalizeSettings(settings) {
9494
throw new Error("Incorrect value type for " + k)
9595
}
9696
v2.url = md.renderInline(v2.url)
97+
98+
if (v2.no_default) {
99+
v.no_default = true
100+
}
97101
}
98102

99103
for (const k2 of ['added', 'changed', 'deprecated', 'removed']) {

lib/settings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export const setting_types = {
5151
},
5252
NAMED_FILTER: {
5353
label: 'Named Filter',
54-
url: '[[link,settings_types_named_filter]]'
54+
url: '[[link,settings_types_named_filter]]',
55+
no_default: true,
5556
},
5657
NAMED_LIST_FILTER: {
5758
label: 'Named List Filter',

0 commit comments

Comments
 (0)