Compare commits
No commits in common. "2016a8619d2824d42e6b25b57607d87feabfe1a6" and "8cc266209232409dac41a64d3a4fbfc9876a7304" have entirely different histories.
2016a8619d
...
8cc2662092
16 changed files with 183 additions and 326 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
.env
|
|
||||||
n39env
|
|
||||||
.vscode
|
|
55
createMR.py
55
createMR.py
|
@ -1,55 +0,0 @@
|
||||||
import os
|
|
||||||
import json
|
|
||||||
import argparse
|
|
||||||
from git import Repo
|
|
||||||
from pyforgejo import AuthenticatedClient
|
|
||||||
from dotenv import load_dotenv
|
|
||||||
from pyforgejo.api.issue import issue_list_issues
|
|
||||||
from pyforgejo.api.repository import repo_create_branch, repo_create_pull_request
|
|
||||||
from pyforgejo.models import CreateBranchRepoOption, CreatePullRequestOption
|
|
||||||
|
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="")
|
|
||||||
parser.add_argument("-i", "--issue")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
FORJEGO_ACCESS_TOKEN = os.getenv("FORJEGO_ACCESS_TOKEN")
|
|
||||||
OWNER = os.getenv("OWNER")
|
|
||||||
USER = os.getenv("USER")
|
|
||||||
REPO = os.getenv("REPO")
|
|
||||||
|
|
||||||
client = AuthenticatedClient(
|
|
||||||
base_url="https://git.n39.eu/api/v1/", token=FORJEGO_ACCESS_TOKEN
|
|
||||||
)
|
|
||||||
|
|
||||||
issues = json.loads(issue_list_issues.sync_detailed(OWNER, REPO, client=client).content)
|
|
||||||
|
|
||||||
|
|
||||||
def filterIssues(issue):
|
|
||||||
return args.issue in issue["title"]
|
|
||||||
|
|
||||||
|
|
||||||
issues = list(filter(filterIssues, issues))
|
|
||||||
|
|
||||||
branchName = issues[0]["title"].replace(" ", "-")
|
|
||||||
|
|
||||||
if len(issues) > 1:
|
|
||||||
raise ValueError("found more than one ticket")
|
|
||||||
if len(issues) == 0:
|
|
||||||
raise ValueError("found more than one ticket")
|
|
||||||
else:
|
|
||||||
repo_create_branch.sync_detailed(
|
|
||||||
OWNER, REPO, body=CreateBranchRepoOption(branchName, "main"), client=client
|
|
||||||
)
|
|
||||||
res = json.loads(
|
|
||||||
repo_create_pull_request.sync_detailed(
|
|
||||||
OWNER,
|
|
||||||
REPO,
|
|
||||||
body=CreatePullRequestOption(
|
|
||||||
base="main", head=branchName, title="merge-" + branchName
|
|
||||||
),
|
|
||||||
client=client,
|
|
||||||
).content
|
|
||||||
)
|
|
||||||
print(res)
|
|
1
frontend/.gitignore
vendored
1
frontend/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
node_modules
|
|
|
@ -6,7 +6,7 @@ import "./App.css";
|
||||||
import { Main } from "./pages";
|
import { Main } from "./pages";
|
||||||
import { Library } from "./pages/Library";
|
import { Library } from "./pages/Library";
|
||||||
import { Book } from "./pages/Book";
|
import { Book } from "./pages/Book";
|
||||||
import * as colors from "./colors";
|
import { primary } from "./colors";
|
||||||
import { ActiveModalProps } from "./shared/components/modals/types";
|
import { ActiveModalProps } from "./shared/components/modals/types";
|
||||||
|
|
||||||
export const AuthContext = createContext<{
|
export const AuthContext = createContext<{
|
||||||
|
@ -50,6 +50,7 @@ function App() {
|
||||||
style={{
|
style={{
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
width: "100vw",
|
width: "100vw",
|
||||||
|
backgroundColor: primary,
|
||||||
fontFamily: "New Amsterdam",
|
fontFamily: "New Amsterdam",
|
||||||
overflow: "scroll",
|
overflow: "scroll",
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
export const primary = "#5e6268";
|
|
||||||
export const primaryRGBA = "rgba(83,86,91, 0.8)";
|
|
||||||
export const secondary = "#5f5e68";
|
|
||||||
export const tertiary = "#5e6768";
|
|
||||||
export const danger = "#685e62";
|
|
|
@ -12,210 +12,51 @@ body {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#bootstrap-overrides {
|
#bootstrap-overrides .form-select .form-control {
|
||||||
background-color: #f2f3f4;
|
|
||||||
color: #5e6268;
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: #5e6268;
|
|
||||||
color: #f2f3f4;
|
|
||||||
border: 2px solid #5e6268;
|
|
||||||
}
|
|
||||||
|
|
||||||
form-control {
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
border-color: #5e6268 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-select .form-control {
|
|
||||||
background-color: #f2f2e8 !important;
|
background-color: #f2f2e8 !important;
|
||||||
border-color: #f2f2e8 !important;
|
border-color: #f2f2e8 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-toggle::after {
|
#bootstrap-overrides .dropdown-toggle::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-label {
|
#bootstrap-overrides .form-label {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
|
||||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
|
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
|
||||||
"Helvetica Neue", sans-serif !important;
|
sans-serif !important;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
letter-spacing: normal;
|
letter-spacing: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table > :not(caption) > * > * {
|
#bootstrap-overrides table {
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
color: #5e6268 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
letter-spacing: 0.25em;
|
letter-spacing: 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-primary {
|
#bootstrap-overrides .bg-primary {
|
||||||
background-color: #f2f3f4 !important;
|
background-color: #f2f3f4 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-content {
|
#bootstrap-overrides .modal-body {
|
||||||
background-color: #f2f3f4 !important;
|
background-color: #f2f3f4 !important;
|
||||||
border-radius: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-body {
|
#bootstrap-overrides .danger {
|
||||||
background-color: #f2f3f4 !important;
|
|
||||||
border-radius: 0px 0px 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-header {
|
|
||||||
background-color: #f2f3f4 !important;
|
|
||||||
border-radius: 10px 10px 0px 0px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown button {
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
color: #5e6268 !important;
|
|
||||||
border: 2px solid #5e6268;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu {
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
color: #5e6268 !important;
|
|
||||||
border: 2px solid #f2f2e8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.danger {
|
|
||||||
background-color: #f9a9ab !important;
|
background-color: #f9a9ab !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-link {
|
#bootstrap-overrides .page-link {
|
||||||
color: #5e6268 !important;
|
color: black !important;
|
||||||
border: 2px solid #5e6268 !important;
|
border: 2px solid black !important;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.active > .page-link {
|
#bootstrap-overrides .active > .page-link {
|
||||||
background-color: #5e6268 !important;
|
background-color: black !important;
|
||||||
color: #f2f3f4 !important;
|
color: #f2f3f4 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination {
|
|
||||||
margin-top: 10px !important;
|
|
||||||
|
|
||||||
li {
|
|
||||||
min-width: 40px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
#bootstrap-overrides {
|
|
||||||
background-color: #5e6268;
|
|
||||||
color: #f2f3f4;
|
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: #f2f3f4;
|
|
||||||
color: #5e6268;
|
|
||||||
border: 2px solid #5e6268;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-control {
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
border-color: #5e6268 !important;
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-select .form-control {
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
border-color: #f2f2e8 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-toggle::after {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-label {
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
|
||||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
|
|
||||||
"Helvetica Neue", sans-serif !important;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
letter-spacing: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table > :not(caption) > * > * {
|
|
||||||
background-color: #5e6268 !important;
|
|
||||||
color: #f2f2e8 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
letter-spacing: 0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-primary {
|
|
||||||
background-color: #5e6268 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown button {
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
color: #5e6268 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-menu {
|
|
||||||
background-color: #5e6268 !important;
|
|
||||||
border: 2px solid #5e6268;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-item {
|
|
||||||
color: #f2f2e8 !important;
|
|
||||||
svg {
|
|
||||||
color: #f2f2e8 !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.dropdown-item:hover {
|
|
||||||
color: #5e6268 !important;
|
|
||||||
background-color: #f2f2e8 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content {
|
|
||||||
background-color: #5e6268 !important;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-body {
|
|
||||||
background-color: #5e6268 !important;
|
|
||||||
border-radius: 0px 0px 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-header {
|
|
||||||
background-color: #5e6268 !important;
|
|
||||||
border-radius: 10px 10px 0px 0px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.danger {
|
|
||||||
background-color: #c94414 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-link {
|
|
||||||
color: #f2f3f4 !important;
|
|
||||||
border: 2px solid #f2f3f4 !important;
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.active > .page-link {
|
|
||||||
background-color: #f2f3f4 !important;
|
|
||||||
color: #5e6268 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination {
|
|
||||||
margin-top: 10px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
code {
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
||||||
monospace;
|
monospace;
|
||||||
|
|
|
@ -2,8 +2,7 @@ import { Badge, Dropdown } from "react-bootstrap";
|
||||||
import { Book } from "../../../types/Book";
|
import { Book } from "../../../types/Book";
|
||||||
import { ImBin, ImBook, ImBoxAdd, ImBoxRemove, ImMenu } from "react-icons/im";
|
import { ImBin, ImBook, ImBoxAdd, ImBoxRemove, ImMenu } from "react-icons/im";
|
||||||
import { useMutation } from "@tanstack/react-query";
|
import { useMutation } from "@tanstack/react-query";
|
||||||
import * as colors from "../../../colors";
|
import { secondary } from "../../../colors";
|
||||||
import * as dark from "../../../darkmodeColors";
|
|
||||||
import { ModalContextType } from "../../../App";
|
import { ModalContextType } from "../../../App";
|
||||||
import { modalTypes } from "../../../shared/components/modals/types";
|
import { modalTypes } from "../../../shared/components/modals/types";
|
||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
|
@ -45,7 +44,11 @@ export const Actions = ({
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Dropdown>
|
<Dropdown>
|
||||||
<Dropdown.Toggle variant='success' id='dropdown-basic'>
|
<Dropdown.Toggle
|
||||||
|
variant='success'
|
||||||
|
id='dropdown-basic'
|
||||||
|
style={{ backgroundColor: secondary, border: "2px solid black" }}
|
||||||
|
>
|
||||||
<ImMenu size={25} color='black' />
|
<ImMenu size={25} color='black' />
|
||||||
</Dropdown.Toggle>
|
</Dropdown.Toggle>
|
||||||
|
|
||||||
|
@ -56,7 +59,14 @@ export const Actions = ({
|
||||||
className='d-flex'
|
className='d-flex'
|
||||||
onClick={() => setActiveModal({ type: bookModal, book, onClose })}
|
onClick={() => setActiveModal({ type: bookModal, book, onClose })}
|
||||||
>
|
>
|
||||||
<Badge pill className='ml-2 d-flex mr-2'>
|
<Badge
|
||||||
|
pill
|
||||||
|
className='ml-2 d-flex mr-2'
|
||||||
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
|
backgroundColor: "transparent",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<ImBook size={25} color='black' className='m-auto' />
|
<ImBook size={25} color='black' className='m-auto' />
|
||||||
</Badge>
|
</Badge>
|
||||||
<p className='m-auto' style={{ paddingLeft: "10px" }}>
|
<p className='m-auto' style={{ paddingLeft: "10px" }}>
|
||||||
|
@ -77,7 +87,13 @@ export const Actions = ({
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Badge pill className='ml-2 d-flex mr-2'>
|
<Badge
|
||||||
|
pill
|
||||||
|
className='ml-2 d-flex mr-2'
|
||||||
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<ImBoxRemove size={25} color='black' className='m-auto' />
|
<ImBoxRemove size={25} color='black' className='m-auto' />
|
||||||
</Badge>{" "}
|
</Badge>{" "}
|
||||||
<p className='m-auto' style={{ paddingLeft: "10px" }}>
|
<p className='m-auto' style={{ paddingLeft: "10px" }}>
|
||||||
|
@ -114,7 +130,13 @@ export const Actions = ({
|
||||||
setActiveModal({ type: del, uuid: book.uuid, onClose })
|
setActiveModal({ type: del, uuid: book.uuid, onClose })
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Badge pill className='ml-2 d-flex danger mr-2'>
|
<Badge
|
||||||
|
pill
|
||||||
|
className='ml-2 d-flex danger mr-2'
|
||||||
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<ImBin size={25} color='black' className='m-auto' />
|
<ImBin size={25} color='black' className='m-auto' />
|
||||||
</Badge>{" "}
|
</Badge>{" "}
|
||||||
<p className='m-auto' style={{ paddingLeft: "10px" }}>
|
<p className='m-auto' style={{ paddingLeft: "10px" }}>
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { TfiKey } from "react-icons/tfi";
|
||||||
|
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
import { Book } from "../../types/Book";
|
import { Book } from "../../types/Book";
|
||||||
|
import { secondary } from "../../colors";
|
||||||
import { useAuth } from "../../shared/utils/useAuthentication";
|
import { useAuth } from "../../shared/utils/useAuthentication";
|
||||||
import { ModalContext } from "../../App";
|
import { ModalContext } from "../../App";
|
||||||
import { modalTypes } from "../../shared/components/modals/types";
|
import { modalTypes } from "../../shared/components/modals/types";
|
||||||
|
@ -94,12 +95,16 @@ export const Main = (): React.JSX.Element => {
|
||||||
onChange={(ev) => setTitle(ev.target.value)}
|
onChange={(ev) => setTitle(ev.target.value)}
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "20px 0px 0px 20px",
|
borderRadius: "20px 0px 0px 20px",
|
||||||
|
border: "2px solid black",
|
||||||
borderRight: "none",
|
borderRight: "none",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "0px 5px 5px 0px",
|
borderRadius: "0px 5px 5px 0px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
}}
|
}}
|
||||||
className='mr-2'
|
className='mr-2'
|
||||||
disabled={activeModal?.type === scanner || isFetching}
|
disabled={activeModal?.type === scanner || isFetching}
|
||||||
|
@ -130,6 +135,9 @@ export const Main = (): React.JSX.Element => {
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
|
@ -143,6 +151,9 @@ export const Main = (): React.JSX.Element => {
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
|
@ -163,6 +174,9 @@ export const Main = (): React.JSX.Element => {
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ImBooks /> Browse library{" "}
|
<ImBooks /> Browse library{" "}
|
||||||
|
@ -172,6 +186,9 @@ export const Main = (): React.JSX.Element => {
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginRight: "auto",
|
marginRight: "auto",
|
||||||
marginLeft: "10px",
|
marginLeft: "10px",
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { useCallback, useContext } from "react";
|
||||||
import { Button, Col, Form, Modal, Row } from "react-bootstrap";
|
import { Button, Col, Form, Modal, Row } from "react-bootstrap";
|
||||||
import { useForm, useWatch } from "react-hook-form";
|
import { useForm, useWatch } from "react-hook-form";
|
||||||
import { TfiKey } from "react-icons/tfi";
|
import { TfiKey } from "react-icons/tfi";
|
||||||
|
import { primaryRGBA, primary, secondary } from "../../../colors";
|
||||||
import { ModalHeader } from "./ModalHeader";
|
import { ModalHeader } from "./ModalHeader";
|
||||||
import { AuthContext } from "../../../App";
|
import { AuthContext } from "../../../App";
|
||||||
import { AuthModalProps } from "./types";
|
import { AuthModalProps } from "./types";
|
||||||
|
@ -70,7 +71,12 @@ export const AuthenticationModal = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={open} onHide={onClose} centered>
|
<Modal
|
||||||
|
show={open}
|
||||||
|
onHide={onClose}
|
||||||
|
style={{ backgroundColor: primaryRGBA }}
|
||||||
|
centered
|
||||||
|
>
|
||||||
<ModalHeader
|
<ModalHeader
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={isUpdate ? "Set new Admin key" : "Admin Login"}
|
title={isUpdate ? "Set new Admin key" : "Admin Login"}
|
||||||
|
@ -78,7 +84,9 @@ export const AuthenticationModal = ({
|
||||||
/>
|
/>
|
||||||
<Modal.Body
|
<Modal.Body
|
||||||
style={{
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
borderTop: "none",
|
borderTop: "none",
|
||||||
|
backgroundColor: primary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Form
|
<Form
|
||||||
|
@ -133,6 +141,9 @@ export const AuthenticationModal = ({
|
||||||
|
|
||||||
{!isUpdate && (
|
{!isUpdate && (
|
||||||
<Form.Group as={Row} className='mb-2'>
|
<Form.Group as={Row} className='mb-2'>
|
||||||
|
<Col sm='4'>
|
||||||
|
<Form.Label>Password</Form.Label>
|
||||||
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
<Form.Control
|
<Form.Control
|
||||||
{...register("password", {
|
{...register("password", {
|
||||||
|
@ -155,6 +166,9 @@ export const AuthenticationModal = ({
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { ModalHeader } from "./ModalHeader";
|
||||||
import { useForm, useWatch } from "react-hook-form";
|
import { useForm, useWatch } from "react-hook-form";
|
||||||
import { Book, bookShelfs } from "../../../types/Book";
|
import { Book, bookShelfs } from "../../../types/Book";
|
||||||
import { useScanner } from "../../utils/useScanner";
|
import { useScanner } from "../../utils/useScanner";
|
||||||
|
import { primary, primaryRGBA, secondary } from "../../../colors";
|
||||||
import { BookModalProps } from "./types";
|
import { BookModalProps } from "./types";
|
||||||
|
|
||||||
type BookForm = Pick<Book, "isbn" | "title" | "shelf" | "published">;
|
type BookForm = Pick<Book, "isbn" | "title" | "shelf" | "published">;
|
||||||
|
@ -28,20 +29,7 @@ export const BookModal = ({
|
||||||
}, [book, reset]);
|
}, [book, reset]);
|
||||||
|
|
||||||
const { scannerError, setScannerRef } = useScanner({
|
const { scannerError, setScannerRef } = useScanner({
|
||||||
onDetected: async (result) => {
|
onDetected: (result) => {
|
||||||
const googleBooks = await (
|
|
||||||
await fetch(
|
|
||||||
"https://www.googleapis.com/books/v1/volumes?q=isbn:" + result
|
|
||||||
)
|
|
||||||
).json();
|
|
||||||
if ("items" in googleBooks) {
|
|
||||||
console.log(googleBooks);
|
|
||||||
setValue(
|
|
||||||
"published",
|
|
||||||
googleBooks.items[0].volumeInfo.publishedDate.substring(0, 4)
|
|
||||||
);
|
|
||||||
setValue("title", googleBooks.items[0].volumeInfo.title);
|
|
||||||
}
|
|
||||||
setValue("isbn", result);
|
setValue("isbn", result);
|
||||||
setShowScanner(false);
|
setShowScanner(false);
|
||||||
},
|
},
|
||||||
|
@ -50,7 +38,6 @@ export const BookModal = ({
|
||||||
const values = useWatch({ control });
|
const values = useWatch({ control });
|
||||||
|
|
||||||
const [submitError, setSubmitError] = useState<string | undefined>();
|
const [submitError, setSubmitError] = useState<string | undefined>();
|
||||||
|
|
||||||
const onSubmit = useCallback(
|
const onSubmit = useCallback(
|
||||||
async (data: Partial<BookForm>) => {
|
async (data: Partial<BookForm>) => {
|
||||||
setSubmitError(undefined);
|
setSubmitError(undefined);
|
||||||
|
@ -93,31 +80,38 @@ export const BookModal = ({
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={open} onHide={onClose} centered>
|
<Modal
|
||||||
|
show={open}
|
||||||
|
onHide={onClose}
|
||||||
|
style={{ backgroundColor: primaryRGBA }}
|
||||||
|
centered
|
||||||
|
>
|
||||||
<ModalHeader
|
<ModalHeader
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={`${!!book ? "Edit" : "Add new"} Book`}
|
title={`${!!book ? "Edit" : "Add new"} Book`}
|
||||||
icon={<ImBook size={50} className='ml-0 mr-auto' />}
|
icon={<ImBook size={50} className="ml-0 mr-auto" />}
|
||||||
/>
|
/>
|
||||||
<Modal.Body
|
<Modal.Body
|
||||||
style={{
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
borderTop: "none",
|
borderTop: "none",
|
||||||
|
backgroundColor: primary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{!showScanner && (
|
{!showScanner && (
|
||||||
<Form
|
<Form
|
||||||
className='mb-2'
|
className="mb-2"
|
||||||
onSubmit={(ev) => {
|
onSubmit={(ev) => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
onSubmit(values);
|
onSubmit(values);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Form.Group as={Row} className='mb-2'>
|
<Form.Group as={Row} className="mb-2">
|
||||||
<Col sm='2'>
|
<Col sm="2">
|
||||||
<Form.Label>ISBN</Form.Label>
|
<Form.Label>ISBN</Form.Label>
|
||||||
</Col>
|
</Col>
|
||||||
<Col className='d-flex flex-column'>
|
<Col className="d-flex flex-column">
|
||||||
<div className='d-flex'>
|
<div className="d-flex">
|
||||||
<Form.Control
|
<Form.Control
|
||||||
{...register("isbn", { required: true, maxLength: 360 })}
|
{...register("isbn", { required: true, maxLength: 360 })}
|
||||||
isInvalid={!!formState.errors.isbn}
|
isInvalid={!!formState.errors.isbn}
|
||||||
|
@ -128,8 +122,11 @@ export const BookModal = ({
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "0px 5px 5px 0px",
|
borderRadius: "0px 5px 5px 0px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
}}
|
}}
|
||||||
className='mr-2 pt-0'
|
className="mr-2 pt-0"
|
||||||
disabled={showScanner}
|
disabled={showScanner}
|
||||||
onClick={() => setShowScanner(true)}
|
onClick={() => setShowScanner(true)}
|
||||||
>
|
>
|
||||||
|
@ -138,7 +135,7 @@ export const BookModal = ({
|
||||||
</div>
|
</div>
|
||||||
<Form.Control.Feedback
|
<Form.Control.Feedback
|
||||||
style={{ display: !formState.errors.isbn ? "none" : "block" }}
|
style={{ display: !formState.errors.isbn ? "none" : "block" }}
|
||||||
type='invalid'
|
type="invalid"
|
||||||
>
|
>
|
||||||
{!formState.errors.isbn
|
{!formState.errors.isbn
|
||||||
? "ISBN is required"
|
? "ISBN is required"
|
||||||
|
@ -146,8 +143,8 @@ export const BookModal = ({
|
||||||
</Form.Control.Feedback>
|
</Form.Control.Feedback>
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className='mb-2'>
|
<Form.Group as={Row} className="mb-2">
|
||||||
<Col sm='2'>
|
<Col sm="2">
|
||||||
<Form.Label>Title</Form.Label>
|
<Form.Label>Title</Form.Label>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
|
@ -156,15 +153,15 @@ export const BookModal = ({
|
||||||
isInvalid={!!formState.errors.title}
|
isInvalid={!!formState.errors.title}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Form.Control.Feedback type='invalid'>
|
<Form.Control.Feedback type="invalid">
|
||||||
{!values.title
|
{!values.title
|
||||||
? "Title is required"
|
? "Title is required"
|
||||||
: formState.errors.title?.message}
|
: formState.errors.title?.message}
|
||||||
</Form.Control.Feedback>
|
</Form.Control.Feedback>
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className='mb-2'>
|
<Form.Group as={Row} className="mb-2">
|
||||||
<Col sm='2'>
|
<Col sm="2">
|
||||||
<Form.Label>Year published</Form.Label>
|
<Form.Label>Year published</Form.Label>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
|
@ -190,15 +187,15 @@ export const BookModal = ({
|
||||||
isInvalid={!!formState.errors.published}
|
isInvalid={!!formState.errors.published}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Form.Control.Feedback type='invalid'>
|
<Form.Control.Feedback type="invalid">
|
||||||
{!values.published
|
{!values.published
|
||||||
? "Year published is required"
|
? "Year published is required"
|
||||||
: formState.errors.published?.message}
|
: formState.errors.published?.message}
|
||||||
</Form.Control.Feedback>
|
</Form.Control.Feedback>
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<Form.Group as={Row} className='mb-2'>
|
<Form.Group as={Row} className="mb-2">
|
||||||
<Col sm='2'>
|
<Col sm="2">
|
||||||
<Form.Label>Shelf</Form.Label>
|
<Form.Label>Shelf</Form.Label>
|
||||||
</Col>
|
</Col>
|
||||||
<Col>
|
<Col>
|
||||||
|
@ -208,24 +205,27 @@ export const BookModal = ({
|
||||||
>
|
>
|
||||||
{Object.keys(bookShelfs).map((key) => (
|
{Object.keys(bookShelfs).map((key) => (
|
||||||
<option
|
<option
|
||||||
key='key'
|
key="key"
|
||||||
value={bookShelfs[key as keyof typeof bookShelfs]}
|
value={bookShelfs[key as keyof typeof bookShelfs]}
|
||||||
>
|
>
|
||||||
{key}
|
{key}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</Form.Select>
|
</Form.Select>
|
||||||
<Form.Control.Feedback type='invalid'>
|
<Form.Control.Feedback type="invalid">
|
||||||
{!values.shelf
|
{!values.shelf
|
||||||
? "Shelf is required"
|
? "Shelf is required"
|
||||||
: formState.errors.shelf?.message}
|
: formState.errors.shelf?.message}
|
||||||
</Form.Control.Feedback>
|
</Form.Control.Feedback>
|
||||||
</Col>
|
</Col>
|
||||||
</Form.Group>
|
</Form.Group>
|
||||||
<div className='d-flex mx-auto mb-auto mt-2 w-100'>
|
<div className="d-flex mx-auto mb-auto mt-2 w-100">
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
|
@ -238,14 +238,15 @@ export const BookModal = ({
|
||||||
)}
|
)}
|
||||||
{showScanner && (
|
{showScanner && (
|
||||||
<div
|
<div
|
||||||
className='w-100 overflow-hidden'
|
className="w-100 overflow-hidden"
|
||||||
ref={(ref) => setScannerRef(ref)}
|
ref={(ref) => setScannerRef(ref)}
|
||||||
style={{ position: "relative", height: "25vh" }}
|
style={{ position: "relative", height: "25vh" }}
|
||||||
>
|
>
|
||||||
<canvas
|
<canvas
|
||||||
className='drawingBuffer w-100 position-absolute'
|
className="drawingBuffer w-100 position-absolute"
|
||||||
style={{
|
style={{
|
||||||
height: "100%",
|
height: "100%",
|
||||||
|
border: "2px solid black",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,7 +258,7 @@ export const BookModal = ({
|
||||||
</p>
|
</p>
|
||||||
) : null}
|
) : null}
|
||||||
{!!submitError && (
|
{!!submitError && (
|
||||||
<Form.Control.Feedback style={{ display: "block" }} type='invalid'>
|
<Form.Control.Feedback style={{ display: "block" }} type="invalid">
|
||||||
{submitError}
|
{submitError}
|
||||||
</Form.Control.Feedback>
|
</Form.Control.Feedback>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Alert, Button, Col, Form, Modal, Row } from "react-bootstrap";
|
||||||
import { ImBoxAdd, ImBoxRemove } from "react-icons/im";
|
import { ImBoxAdd, ImBoxRemove } from "react-icons/im";
|
||||||
import { useForm, useWatch } from "react-hook-form";
|
import { useForm, useWatch } from "react-hook-form";
|
||||||
import { Book } from "../../../types/Book";
|
import { Book } from "../../../types/Book";
|
||||||
import { primary, secondary } from "../../../colors";
|
import { primary, primaryRGBA, secondary } from "../../../colors";
|
||||||
import { ModalHeader } from "./ModalHeader";
|
import { ModalHeader } from "./ModalHeader";
|
||||||
import { CheckoutBookModalProps } from "./types";
|
import { CheckoutBookModalProps } from "./types";
|
||||||
import { AiOutlineExclamationCircle } from "react-icons/ai";
|
import { AiOutlineExclamationCircle } from "react-icons/ai";
|
||||||
|
@ -30,9 +30,6 @@ export const CheckoutBookModal = ({
|
||||||
|
|
||||||
const onSubmit = useCallback(
|
const onSubmit = useCallback(
|
||||||
async (data: Partial<BookCheckoutForm>) => {
|
async (data: Partial<BookCheckoutForm>) => {
|
||||||
if (!formState.isValid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!data.checkoutBy) {
|
if (!data.checkoutBy) {
|
||||||
setError("checkoutBy", {
|
setError("checkoutBy", {
|
||||||
message: `please enter ${
|
message: `please enter ${
|
||||||
|
@ -64,11 +61,16 @@ export const CheckoutBookModal = ({
|
||||||
setFailed(await res.text());
|
setFailed(await res.text());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[formState.isValid, isChechout, uuid, setError, onClose]
|
[uuid, onClose, setError, isChechout]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={open} onHide={onClose} centered>
|
<Modal
|
||||||
|
show={open}
|
||||||
|
onHide={onClose}
|
||||||
|
style={{ backgroundColor: primaryRGBA }}
|
||||||
|
centered
|
||||||
|
>
|
||||||
<ModalHeader
|
<ModalHeader
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={`${isChechout ? "Checkout" : "Return"} book '${title}'`}
|
title={`${isChechout ? "Checkout" : "Return"} book '${title}'`}
|
||||||
|
@ -82,7 +84,9 @@ export const CheckoutBookModal = ({
|
||||||
/>
|
/>
|
||||||
<Modal.Body
|
<Modal.Body
|
||||||
style={{
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
borderTop: "none",
|
borderTop: "none",
|
||||||
|
backgroundColor: primary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Alert className='w-80 m-auto my-4' variant='warning'>
|
<Alert className='w-80 m-auto my-4' variant='warning'>
|
||||||
|
@ -112,12 +116,6 @@ export const CheckoutBookModal = ({
|
||||||
"'null' is not a valid nickname"
|
"'null' is not a valid nickname"
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
notUndefinedString: (value) => {
|
|
||||||
return (
|
|
||||||
value?.toLocaleLowerCase() !== "undefined" ||
|
|
||||||
"'undefined' is not a valid nickname"
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
isInvalid={!!formState.errors.checkoutBy}
|
isInvalid={!!formState.errors.checkoutBy}
|
||||||
|
@ -180,10 +178,12 @@ export const CheckoutBookModal = ({
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
disabled={!formState.isValid}
|
|
||||||
onClick={() => onSubmit(values)}
|
onClick={() => onSubmit(values)}
|
||||||
>
|
>
|
||||||
{`${isChechout ? "Checkout" : "Return"} book`}
|
{`${isChechout ? "Checkout" : "Return"} book`}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Button, Modal } from "react-bootstrap";
|
import { Button, Modal } from "react-bootstrap";
|
||||||
import { primary, secondary } from "../../../colors";
|
import { primary, primaryRGBA, secondary } from "../../../colors";
|
||||||
import { ModalHeader } from "./ModalHeader";
|
import { ModalHeader } from "./ModalHeader";
|
||||||
import { ImBin } from "react-icons/im";
|
import { ImBin } from "react-icons/im";
|
||||||
import { useMutation } from "@tanstack/react-query";
|
import { useMutation } from "@tanstack/react-query";
|
||||||
|
@ -24,7 +24,12 @@ export const DeleteBookModal = ({
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={open} onHide={onClose} centered>
|
<Modal
|
||||||
|
show={open}
|
||||||
|
onHide={onClose}
|
||||||
|
style={{ backgroundColor: primaryRGBA }}
|
||||||
|
centered
|
||||||
|
>
|
||||||
<ModalHeader
|
<ModalHeader
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={"Move to Shelf"}
|
title={"Move to Shelf"}
|
||||||
|
@ -32,13 +37,18 @@ export const DeleteBookModal = ({
|
||||||
/>
|
/>
|
||||||
<Modal.Body
|
<Modal.Body
|
||||||
style={{
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
borderTop: "none",
|
borderTop: "none",
|
||||||
|
backgroundColor: primary,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className='d-flex mx-auto mb-auto mt-2 w-100'>
|
<div className='d-flex mx-auto mb-auto mt-2 w-100'>
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
|
@ -49,6 +59,9 @@ export const DeleteBookModal = ({
|
||||||
<Button
|
<Button
|
||||||
style={{
|
style={{
|
||||||
borderRadius: "5px",
|
borderRadius: "5px",
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
marginLeft: "auto",
|
marginLeft: "auto",
|
||||||
marginRight: "10px",
|
marginRight: "10px",
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -13,7 +13,13 @@ export const ModalHeader = ({
|
||||||
icon?: JSX.Element;
|
icon?: JSX.Element;
|
||||||
}): React.JSX.Element => {
|
}): React.JSX.Element => {
|
||||||
return (
|
return (
|
||||||
<Modal.Header>
|
<Modal.Header
|
||||||
|
style={{
|
||||||
|
border: "2px solid black",
|
||||||
|
borderBottom: "none",
|
||||||
|
backgroundColor: primary,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Modal.Title className='w-100 d-flex' style={{ height: "fit-content" }}>
|
<Modal.Title className='w-100 d-flex' style={{ height: "fit-content" }}>
|
||||||
{typeof title === "string" ? (
|
{typeof title === "string" ? (
|
||||||
<>
|
<>
|
||||||
|
@ -28,6 +34,9 @@ export const ModalHeader = ({
|
||||||
<Button
|
<Button
|
||||||
className='ml-auto mr-0'
|
className='ml-auto mr-0'
|
||||||
style={{
|
style={{
|
||||||
|
backgroundColor: secondary,
|
||||||
|
color: "black",
|
||||||
|
border: "2px solid black",
|
||||||
width: "fit-content",
|
width: "fit-content",
|
||||||
height: "fit-content",
|
height: "fit-content",
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React, { useContext } from "react";
|
import React from "react";
|
||||||
import { Modal } from "react-bootstrap";
|
import { Modal } from "react-bootstrap";
|
||||||
import { ImCamera } from "react-icons/im";
|
import { ImCamera } from "react-icons/im";
|
||||||
|
import { primaryRGBA } from "../../../colors";
|
||||||
import { useScanner } from "../../utils/useScanner";
|
import { useScanner } from "../../utils/useScanner";
|
||||||
import { ModalHeader } from "./ModalHeader";
|
import { ModalHeader } from "./ModalHeader";
|
||||||
|
|
||||||
|
@ -16,13 +17,18 @@ export const ScannerModal = ({
|
||||||
const { scannerError, setScannerRef } = useScanner({ onDetected });
|
const { scannerError, setScannerRef } = useScanner({ onDetected });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal show={open} onHide={onClose} centered>
|
<Modal
|
||||||
|
show={open}
|
||||||
|
onHide={onClose}
|
||||||
|
style={{ backgroundColor: primaryRGBA }}
|
||||||
|
centered
|
||||||
|
>
|
||||||
<ModalHeader
|
<ModalHeader
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={"Scan barcode"}
|
title={"Scan barcode"}
|
||||||
icon={<ImCamera size={50} className='ml-0 mr-auto' />}
|
icon={<ImCamera size={50} className='ml-0 mr-auto' />}
|
||||||
/>
|
/>
|
||||||
<Modal.Body>
|
<Modal.Body style={{ border: "2px solid black", borderTop: "none" }}>
|
||||||
<div
|
<div
|
||||||
className='w-100 overflow-hidden'
|
className='w-100 overflow-hidden'
|
||||||
ref={(ref) => setScannerRef(ref)}
|
ref={(ref) => setScannerRef(ref)}
|
||||||
|
@ -35,7 +41,7 @@ export const ScannerModal = ({
|
||||||
className='drawingBuffer w-100 position-absolute'
|
className='drawingBuffer w-100 position-absolute'
|
||||||
style={{
|
style={{
|
||||||
height: "100%",
|
height: "100%",
|
||||||
border: `2px solid black`,
|
border: "2px solid black",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
1
issues
1
issues
File diff suppressed because one or more lines are too long
2
middleware/.gitignore
vendored
2
middleware/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
dist
|
|
||||||
node_modules
|
|
Loading…
Reference in a new issue