Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SSHOC
sshoc-marketplace-frontend
Commits
47966fb3
Commit
47966fb3
authored
Apr 06, 2022
by
Stefan Probst
Browse files
style: funding notice logos should break to new line
parent
c31ce593
Pipeline
#288848
passed with stages
in 12 minutes and 53 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
src/components/account/useContributedItemsSearchResults.ts
View file @
47966fb3
import
{
useContributedItemsSearchFilters
}
from
'
@/components/account/useContributedItemsSearchFilters
'
//
import { useCurrentUser } from '@/data/sshoc/hooks/auth'
import
{
useCurrentUser
}
from
'
@/data/sshoc/hooks/auth
'
import
{
useItemSearch
}
from
'
@/data/sshoc/hooks/item
'
import
{
convertDynamicPropertySearchParams
}
from
'
@/data/sshoc/lib/convertDynamicPropertySearchParams
'
/* eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types */
export
function
useContributedItemsSearchResults
()
{
//
const currentUser = useCurrentUser()
const
currentUser
=
useCurrentUser
()
const
searchFilters
=
useContributedItemsSearchFilters
()
const
searchParams
=
{
...
convertDynamicPropertySearchParams
(
searchFilters
),
...
...
@@ -16,12 +16,12 @@ export function useContributedItemsSearchResults() {
* specified item status. Explicitly sending `d.owner` should only return items which are
* actually owned by the admin user.
*
*
Update: Actually, because
`owner`
is
set to the person approving
, we should *not* query by
*
`owner`, because then contributors would not be able to see their approved items. It means
*
that
administrator
s will always see everything, but that's ok
.
*
FIXME: The problem is that
`owner`
will be
set to the person approving
an item. So a user
*
will not be able to see contributed items which have been approved, because they are now
*
"owned" by
administrator
/moderator
.
* @see https://gitlab.gwdg.de/sshoc/sshoc-marketplace/-/issues/102
*/
//
'd.owner': currentUser.data?.username ?? '',
'
d.owner
'
:
currentUser
.
data
?.
username
??
''
,
}
const
contributedItemsSearch
=
useItemSearch
(
searchParams
)
...
...
src/components/common/FundingNotice.module.css
View file @
47966fb3
.container
{
display
:
grid
;
grid-area
:
funding-notice
;
grid-template-columns
:
40px
auto
auto
;
grid-template-columns
:
40px
auto
;
gap
:
var
(
--space-6
);
max-width
:
var
(
--size-256
);
padding-block
:
var
(
--space-24
);
color
:
var
(
--color-text-muted
);
font-size
:
var
(
--font-size-ui-xs
);
line-height
:
var
(
--line-height-relaxed
);
@media
(
/* --screen-lg */
min-width
:
64rem
)
{
grid-template-columns
:
40px
auto
auto
auto
;
}
}
.container
::before
{
...
...
@@ -22,6 +26,7 @@
.logos
{
display
:
grid
;
grid-column
:
span
2
;
grid-auto-columns
:
80px
;
grid-auto-flow
:
column
;
gap
:
var
(
--space-2
);
...
...
src/lib/core/auth/AuthProvider.tsx
View file @
47966fb3
...
...
@@ -209,11 +209,9 @@ export function AuthProvider(props: AuthProviderProps): JSX.Element {
mutate
()
{
// return t(['common', 'auth', 'signing-in'])
// FIXME: never gets updated with success message, not sure why
console
.
info
(
'
Signing in...
'
)
return
false
},
success
()
{
console
.
info
(
'
Signed in.
'
)
return
t
([
'
common
'
,
'
auth
'
,
'
sign-in-success
'
])
},
error
()
{
...
...
src/lib/core/query/create-query-client.ts
View file @
47966fb3
...
...
@@ -65,7 +65,6 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
if
(
message
!==
false
)
{
const
toastId
=
String
(
mutation
.
mutationId
)
toast
.
loading
(
message
,
{
toastId
,
role
:
'
status
'
})
console
.
info
(
'
Mutate notification
'
,
message
,
toastId
)
}
},
onSuccess
(
data
,
variables
,
context
,
mutation
)
{
...
...
@@ -90,7 +89,6 @@ export function createQueryClient(defaultErrorMessages: DefaultErrorMessageMap):
draggable
:
null
,
delay
:
100
,
// Work around one of the race conditions in `react-toastify`.
})
console
.
info
(
'
Success notification
'
,
message
,
toastId
)
}
},
onError
(
error
,
variables
,
context
,
mutation
)
{
...
...
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