mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 10:28:22 +00:00
Merge branch 'main' into docs
This commit is contained in:
@@ -21,6 +21,9 @@
|
|||||||
<a href="https://github.com/infisical/infisical/blob/main/CONTRIBUTING.md">
|
<a href="https://github.com/infisical/infisical/blob/main/CONTRIBUTING.md">
|
||||||
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen" alt="PRs welcome!" />
|
<img src="https://img.shields.io/badge/PRs-Welcome-brightgreen" alt="PRs welcome!" />
|
||||||
</a>
|
</a>
|
||||||
|
<a href="">
|
||||||
|
<img src="https://img.shields.io/github/commit-activity/m/infisical/infisical" alt="git commit activity" />
|
||||||
|
</a>
|
||||||
<a href="https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g">
|
<a href="https://join.slack.com/t/infisical-users/shared_invite/zt-1kdbk07ro-RtoyEt_9E~fyzGo_xQYP6g">
|
||||||
<img src="https://img.shields.io/badge/chat-on%20Slack-blueviolet" alt="Slack community channel" />
|
<img src="https://img.shields.io/badge/chat-on%20Slack-blueviolet" alt="Slack community channel" />
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import React, { useState } from "react";
|
import React from "react";
|
||||||
import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
|
import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
export default function Error({ text }) {
|
export default function Error({ text }: { text: string }): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className="relative bg-red-500 opacity-100 border flex flex-row justify-center m-auto items-center w-fit rounded-full mb-4">
|
<div className="relative bg-red-500 opacity-100 border flex flex-row justify-center m-auto items-center w-fit rounded-full mb-4">
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Fragment } from "react";
|
import { Fragment } from "react";
|
||||||
import { useRouter } from "next/router";
|
|
||||||
import {
|
import {
|
||||||
faAngleDown,
|
faAngleDown,
|
||||||
faCheck,
|
faCheck,
|
||||||
@@ -9,9 +8,25 @@ import {
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Listbox, Transition } from "@headlessui/react";
|
import { Listbox, Transition } from "@headlessui/react";
|
||||||
|
|
||||||
|
|
||||||
|
type ListBoxProps = {
|
||||||
|
selected: string,
|
||||||
|
onChange: () => void,
|
||||||
|
data: string[],
|
||||||
|
text: string,
|
||||||
|
buttonAction: () => void,
|
||||||
|
width: string,
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the component that we use for drop down lists.
|
* This is the component that we use for drop down lists.
|
||||||
* @param {*} param0
|
* @param {object} obj
|
||||||
|
* @param {string} obj.selected - the item that is currently selected
|
||||||
|
* @param {function} obj.onChange - what happends if you select the item inside a list
|
||||||
|
* @param {string[]} obj.data - all the options available
|
||||||
|
* @param {string} obj.text - the text that shows us in front of the select option
|
||||||
|
* @param {function} obj.buttonAction - if there is a button at the bottom of the list, this is the action that happens when you click the button
|
||||||
|
* @param {string} obj.width - button width
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export default function ListBox({
|
export default function ListBox({
|
||||||
@@ -21,10 +36,7 @@ export default function ListBox({
|
|||||||
text,
|
text,
|
||||||
buttonAction,
|
buttonAction,
|
||||||
width,
|
width,
|
||||||
workspaceMapping = [],
|
} : ListBoxProps): JSX.Element {
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Listbox value={selected} onChange={onChange}>
|
<Listbox value={selected} onChange={onChange}>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
@@ -61,7 +73,7 @@ export default function ListBox({
|
|||||||
`my-0.5 relative cursor-default select-none py-2 pl-10 pr-4 rounded-md ${
|
`my-0.5 relative cursor-default select-none py-2 pl-10 pr-4 rounded-md ${
|
||||||
selected ? "bg-white/10 text-gray-400 font-bold" : ""
|
selected ? "bg-white/10 text-gray-400 font-bold" : ""
|
||||||
} ${
|
} ${
|
||||||
active & !selected
|
active && !selected
|
||||||
? "bg-white/5 text-mineshaft-200 cursor-pointer"
|
? "bg-white/5 text-mineshaft-200 cursor-pointer"
|
||||||
: "text-gray-400"
|
: "text-gray-400"
|
||||||
} `
|
} `
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon, FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
var classNames = require("classnames");
|
var classNames = require("classnames");
|
||||||
|
|
||||||
@@ -17,6 +17,20 @@ type ButtonProps = {
|
|||||||
textDisabled: string;
|
textDisabled: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the main butto component in the app.
|
||||||
|
* @param {object} props
|
||||||
|
* @param {string} props.text - text inside the button
|
||||||
|
* @param {function} props.onButtonPressed - the action that happens when the button is clicked
|
||||||
|
* @param {boolean} props.loading - if a button is currently in the laoding state
|
||||||
|
* @param {string} props.color - button color
|
||||||
|
* @param {string} props.size - button size
|
||||||
|
* @param {FontAwesomeIconProps} props.icon - the icon inside the button
|
||||||
|
* @param {boolean} props.active - if the button is active or disabled
|
||||||
|
* @param {FontAwesomeIconProps} props.text - the icon inside the button when it is disabled
|
||||||
|
* @param {string} props.textDisable - text inside the button when it is disabled
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
export default function Button (props: ButtonProps): JSX.Element {
|
export default function Button (props: ButtonProps): JSX.Element {
|
||||||
// Check if the button show always be 'active' - then true;
|
// Check if the button show always be 'active' - then true;
|
||||||
// or if it should switch between 'active' and 'disabled' - then give the status
|
// or if it should switch between 'active' and 'disabled' - then give the status
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.4 MiB |
@@ -23,7 +23,8 @@
|
|||||||
],
|
],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"strict": false,
|
"strict": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
@@ -37,8 +38,8 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"next-env.d.ts",
|
"next-env.d.ts",
|
||||||
"**/*.ts",
|
"**/*.ts",
|
||||||
"**/*.tsx"
|
"**/*.tsx",
|
||||||
, "components/basic/layout.js" ],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
]
|
]
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 493 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 112 KiB |
Reference in New Issue
Block a user