Skip to content

Build your personal knowledge base with Trilium Notes

refactor(standalone/setup): get rid of warnings

Elian Doran07753a625311
diff --git a/apps/client/src/setup.css b/apps/client/src/setup.css
index e4df6c79ae..080cb2c1ca 100644
--- a/apps/client/src/setup.css
+++ b/apps/client/src/setup.css
@@ -173,39 +173,6 @@ body.setup {
}
}
- .lds-ring {
- display: inline-block;
- position: relative;
- --size: 128px;
- flex-grow: 1;
- display: flex;
- align-items: center;
- justify-content: center;
-
- &>div {
- box-sizing: border-box;
- display: block;
- position: absolute;
- width: var(--size, 48px);
- height: var(--size, 48px);
- margin: 8px;
- border: 6px solid var(--main-text-color);
- border-radius: 50%;
- animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
- border-color: var(--main-text-color) transparent transparent transparent;
-
- &:nth-child(1) {
- animation-delay: -0.45s;
- }
- &:nth-child(2) {
- animation-delay: -0.3s;
- }
- &:nth-child(3) {
- animation-delay: -0.15s;
- }
- }
- }
-
.sync-illustration {
display: flex;
justify-content: center;
diff --git a/apps/client/src/setup.tsx b/apps/client/src/setup.tsx
index 31db4b6133..5b29677200 100644
--- a/apps/client/src/setup.tsx
+++ b/apps/client/src/setup.tsx
@@ -229,16 +229,6 @@ function useOutstandingSyncInfo() {
return { outstandingPullCount, totalPullCount, initialized };
}
-function Spinner() {
- return (
- <div class="lds-ring" style="margin-right: 20px;">
- <div />
- <div />
- <div />
- <div />
- </div>);
-}
-
function CreateNewDocumentOptions({ setState }: { setState: (state: State) => void }) {
return (
<SetupPage
@@ -260,7 +250,7 @@ function CreateNewDocumentInProgress({ withDemo = false }: { withDemo?: boolean
server.post(`setup/new-document${withDemo ? "" : "?skipDemoDb"}`).then(() => {
location.reload();
});
- }, []);
+ }, [ withDemo ]);
return (
<SetupPage
@@ -362,9 +352,6 @@ function SyncFromServer({ setState }: { setState: (state: State) => void }) {
}
function SyncFromDesktop({ setState }: { setState: (state: State) => void }) {
- function handleFinishSetup() {
- }
-
return (
<SetupPage
className="sync-from-desktop"
@@ -402,15 +389,6 @@ function SyncIllustration({ targetDevice }: { targetDevice: "desktop" | "server"
);
}
-function FormItemWithIcon({ icon, children }: { icon: string; children: ComponentChildren }) {
- return (
- <div class="form-item-with-icon">
- <Icon icon={icon} />
- {children}
- </div>
- );
-}
-
function SetupOptionCard({ title, description, icon, onClick, disabled }: { title: string; description: string, icon: string, onClick?: () => void, disabled?: boolean }) {
return (
<CardFrame