Added devcontainer, nvmrc, sample.josn, fixed typo

This commit is contained in:
Hugo Bernier 2023-11-18 19:15:45 -05:00
parent 3e1d80c325
commit 7ebabdf2fa
9 changed files with 52659 additions and 27664 deletions

View File

@ -0,0 +1,39 @@
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
{
"name": "SPFx 1.18.1",
"image": "docker.io/m365pnp/spfx:1.18.1",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
4321,
35729
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
// Not needed for SPFx>= 1.12.1
// "5432": {
// "protocol": "https",
// "label": "Workbench",
// "onAutoForward": "silent"
// },
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}

View File

@ -0,0 +1,33 @@
echo
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
npm install
## commands to create dev certificate and copy it to the root folder of the project
echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
gulp trust-dev-cert
# Convert the generated PEM certificate to a CER certificate
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer
# Copy the PEM ecrtificate for non-Windows hosts
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
then
echo "# .CER Certificates" >> .gitignore
echo "*.cer" >> .gitignore
fi
## add *.pem to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.pem' ./.gitignore
then
echo "# .PEM Certificates" >> .gitignore
echo "*.pem" >> .gitignore
fi
echo
echo -e "\e[1;92mReady!\e[0m"
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"

View File

@ -0,0 +1 @@
v16.13.2

View File

@ -1,16 +1,16 @@
# Password vault
## Summary
This web part allows you to protect your data, such as the username, password or even just a text note (rich text). This data is protected with a master password that you can choose yourself.
This web part allows you to protect your data, such as the username, password or even just a text note (rich text). This data is protected with a master password that you can choose yourself.
The data is encrypted and stored in the properties of the web part. This means that the data is not in plain text and can only be decrypted by entering the master password. You can also use this web part in SharePoint and Microsoft Teams (as a tab)
### Edit Mode
![Edit Mode](assets/PWVaultEditMode.png)
### Display Mode
![Display Mode](assets/PasswordVaultDisplayMode.png)
### Maintenance Mode
@ -52,21 +52,8 @@ Version|Date|Comments
-------|----|--------
1.0|October 27, 2023|Initial release
## Minimal path to awesome
<!--
PRO TIP:
For commands, use the `code syntax`
For button labels, page names, dialog names, etc. as they appear on the screen, use **Bold**
Don't use "click", use "select" or "use"
As tempting as it may be, don't just use images to describe the steps. Let's be as inclusive as possible and think about accessibility.
-->
* Clone this repository (or [download this solution as a .ZIP file](https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-password-vault) then unzip it)
* From your command line, change your current directory to the directory containing this sample (`react-password-vault`, located under `samples`)
@ -84,6 +71,7 @@ This web part illustrates the following concepts on top of the SharePoint Framew
* [CryptoJS](https://cryptojs.gitbook.io/docs/)
The web part comes with this features
* Protect all data with a master password
* store as many usernames, passwords and notes as you want (similar "look and feel" as in SharePoint Standard, when you want to place a new web part)
* Copy username and password to clipboard
@ -92,20 +80,10 @@ The web part comes with this features
* No possibility to "reset" the master password if the password is forgotten
* The data is NOT stored in plain text
<!--
Note that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions in advance! You rock ❤.
-->
<!--
RESERVED FOR REPO MAINTAINERS
We'll add the video from the community call recording here
-->
## Video
[![Building SPFx Password Vault Web Part](./assets/video-thumbnail.jpg)](https://www.youtube.com/watch?v=y38RFnrrxrI "Building SPFx Password Vault Web Part")
## Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
@ -126,4 +104,4 @@ Finally, if you have an idea for improvement, [make a suggestion](https://github
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-password-vault" />
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-webparts/samples/react-password-vault" />

View File

@ -0,0 +1,69 @@
[
{
"name": "pnp-sp-dev-spfx-web-parts-react-password-vault",
"source": "pnp",
"title": "Password Vault",
"shortDescription": "This web part allows you to protect your data, such as the username, password or even just a text note (rich text). This data is protected with a master password that you can choose yourself.",
"url": "https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-password-vault",
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-password-vault",
"longDescription": [
"This web part allows you to protect your data, such as the username, password or even just a text note (rich text). This data is protected with a master password that you can choose yourself.",
"The data is encrypted and stored in the properties of the web part. This means that the data is not in plain text and can only be decrypted by entering the master password. You can also use this web part in SharePoint and Microsoft Teams (as a tab)"
],
"creationDateTime": "2023-10-27",
"updateDateTime": "2023-10-27",
"products": [
"SharePoint"
],
"metadata": [
{
"key": "CLIENT-SIDE-DEV",
"value": "React"
},
{
"key": "SPFX-VERSION",
"value": "1.18.1"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-password-vault/assets/PasswordVaultDisplayMode.png",
"alt": "Web Part Preview"
},
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-password-vault/assets/PWVaultEditMode.png",
"alt": "Web Part Preview"
},
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-webparts/raw/main/samples/react-password-vault/assets/PWVaultMaintenanceMode.png",
"alt": "Web Part Preview"
},
{
"type": "video",
"order": 101,
"url": "https://www.youtube.com/embed/y38RFnrrxrI?si=EWoEglXZfqiKCs3V",
"alt": "Community demo of the web part"
}
],
"authors": [
{
"gitHubAccount": "SPFxAppDev",
"pictureUrl": "https://github.com/SPFxAppDev.png",
"name": "Sergej Schwabauer"
}
],
"references": [
{
"name": "Build your first SharePoint client-side web part",
"description": "Client-side web parts are client-side components that run in the context of a SharePoint page. Client-side web parts can be deployed to SharePoint environments that support the SharePoint Framework. You can also use modern JavaScript web frameworks, tools, and libraries to build them.",
"url": "https://docs.microsoft.com/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part"
}
]
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ define([], function() {
"PasswordLabel": "Password",
"MasterPasswordLabel": "Master Password",
"SetMasterPasswordLabel": "Master Password",
"RepeatMasterPasswordLabel": "Repeat Master Passwort",
"RepeatMasterPasswordLabel": "Repeat Master Password",
"ChangeMasterPasswordLabel": "Change Master Password",
"UsernameLabel": "Username",
"NoteLabel": "Note",
@ -23,8 +23,8 @@ define([], function() {
"PasswordModuleLabel": "Password",
"UsernameModuleLabel": "Username",
"NoteModuleLabel": "Note",
"ChangeMasterPasswordButtonText": "Change Master Passwort",
"ChangeMasterPasswordDialogTitle": "Change Master Passwort",
"ChangeMasterPasswordButtonText": "Change Master Password",
"ChangeMasterPasswordDialogTitle": "Change Master Password",
"CancelLabel": "Cancel"
}
});

View File

@ -1,7 +1,7 @@
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
{
"name": "SPFx 1.16.1",
"image": "docker.io/m365pnp/spfx:1.16.1",
"name": "SPFx 1.18.1",
"image": "docker.io/m365pnp/spfx:1.18.1",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.