hide existing, Replacement labels on mobile, we are having placeholders here
This commit is contained in:
parent
1d6add95ac
commit
7011bfd989
29
main.ts
29
main.ts
|
@ -1,4 +1,11 @@
|
||||||
import { App, Plugin, PluginSettingTab, Setting, TFile } from 'obsidian';
|
import {
|
||||||
|
App,
|
||||||
|
Plugin,
|
||||||
|
PluginSettingTab,
|
||||||
|
Setting,
|
||||||
|
TFile,
|
||||||
|
Platform,
|
||||||
|
} from 'obsidian';
|
||||||
|
|
||||||
import { FolderSuggest } from './src/suggestions/folderSuggest';
|
import { FolderSuggest } from './src/suggestions/folderSuggest';
|
||||||
import { renderDonateButton } from './src/components/DonateButton';
|
import { renderDonateButton } from './src/components/DonateButton';
|
||||||
|
@ -185,10 +192,15 @@ export class BulkRenameSettingsTab extends PluginSettingTab {
|
||||||
newSettings.infoEl.style.display = 'none';
|
newSettings.infoEl.style.display = 'none';
|
||||||
|
|
||||||
newSettings.addText((textComponent) => {
|
newSettings.addText((textComponent) => {
|
||||||
const previewLabel = createPreviewElement('Existing');
|
if (Platform.isDesktop) {
|
||||||
textComponent.inputEl.insertAdjacentElement('beforebegin', previewLabel);
|
const previewLabel = createPreviewElement('Existing');
|
||||||
|
textComponent.inputEl.insertAdjacentElement(
|
||||||
|
'beforebegin',
|
||||||
|
previewLabel,
|
||||||
|
);
|
||||||
|
}
|
||||||
textComponent.setValue(settings.existingSymbol);
|
textComponent.setValue(settings.existingSymbol);
|
||||||
textComponent.setPlaceholder('existing symbols');
|
textComponent.setPlaceholder('existing chars');
|
||||||
textComponent.onChange((newValue) => {
|
textComponent.onChange((newValue) => {
|
||||||
settings.existingSymbol = newValue;
|
settings.existingSymbol = newValue;
|
||||||
this.plugin.saveSettings();
|
this.plugin.saveSettings();
|
||||||
|
@ -198,8 +210,13 @@ export class BulkRenameSettingsTab extends PluginSettingTab {
|
||||||
});
|
});
|
||||||
|
|
||||||
newSettings.addText((textComponent) => {
|
newSettings.addText((textComponent) => {
|
||||||
const previewLabel = createPreviewElement('Replacement');
|
if (Platform.isDesktop) {
|
||||||
textComponent.inputEl.insertAdjacentElement('beforebegin', previewLabel);
|
const previewLabel = createPreviewElement('Replacement');
|
||||||
|
textComponent.inputEl.insertAdjacentElement(
|
||||||
|
'beforebegin',
|
||||||
|
previewLabel,
|
||||||
|
);
|
||||||
|
}
|
||||||
textComponent.setValue(settings.replacePattern);
|
textComponent.setValue(settings.replacePattern);
|
||||||
textComponent.setPlaceholder('replace with');
|
textComponent.setPlaceholder('replace with');
|
||||||
textComponent.onChange((newValue) => {
|
textComponent.onChange((newValue) => {
|
||||||
|
|
Loading…
Reference in New Issue