Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
6367b81e
Commit
6367b81e
authored
Aug 20, 2023
by
timel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/block-in-deck-build' into 'main'
fix: block in deck build See merge request
mycard/Neos!278
parents
d99ad1d3
c24dc390
Pipeline
#23223
passed with stages
in 9 minutes and 45 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
19 deletions
+27
-19
src/infra/pfetch.ts
src/infra/pfetch.ts
+1
-1
src/ui/BuildDeck/index.module.scss
src/ui/BuildDeck/index.module.scss
+1
-0
src/ui/BuildDeck/index.tsx
src/ui/BuildDeck/index.tsx
+19
-17
src/ui/Shared/Loading/index.tsx
src/ui/Shared/Loading/index.tsx
+6
-1
No files found.
src/infra/pfetch.ts
View file @
6367b81e
...
...
@@ -26,7 +26,7 @@ export async function pfetch(
}
bytesRead
+=
value
.
length
;
const
progress
=
(
bytesRead
/
contentLength
)
*
100
;
const
progress
=
bytesRead
/
contentLength
;
options
?.
progressCallback
(
progress
);
}
}
...
...
src/ui/BuildDeck/index.module.scss
View file @
6367b81e
...
...
@@ -40,6 +40,7 @@
}
.container
{
width
:
-
webkit-fill-available
;
height
:
calc
(
100%
-
20px
);
border
:
1px
solid
rgba
(
255
,
255
,
255
,
0
.05
);
display
:
flex
;
...
...
src/ui/BuildDeck/index.tsx
View file @
6367b81e
...
...
@@ -71,7 +71,7 @@ export const loader: LoaderFunction = async () => {
export
const
Component
:
React
.
FC
=
()
=>
{
const
snapDecks
=
useSnapshot
(
deckStore
);
const
{
sqlite
}
=
useSnapshot
(
initStor
e
);
const
{
progress
}
=
useSnapshot
(
initStore
.
sqlit
e
);
const
[
selectedDeck
,
setSelectedDeck
]
=
useState
<
IDeck
>
(
deckStore
.
decks
[
0
]);
const
{
message
}
=
App
.
useApp
();
...
...
@@ -122,23 +122,25 @@ export const Component: React.FC = () => {
<
HigherCardDetail
/>
</
div
>
<
div
className=
{
styles
.
content
}
>
<
div
className=
{
styles
.
deck
}
>
<
DeckEditor
deck=
{
selectedDeck
}
onClear=
{
editDeckStore
.
clear
}
onReset=
{
handleDeckEditorReset
}
onSave=
{
handleDeckEditorSave
}
/>
</
div
>
<
div
className=
{
styles
.
select
}
>
{
sqlite
.
progress
===
1
?
(
<
Search
/>
)
:
(
<
div
className=
{
styles
.
container
}
>
<
Loading
/>
{
progress
===
1
?
(
<>
<
div
className=
{
styles
.
deck
}
>
<
DeckEditor
deck=
{
selectedDeck
}
onClear=
{
editDeckStore
.
clear
}
onReset=
{
handleDeckEditorReset
}
onSave=
{
handleDeckEditorSave
}
/>
</
div
>
)
}
</
div
>
<
div
className=
{
styles
.
select
}
>
<
Search
/>
</
div
>
</>
)
:
(
<
div
className=
{
styles
.
container
}
>
<
Loading
progress=
{
progress
*
100
}
/>
</
div
>
)
}
</
div
>
</
div
>
</
DndProvider
>
...
...
src/ui/Shared/Loading/index.tsx
View file @
6367b81e
...
...
@@ -2,6 +2,11 @@ import { LoadingOutlined } from "@ant-design/icons";
import
styles
from
"
./index.module.scss
"
;
/**
* 加载中
* @param progress 0~1的进度
* @param hiddenText 是否隐藏文字
*/
export
const
Loading
:
React
.
FC
<
{
progress
?:
number
;
hiddenText
?:
boolean
}
>
=
({
progress
,
hiddenText
,
...
...
@@ -12,7 +17,7 @@ export const Loading: React.FC<{ progress?: number; hiddenText?: boolean }> = ({
</
span
>
{
!
hiddenText
&&
(
<
span
className=
{
styles
.
text
}
>
{
progress
?
`${progress}%`
:
"
加载中
"
}
{
progress
?
`${progress
.toFixed(2)
}%`
:
"
加载中
"
}
</
span
>
)
}
</
div
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment