MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / filesSettings

Function filesSettings

src/settings/filesSettings.js:4–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import appSettings from "lib/settings";
3
4export default function filesSettings() {
5 const title = strings.settings;
6 const values = appSettings.value.fileBrowser;
7
8 const items = [
9 {
10 key: "sortByName",
11 text: strings["sort by name"],
12 checkbox: values.sortByName,
13 },
14 {
15 key: "showHiddenFiles",
16 text: strings["show hidden files"],
17 checkbox: values.showHiddenFiles,
18 info: strings["info-showHiddenFiles"],
19 },
20 {
21 key: "listFiles",
22 text: strings["title-listfiles"],
23 checkbox: values.listFiles !== false,
24 info:
25 strings["info-listFiles"] ||
26 "List all files in opened folders for quick search",
27 },
28 ];
29
30 return settingsPage(title, items, callback, undefined, {
31 preserveOrder: true,
32 pageClassName: "detail-settings-page",
33 listClassName: "detail-settings-list",
34 groupByDefault: true,
35 });
36
37 function callback(key, value) {
38 appSettings.value.fileBrowser[key] = value;
39 appSettings.update();
40 }
41}

Callers 1

FileBrowserIncludeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected