From bbb3fd7c45c9768b9df1260de6b447b8d07fa85b Mon Sep 17 00:00:00 2001
From: Peter Hoppe
Date: Sat, 25 Feb 2023 00:10:25 +0100
Subject: [PATCH] icons
---
extern/feathericons.com/command.svg | 1 +
extern/feathericons.com/grid.svg | 1 +
extern/feathericons.com/key.svg | 1 +
extern/feathericons.com/lock.svg | 1 +
extern/feathericons.com/log-in.svg | 1 +
extern/feathericons.com/log-out.svg | 1 +
extern/feathericons.com/trash-2.svg | 1 +
extern/feathericons.com/user-minus.svg | 1 +
extern/feathericons.com/user.svg | 1 +
src/components/DogNavbar.tsx | 20 +++--
src/services/Icons.tsx | 105 +++++++++++++++++++++++++
11 files changed, 127 insertions(+), 7 deletions(-)
create mode 100644 extern/feathericons.com/command.svg
create mode 100644 extern/feathericons.com/grid.svg
create mode 100644 extern/feathericons.com/key.svg
create mode 100644 extern/feathericons.com/lock.svg
create mode 100644 extern/feathericons.com/log-in.svg
create mode 100644 extern/feathericons.com/log-out.svg
create mode 100644 extern/feathericons.com/trash-2.svg
create mode 100644 extern/feathericons.com/user-minus.svg
create mode 100644 extern/feathericons.com/user.svg
create mode 100644 src/services/Icons.tsx
diff --git a/extern/feathericons.com/command.svg b/extern/feathericons.com/command.svg
new file mode 100644
index 0000000..df2fe83
--- /dev/null
+++ b/extern/feathericons.com/command.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/grid.svg b/extern/feathericons.com/grid.svg
new file mode 100644
index 0000000..840f311
--- /dev/null
+++ b/extern/feathericons.com/grid.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/key.svg b/extern/feathericons.com/key.svg
new file mode 100644
index 0000000..22090ed
--- /dev/null
+++ b/extern/feathericons.com/key.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/lock.svg b/extern/feathericons.com/lock.svg
new file mode 100644
index 0000000..66ce699
--- /dev/null
+++ b/extern/feathericons.com/lock.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/log-in.svg b/extern/feathericons.com/log-in.svg
new file mode 100644
index 0000000..da929e9
--- /dev/null
+++ b/extern/feathericons.com/log-in.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/log-out.svg b/extern/feathericons.com/log-out.svg
new file mode 100644
index 0000000..86af166
--- /dev/null
+++ b/extern/feathericons.com/log-out.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/trash-2.svg b/extern/feathericons.com/trash-2.svg
new file mode 100644
index 0000000..4b60e6b
--- /dev/null
+++ b/extern/feathericons.com/trash-2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/user-minus.svg b/extern/feathericons.com/user-minus.svg
new file mode 100644
index 0000000..f4e5f14
--- /dev/null
+++ b/extern/feathericons.com/user-minus.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extern/feathericons.com/user.svg b/extern/feathericons.com/user.svg
new file mode 100644
index 0000000..0b77499
--- /dev/null
+++ b/extern/feathericons.com/user.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/components/DogNavbar.tsx b/src/components/DogNavbar.tsx
index ae8c778..b211de2 100644
--- a/src/components/DogNavbar.tsx
+++ b/src/components/DogNavbar.tsx
@@ -1,6 +1,7 @@
-import { Button, Navbar, Text } from '@mantine/core'
+import { Button, Navbar, Text, ThemeIcon } from '@mantine/core'
import React, { useState } from 'react'
import { Link } from 'react-router-dom'
+import { IconGrid, IconUser, IconUserMinus } from '../services/Icons';
import { logOut } from '../services/PhpApi'
import Footer2 from './Footer2'
@@ -22,17 +23,22 @@ function DogNavbar({hasUser, onLogout}:{hasUser: boolean, onLogout: () => void})
{!hasUser && Login}
{!hasUser && Register}
- {!hasUser && PW neu}
- {hasUser && Profil}
- {hasUser && QrCode}
+ {hasUser && <>
+
+ Profil>}
+ {hasUser && PW neu}
+ {hasUser && <>
+
+ QrCode>}
+
+ {hasUser && }
+
+
{hasUser && }
-
- {hasUser && }
-
Impressum
)
diff --git a/src/services/Icons.tsx b/src/services/Icons.tsx
new file mode 100644
index 0000000..5107b88
--- /dev/null
+++ b/src/services/Icons.tsx
@@ -0,0 +1,105 @@
+import React from 'react'
+
+const WWW_ROOT: string = process.env.REACT_APP_WWW_ROOT!;
+
+
+export type TIcon =
+{
+ name: string,
+ icon: JSX.Element
+};
+
+const IconArray: TIcon[] =
+[
+ {
+ name: "user",
+ icon:
+
+ },
+ {
+ name: "grid",
+ icon:
+
+ },
+ {
+ name: "user-minus",
+ icon:
+
+ },
+ {
+ name: "log-in",
+ icon:
+
+ },
+ {
+ name: "log-out",
+ icon:
+
+ },
+ {
+ name: "lock",
+ icon:
+
+ }
+];
+
+
+export function IconUser()
+{
+ return (
+ IconArray.find((i) => i.name === 'user')!.icon )
+}
+
+export function IconUserMinus()
+{
+ return (
+ IconArray.find((i) => i.name === 'user-minus')!.icon )
+}
+
+export function IconLogIn()
+{
+ return (
+ IconArray.find((i) => i.name === 'log-in')!.icon )
+}
+
+export function IconLogOut()
+{
+ return (
+ IconArray.find((i) => i.name === 'log-out')!.icon )
+}
+
+export function IconLock()
+{
+ return (
+ IconArray.find((i) => i.name === 'lock')!.icon )
+}
+
+export function IconGrid()
+{
+ return (
+ IconArray.find((i) => i.name === 'grid')!.icon )
+}