Skip to content

Commit

Permalink
Fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xezard committed Nov 2, 2024
1 parent 940aefe commit 31c86af
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# OEncrypt

![demo.gif](docs%2Fdemo.gif)

[![CI](https://github.com/Xezard/OEncrypt/actions/workflows/ci.yml/badge.svg)](https://github.com/Xezard/OEncrypt/actions/workflows/ci.yml)
![Obsidian](https://img.shields.io/badge/Tested%20on%20Obsidian-v.1.7.4-informational)
[![License](https://img.shields.io/github/license/Xezard/OEncrypt)](https://github.com/Xezard/OEncrypt/blob/master/LICENSE)
![Lines of code](https://img.shields.io/endpoint?url=https://ghloc.vercel.app/api/Xezard/OEncrypt/badge?filter=.ts&label=Lines%20of%20code&color=blue)
Expand Down
7 changes: 7 additions & 0 deletions assets/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.file-info-display {
margin-left: 1rem;
}

.passphrase-input {
width: 100%;
}
Binary file added docs/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions src/modals/PassphraseModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ export class PassphraseModal extends Modal implements PluginModal {

const passphraseSetting = new Setting(this.contentEl).addText((text) => {
this.input = text.inputEl

this.input.className = 'passphrase-input'
this.input.type = 'password'
this.input.style.width = '100%'

text.onChange((value) => {
this.passphrase = value
Expand Down
2 changes: 1 addition & 1 deletion src/services/encryptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class EncryptionService {
const newFilePath = `${baseFilePath}${extension}`

await this.app.vault.create(newFilePath, content)
await this.app.vault.delete(activeFile)
await this.app.fileManager.trashFile(activeFile)
await this.app.workspace.openLinkText(newFilePath, '', false)
}

Expand Down
1 change: 0 additions & 1 deletion src/services/uiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export class UIService {
if (!fileInfoElement) {
fileInfoElement = document.createElement('div')
fileInfoElement.className = 'file-info-display'
fileInfoElement.style.marginLeft = '1rem'
setting.settingEl.appendChild(fileInfoElement)
} else {
fileInfoElement.empty()
Expand Down

0 comments on commit 31c86af

Please sign in to comment.