-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jk-signature
- Loading branch information
Showing
107 changed files
with
2,579 additions
and
1,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const DragAndDrop = { | ||
mounted() { | ||
const dropZone = this.el.querySelector("[data-dropzone]"); | ||
|
||
["dragenter", "dragover"].forEach((eventName) => { | ||
dropZone.addEventListener(eventName, highlight, false); | ||
}); | ||
|
||
["dragleave", "drop"].forEach((eventName) => { | ||
dropZone.addEventListener(eventName, unhighlight, false); | ||
}); | ||
|
||
function highlight(e) { | ||
dropZone.classList.add("bg-red-200"); | ||
dropZone.classList.add("border-red-400"); | ||
} | ||
|
||
function unhighlight(e) { | ||
dropZone.classList.remove("bg-red-200"); | ||
dropZone.classList.remove("border-red-400"); | ||
} | ||
}, | ||
}; | ||
|
||
export default DragAndDrop; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* A hook used to toggle password's input visibility via icon button. | ||
*/ | ||
|
||
const VISIBLE_ICON = "ri-eye-off-line"; | ||
const OBSCURED_ICON = "ri-eye-line"; | ||
|
||
const PasswordToggle = { | ||
mounted() { | ||
this.visible = false; | ||
|
||
this.input = this.el.querySelector("input"); | ||
this.iconButton = this.el.querySelector("i"); | ||
|
||
this.iconButton.addEventListener("click", () => { | ||
this.visible = !this.visible; | ||
this._updateDOM(); | ||
}); | ||
}, | ||
|
||
updated() { | ||
this._updateDOM(); | ||
}, | ||
|
||
_updateDOM() { | ||
if (this.visible) { | ||
this.input.type = "text"; | ||
this.iconButton.classList.remove(OBSCURED_ICON); | ||
this.iconButton.classList.add(VISIBLE_ICON); | ||
} else { | ||
this.input.type = "password"; | ||
this.iconButton.classList.remove(VISIBLE_ICON); | ||
this.iconButton.classList.add(OBSCURED_ICON); | ||
} | ||
}, | ||
}; | ||
|
||
export default PasswordToggle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.