mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fixed inputs appearance and global loader
This commit is contained in:
parent
811e14fd4c
commit
a068f56abf
3 changed files with 14 additions and 15 deletions
|
@ -9,6 +9,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
color: $input_text_color;
|
color: $input_text_color;
|
||||||
font: $input_font;
|
font: $input_font;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
::placeholder {
|
::placeholder {
|
||||||
font: $input_placeholder_font;
|
font: $input_placeholder_font;
|
||||||
|
@ -21,6 +22,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error, .title {
|
||||||
|
pointer-events: none;
|
||||||
|
touch-action: none;
|
||||||
|
user-select: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
max-width: calc(100% - 10px);
|
||||||
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font: $font_12_semibold;
|
font: $font_12_semibold;
|
||||||
|
@ -31,8 +42,6 @@
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: $gap / 2;
|
right: $gap / 2;
|
||||||
transform: translate(0, 50%);
|
transform: translate(0, 50%);
|
||||||
pointer-events: none;
|
|
||||||
touch-action: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
@ -48,8 +57,6 @@
|
||||||
background-color: $input_bg_color;
|
background-color: $input_bg_color;
|
||||||
color: $input_grey_color;
|
color: $input_grey_color;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
pointer-events: none;
|
|
||||||
touch-action: none;
|
|
||||||
|
|
||||||
.focused &, .not_empty & {
|
.focused &, .not_empty & {
|
||||||
transform: translate(0, -100%) scale(0.75);
|
transform: translate(0, -100%) scale(0.75);
|
||||||
|
|
|
@ -5,15 +5,15 @@ import { useFlowLoader } from '~/hooks/flow/useFlowLoader';
|
||||||
|
|
||||||
/** simply waits for all data to settle and then show the app */
|
/** simply waits for all data to settle and then show the app */
|
||||||
export const useGlobalLoader = () => {
|
export const useGlobalLoader = () => {
|
||||||
useFlowLoader();
|
const { getInitialNodes } = useFlowLoader();
|
||||||
|
|
||||||
const flow = useFlowStore();
|
const flow = useFlowStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!flow.isRefreshed) {
|
if (!flow.isRefreshed) {
|
||||||
|
void getInitialNodes();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
}, [flow.isRefreshed]);
|
}, [flow.isRefreshed, getInitialNodes]);
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,13 +82,5 @@ export const useFlowLoader = () => {
|
||||||
}
|
}
|
||||||
}, [flow]);
|
}, [flow]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (flow.isRefreshed) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void getInitialNodes();
|
|
||||||
}, [flow, getInitialNodes]);
|
|
||||||
|
|
||||||
return { getInitialNodes, isSyncing, loadMore };
|
return { getInitialNodes, isSyncing, loadMore };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue