Skip to content

Commit 810a055

Browse files
committed
Hide access token in settings #41
1 parent 2ed0b48 commit 810a055

File tree

5 files changed

+13
-21
lines changed

5 files changed

+13
-21
lines changed

esbuild.config.mjs

+4-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
import esbuild from "esbuild";
2-
import process from "process";
1+
import esbuild from "esbuild"
2+
import process from "process"
33
import builtins from 'builtin-modules'
44

5-
const banner =
6-
`/*
7-
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
8-
if you want to view the source, please visit the github repository of this plugin
9-
*/
10-
`;
11-
12-
const prod = (process.argv[2] === 'production');
5+
const prod = (process.argv[2] === 'production')
136

147
esbuild.build({
15-
banner: {
16-
js: banner,
17-
},
188
entryPoints: ['src/main.ts'],
199
bundle: true,
2010
external: [
@@ -49,4 +39,4 @@ esbuild.build({
4939
sourcemap: prod ? false : 'inline',
5040
treeShaking: true,
5141
outfile: 'main.js',
52-
}).catch(() => process.exit(1));
42+
}).catch(() => process.exit(1))

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-jira-issue",
33
"name": "Jira Issue",
4-
"version": "1.31.0",
4+
"version": "1.32.0",
55
"minAppVersion": "0.12.0",
66
"description": "This plugin allows you to track the progress of Atlassian Jira issues from your Obsidian notes.",
77
"author": "marc0l92",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-jira-issue",
3-
"version": "1.31.0",
3+
"version": "1.32.0",
44
"description": "This plugin allows you to track the progress of [Atlassian Jira](https://www.atlassian.com/software/jira) issues from your [Obsidian](https://obsidian.md/) notes.",
55
"main": "src/main.js",
66
"scripts": {

src/settings.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const AUTHENTICATION_TYPE_DESCRIPTION = {
1919

2020
export const COMPACT_SYMBOL = '-'
2121
export const COMMENT_REGEX = /^\s*#/
22+
const HIDDEN_PASSWORD_PLACEHOLDER = '********'
2223

2324
export interface IJiraIssueSettings {
2425
accounts: IJiraIssueAccountSettings[]
@@ -58,7 +59,7 @@ const DEFAULT_SETTINGS: IJiraIssueSettings = {
5859
alias: 'Default',
5960
host: 'https://mycompany.atlassian.net',
6061
authenticationType: EAuthenticationTypes.OPEN,
61-
password: '********',
62+
password: HIDDEN_PASSWORD_PLACEHOLDER,
6263
priority: 1,
6364
color: '#000000',
6465
}
@@ -301,7 +302,7 @@ export class JiraIssueSettingsTab extends PluginSettingTab {
301302
.setDesc('Password to access your Jira Server account using HTTP basic authentication.')
302303
.addText(text => text
303304
// .setPlaceholder('')
304-
.setValue(DEFAULT_SETTINGS.accounts.first().password)
305+
.setValue(HIDDEN_PASSWORD_PLACEHOLDER)
305306
.onChange(async value => {
306307
newAccount.password = value
307308
}))
@@ -319,7 +320,7 @@ export class JiraIssueSettingsTab extends PluginSettingTab {
319320
.setName('API Token')
320321
.addText(text => text
321322
// .setPlaceholder('')
322-
.setValue(DEFAULT_SETTINGS.accounts.first().password)
323+
.setValue(HIDDEN_PASSWORD_PLACEHOLDER)
323324
.onChange(async value => {
324325
newAccount.password = value
325326
}))
@@ -337,7 +338,7 @@ export class JiraIssueSettingsTab extends PluginSettingTab {
337338
.setDesc('Token to access your Jira account using OAuth3 Bearer token authentication.')
338339
.addText(text => text
339340
// .setPlaceholder('')
340-
.setValue(newAccount.bareToken)
341+
.setValue(HIDDEN_PASSWORD_PLACEHOLDER)
341342
.onChange(async value => {
342343
newAccount.bareToken = value
343344
}))

versions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@
3131
"1.28.0": "0.12.0",
3232
"1.29.0": "0.12.0",
3333
"1.30.0": "0.12.0",
34-
"1.31.0": "0.12.0"
34+
"1.31.0": "0.12.0",
35+
"1.32.0": "0.12.0"
3536
}

0 commit comments

Comments
 (0)