1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-03 17:13:14 +00:00

More boilerplating

This commit is contained in:
Hinton
2022-04-04 11:09:49 +02:00
parent ec25d52989
commit f2b0682385
2 changed files with 56 additions and 0 deletions

View File

@@ -152,6 +152,10 @@ export class AddEditComponent implements OnInit {
await this.init();
}
get customType() {
return this.cipher.type > CipherType.Identity;
}
async init() {
if (this.ownershipOptions.length) {
this.ownershipOptions = [];

View File

@@ -6,26 +6,32 @@ export const ItemTypeSchemas = {
description: "WirelessNetworkDesc",
properties: [
{
id: "ssid",
name: "Network Name/SSID",
type: "string",
},
{
id: "wirelessSecurity",
name: "Wireless Security",
type: "string",
},
{
id: "username",
name: "Username",
type: "string",
},
{
id: "password",
name: "Password",
type: "string",
},
{
id: "mode",
name: "Mode",
type: "string",
},
{
id: "ip",
name: "Server/IP Address",
type: "string",
},
@@ -33,6 +39,52 @@ export const ItemTypeSchemas = {
},
};
export const ItemTypeForms = {
[CipherType.WirelessNetwork]: [
{
type: "section",
title: "General",
items: [
{
id: "ssid",
type: "textfield",
},
{
id: "wirelessSecurity",
type: "dropdown",
options: [
"None",
"WEP",
"WPA",
"WPA2/WPA3",
"WPA3",
"WPA Enterprise",
"WPA2 Enterprise",
"WPA3 Enterprise",
],
},
{
id: "username",
type: "textfield",
},
{
id: "password",
type: "password",
},
{
id: "mode",
type: "dropdown",
options: ["Automatic", "EAP-TLS"],
},
{
id: "ip",
type: "textfield",
},
],
},
],
};
/*
Network Name/SSID: (open text)
Wireless Security: (single-choice):