@ant-design/icons#PoweroffOutlined JavaScript Examples

The following examples show how to use @ant-design/icons#PoweroffOutlined. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Profile.jsx    From node-project-manager with Apache License 2.0 6 votes vote down vote up
Profile = ({ user, logOutUser }) => {

    const [ logginOut, setLogginOut ] = useState(false);

    const { nombre, apellidos, nickname, avatar } = user;

    const data = [
        `${nombre} ${apellidos}`,
    ];
    const icon = require(`../../img/${avatar}`);

    const logOutUserAndRemoveCookie = () =>{
        deleteCookie();
        logOutUser();
        setLogginOut(true);
    }

    return (
        

        <div className="profile">
            {(logginOut ) ? <Redirect to="/login"></Redirect> : null }
                <Avatar src={icon} size="large" /> 
                <div className="nickname">{nickname}</div>
                <div className="nombreCompleto">{data} &nbsp;&nbsp;
                    <Button
                        size="small"
                        shape="circle"
                        type="primary"
                        icon={<PoweroffOutlined />
                        }
                        onClick={logOutUserAndRemoveCookie}
                    />
                </div>
        </div>
        
    );
}
Example #2
Source File: loading.jsx    From virtuoso-design-system with MIT License 6 votes vote down vote up
render() {
    const { loadings } = this.state;
    return (
      <>
        <Button type="primary" loading>
          Loading
        </Button>
        <Button type="primary" size="small" loading>
          Loading
        </Button>
        <Button type="primary" icon={<PoweroffOutlined />} loading />
        <br />
        <Button type="primary" loading={loadings[0]} onClick={() => this.enterLoading(0)}>
          Click me!
        </Button>
        <Button
          type="primary"
          icon={<PoweroffOutlined />}
          loading={loadings[1]}
          onClick={() => this.enterLoading(1)}
        >
          Click me!
        </Button>
        <Button
          type="primary"
          icon={<PoweroffOutlined />}
          loading={loadings[2]}
          onClick={() => this.enterLoading(2)}
        />
      </>
    );
  }
Example #3
Source File: HeaderLayout.js    From Smart-Vehicle-Fleet-Manager with MIT License 5 votes vote down vote up
function HeaderLayout() {
  const [{ user }] = useStateValue();

  // logout
  const logout = (event) => {
    event.preventDefualt();
    fireConfig.auth().signOut();
  };

  return (
    <Layout>
      <Header
        theme="dark"
        className="site-layout-background"
        style={{ padding: 0 }}
      >
        <Title style={{ color: "#EAF0F1", padding: 15 }} level={3}>
          Smart Vehicle Fleet Manager
          <Tooltip title="Logout">
            <Button
              ghost
              icon={<PoweroffOutlined />}
              onClick={logout}
              style={{
                float: "right",
                margin: "auto 20px auto 20px",
              }}
            />
          </Tooltip>
          <span
            style={{
              float: "right",
              fontSize: "20px",
              marginLeft: "10px",
              marginRight: "10px",
            }}
          >
            {user?.displayName || user?.email}
          </span>
        </Title>
      </Header>
    </Layout>
  );
}
Example #4
Source File: styles.js    From bank-client with MIT License 5 votes vote down vote up
StyledPoweroffOutlined = styled(PoweroffOutlined)`
  font-size: 19px;
`
Example #5
Source File: Status.js    From network-rc with Apache License 2.0 4 votes vote down vote up
export default function Status({
  statusInfo,
  piPowerOff,
  wsConnected,
  delay = 0,
  isFullscreen,
  setting,
  isLogin,
  session,
  changeEditabled,
  channelStatus,
  changeChannel,
  serverConfig,
  version,
  connectType,
  onCarMicphoneChange,
  locked,
  onControllerMicphoneChange = () => {},
  enabledControllerMicphone = true,
}) {
  const isWebRTC = connectType === "webrtc";
  const { sharedEndTime } = serverConfig;

  const gamepadPress = ({ detail: { index, value } }) => {
    if (index === 3 && value > 0.5) {
      onControllerMicphoneChange(!enabledControllerMicphone);
    }
  };

  useKeyPress(
    "t",
    () => onControllerMicphoneChange(!enabledControllerMicphone),
    {
      events: ["keyup"],
    }
  );

  useEventListener("gamepadpress", gamepadPress);

  return (
    <Form layout="inline" className="app-status" size="small">
      <Form.Item>
        <Link to={`${process.env.PUBLIC_URL}/controller`}>
          <img className="logo" src="/logo-256.png" alt="N-RC" />
        </Link>
        <span>N RC</span>
      </Form.Item>
      <Form.Item>
        <Tag
          style={{
            width: "7em",
          }}
          icon={
            locked ? (
              <StopOutlined />
            ) : wsConnected ? (
              <LinkOutlined />
            ) : (
              <DisconnectOutlined />
            )
          }
          color={locked || delay > 80 || !wsConnected ? "red" : "green"}
          size="xs"
        >
          {isWebRTC ? "直连" : "中转"}:{delay.toFixed(0)}
        </Tag>
      </Form.Item>
      {(serverConfig.channelList || [])
        .filter(({ enabled, type }) => enabled && type === "switch")
        .map(({ pin, name }) => (
          <Form.Item key={pin}>
            <Switch
              checked={channelStatus[pin] || false}
              checkedChildren={name}
              unCheckedChildren={name}
              onChange={(value) => changeChannel({ pin, value })}
            />
          </Form.Item>
        ))}

      {isLogin && isWebRTC && (
        <Form.Item>
          <Switch
            checked={enabledControllerMicphone}
            onChange={onControllerMicphoneChange}
            checkedChildren={
              <>
                <DesktopOutlined /> <AudioOutlined />
              </>
            }
            unCheckedChildren={
              <>
                <DesktopOutlined /> <AudioMutedOutlined />
              </>
            }
          />
        </Form.Item>
      )}

      {isLogin && (
        <Form.Item>
          <AudioPlayer
            session={session}
            connectType={connectType}
            onMicphoneChange={onCarMicphoneChange}
            url={`${
              window.location.protocol === "https:" ? "wss://" : "ws://"
            }${setting.host}/microphone`}
          />
        </Form.Item>
      )}

      <Form.Item>
        <Switch
          checkedChildren={<FormOutlined />}
          unCheckedChildren={<FormOutlined />}
          onChange={changeEditabled}
        ></Switch>
      </Form.Item>

      <Form.Item>
        <Link to={`${process.env.PUBLIC_URL}/setting`}>
          <Button
            size="small"
            icon={<SettingOutlined />}
            shape="circle"
          ></Button>
        </Link>
      </Form.Item>

      {document.body.requestFullscreen && (
        <Form.Item>
          <Button
            type="primary"
            shape="circle"
            icon={
              isFullscreen ? <FullscreenExitOutlined /> : <FullscreenOutlined />
            }
            onClick={() => {
              if (isFullscreen) {
                document.exitFullscreen();
              } else {
                document.body.requestFullscreen();
              }
            }}
          ></Button>
        </Form.Item>
      )}

      {wsConnected && isLogin && (
        <Form.Item>
          <Button
            type="danger"
            shape="circle"
            icon={<PoweroffOutlined />}
            onClick={piPowerOff}
          ></Button>
        </Form.Item>
      )}

      {wsConnected &&
        isLogin &&
        Object.keys(statusInfo).map((key) => {
          const { color, label, value } = statusInfo[key];
          return !["gps"].includes(label) ? (
            <Form.Item key={key}>
              <Tag color={color}>
                {label}:{value}
              </Tag>
            </Form.Item>
          ) : undefined;
        })}

      {wsConnected && sharedEndTime && (
        <Form.Item>
          <Tag
            icon={<HourglassOutlined />}
            color={session && session.endTime && "orange"}
          >
            {((sharedEndTime - new Date().getTime()) / 1000).toFixed(0)}s
          </Tag>
        </Form.Item>
      )}

      {version && (
        <Form.Item>
          <Tag>v{version}</Tag>
        </Form.Item>
      )}
    </Form>
  );
}