Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit e613089

Browse files
committed
Merge branch 'hotfix2.6.0'
2 parents 04083f3 + bd20e84 commit e613089

File tree

3 files changed

+28
-11
lines changed

3 files changed

+28
-11
lines changed

src/helpers/QueryHelper.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ import { DatabaseCore } from "helpers/Constants";
33
import { LOGGER } from "services/Logger";
44

55
export function generateDataviewTableQuery(columns: TableColumn[], fromQuery: string): string {
6-
return `TABLE ${columns
6+
LOGGER.info('generateDataviewTableQuery');
7+
const query = `TABLE ${columns
78
.filter((col) => !col.isMetadata)
8-
.map((col) => `"${col.key}"`)
9-
.join(",")},${DatabaseCore.DATAVIEW_FILE},${DatabaseCore.FRONTMATTER_KEY} ${fromQuery}`
9+
.map((col) => `${col.key}`)
10+
.join(",")},${DatabaseCore.DATAVIEW_FILE},${DatabaseCore.FRONTMATTER_KEY} ${fromQuery}`;
11+
LOGGER.info(`DV query of the source: ${query}`);
12+
return query;
1013
}
1114

1215

src/settings/AutomationSection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { FormulaJSFolderHandler } from 'settings/handlers/automation/FormulaJSFo
66

77
class AutomationSetttingsSection extends AbstractChain<SettingHandlerResponse> {
88
protected customHandle(settingHandlerResponse: SettingHandlerResponse): SettingHandlerResponse {
9-
const columns_section = settingHandlerResponse.containerEl.createDiv("configuration-section-container-automations");
9+
const automation_section = settingHandlerResponse.containerEl.createDiv("configuration-section-container-automations");
1010
// title of the section
11-
add_setting_header(columns_section, "Automations related the table", 'h3');
12-
settingHandlerResponse.containerEl = columns_section;
11+
add_setting_header(automation_section, "Automations related the table", 'h3');
12+
settingHandlerResponse.containerEl = automation_section;
1313
return settingHandlerResponse;
1414
}
1515
protected getHandlers(): AbstractHandler<SettingHandlerResponse>[] {

src/settings/handlers/automation/FormulaJSFolderHandler.ts

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,25 @@ import { AbstractSettingsHandler, SettingHandlerResponse } from "settings/handle
33
import { FolderSuggest } from "settings/suggesters/FolderSuggester";
44

55
export class FormulaJSFolderHandler extends AbstractSettingsHandler {
6-
settingTitle: string = 'Select the source of database data';
6+
settingTitle: string = 'Select the source of your formula JS files';
77
handle(settingHandlerResponse: SettingHandlerResponse): SettingHandlerResponse {
8-
const { containerEl, view } = settingHandlerResponse;
8+
const { settingsManager, containerEl, view, local } = settingHandlerResponse;
99
const formula_folder_promise = async (value: string): Promise<void> => {
10-
// update settings
11-
view.diskConfig.updateConfig({ formula_folder_path: value });
10+
if (local) {
11+
// update settings
12+
view.diskConfig.updateConfig({ formula_folder_path: value });
13+
} else {
14+
// switch show created on/off
15+
const update_local_settings = settingsManager.plugin.settings.local_settings;
16+
update_local_settings.formula_folder_path = value;
17+
// update settings
18+
await settingsManager.plugin.updateSettings({
19+
local_settings: update_local_settings
20+
});
21+
}
22+
1223
};
24+
console.log('FormulaJSFolderHandler bejore');
1325
// render dropdown inside container
1426
new Setting(containerEl)
1527
.setName('Select the formula JS folder')
@@ -19,9 +31,11 @@ export class FormulaJSFolderHandler extends AbstractSettingsHandler {
1931
cb.inputEl
2032
);
2133
cb.setPlaceholder("Example: path/to/folder")
22-
.setValue(view.diskConfig.yaml.config.formula_folder_path)
34+
.setValue(local ? view.diskConfig.yaml.config.formula_folder_path : settingsManager.plugin.settings.local_settings.formula_folder_path)
2335
.onChange(formula_folder_promise);
2436
});
37+
38+
console.log('FormulaJSFolderHandler after');
2539
return this.goNext(settingHandlerResponse);
2640
}
2741
}

0 commit comments

Comments
 (0)