Skip to content

Commit

Permalink
Update cited and citing max limit descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Anoop K. Chandran committed Dec 10, 2023
1 parent a98542d commit d0f4fc1
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 53 deletions.
8 changes: 6 additions & 2 deletions src/lang/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,13 @@ export default {
'<b>Toggle OFF:</b> Default sorting, as appear in the markdown',
SORT_BY: 'Sort By',
CITED_MAX_LIMIT: 'Maximum number of cited papers',
CITED_MAX_LIMIT_DESC: 'Maximum number of cited papers to show for each index card.<br>' + ' Default is set to 100. Maximum is 1000.',
CITED_MAX_LIMIT_DESC: 'Maximum number of cited papers to show for each index card.<br>' +
' Default is set to 100. Maximum is 1000.<br>' +
'<b>Warning:</b> Increasing this value will increase the loading time of the literature graph.',
CITING_MAX_LIMIT: 'Maximum number of citing papers',
CITING_MAX_LIMIT_DESC: 'Maximum number of citing papers to show for each index card.<br>' + ' Default is set to 100. Maximum is 1000.',
CITING_MAX_LIMIT_DESC: 'Maximum number of citing papers to show for each index card.<br>' +
' Default is set to 100. Maximum is 1000.<br>' +
'<b>Warning:</b> Increasing this value will increase the loading time of the literature graph.',
// SORT_BY_DESC: "Sort references and citations by the selected value",
SORT_BY_YEAR: 'Year',
SORT_BY_CITATION_COUNT: 'Citation count',
Expand Down
99 changes: 48 additions & 51 deletions src/settings/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,57 +294,6 @@ export class ReferenceMapSettingTab extends PluginSettingTab {
)
}

let citedMaxLimit: HTMLDivElement
new Setting(containerEl)
.setName(t('CITED_MAX_LIMIT'))
// .setDesc(fragWithHTML(t('CITED_MAX_LIMIT_DESC')))
.addSlider((slider) =>
slider
.setLimits(50, 1000, 50)
.setValue(this.plugin.settings.citedLimit)
.onChange(async (value) => {
citedMaxLimit.innerText = ` ${value.toString()}`
this.plugin.settings.citedLimit = value
this.plugin.saveSettings().then(() => {
if (this.plugin.view)
this.plugin.referenceMapData.reload(RELOAD.SOFT)
})
})
)
.settingEl.createDiv('', (el) => {
citedMaxLimit = el
el.style.minWidth = '2.3em'
el.style.textAlign = 'right'
el.innerText = ` ${this.plugin.settings.citedLimit.toString()}`
})

let citingMaxLimit: HTMLDivElement
new Setting(containerEl)
.setName(t('CITING_MAX_LIMIT'))
// .setDesc(fragWithHTML(t('CITING_MAX_LIMIT_DESC')))
.addSlider((slider) =>
slider
.setLimits(50, 1000, 50)
.setValue(this.plugin.settings.citingLimit)
.onChange(async (value) => {
citingMaxLimit.innerText = ` ${value.toString()}`
this.plugin.settings.citingLimit = value
this.plugin.saveSettings().then(() => {
if (this.plugin.view)
this.plugin.referenceMapData.reload(RELOAD.SOFT)
})
})
)
.settingEl.createDiv('', (el) => {
citingMaxLimit = el
el.style.minWidth = '2.3em'
el.style.textAlign = 'right'
el.innerText = ` ${this.plugin.settings.citingLimit.toString()}`
})




new Setting(this.containerEl)
.setName("Citation style ")
.addSearch((cb) => {
Expand Down Expand Up @@ -602,6 +551,54 @@ export class ReferenceMapSettingTab extends PluginSettingTab {

containerEl.createEl('h2', { text: 'Misc' })

let citedMaxLimit: HTMLDivElement
new Setting(containerEl)
.setName(t('CITED_MAX_LIMIT'))
.setDesc(fragWithHTML(t('CITED_MAX_LIMIT_DESC')))
.addSlider((slider) =>
slider
.setLimits(50, 1000, 50)
.setValue(this.plugin.settings.citedLimit)
.onChange(async (value) => {
citedMaxLimit.innerText = ` ${value.toString()}`
this.plugin.settings.citedLimit = value
this.plugin.saveSettings().then(() => {
if (this.plugin.view)
this.plugin.referenceMapData.reload(RELOAD.SOFT)
})
})
)
.settingEl.createDiv('', (el) => {
citedMaxLimit = el
el.style.minWidth = '2.3em'
el.style.textAlign = 'right'
el.innerText = ` ${this.plugin.settings.citedLimit.toString()}`
})

let citingMaxLimit: HTMLDivElement
new Setting(containerEl)
.setName(t('CITING_MAX_LIMIT'))
.setDesc(fragWithHTML(t('CITING_MAX_LIMIT_DESC')))
.addSlider((slider) =>
slider
.setLimits(50, 1000, 50)
.setValue(this.plugin.settings.citingLimit)
.onChange(async (value) => {
citingMaxLimit.innerText = ` ${value.toString()}`
this.plugin.settings.citingLimit = value
this.plugin.saveSettings().then(() => {
if (this.plugin.view)
this.plugin.referenceMapData.reload(RELOAD.SOFT)
})
})
)
.settingEl.createDiv('', (el) => {
citingMaxLimit = el
el.style.minWidth = '2.3em'
el.style.textAlign = 'right'
el.innerText = ` ${this.plugin.settings.citingLimit.toString()}`
})

new Setting(containerEl)
.setName(t('HIDE_SHOW_REDUNDANT_REFERENCES'))
.setDesc(fragWithHTML(t('HIDE_SHOW_REDUNDANT_REFERENCES_DESC')))
Expand Down

0 comments on commit d0f4fc1

Please sign in to comment.