Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
81a46c28
Commit
81a46c28
authored
Nov 15, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix safari 14 issues
parent
50ea2ef5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
config.ts
configs/app/config.ts
+1
-1
getCspPolicy.ts
lib/csp/getCspPolicy.ts
+4
-0
networkExplorers.ts
lib/networks/networkExplorers.ts
+1
-1
useAdaptiveTabs.tsx
ui/shared/RoutedTabs/useAdaptiveTabs.tsx
+1
-1
No files found.
configs/app/config.ts
View file @
81a46c28
...
@@ -10,7 +10,7 @@ const parseEnvJson = <DataType>(env: string | undefined): DataType | null => {
...
@@ -10,7 +10,7 @@ const parseEnvJson = <DataType>(env: string | undefined): DataType | null => {
return
null
;
return
null
;
}
}
};
};
const
stripTrailingSlash
=
(
str
:
string
)
=>
str
.
at
(
-
1
)
===
'
/
'
?
str
.
slice
(
0
,
-
1
)
:
str
;
const
stripTrailingSlash
=
(
str
:
string
)
=>
str
[
str
.
length
-
1
]
===
'
/
'
?
str
.
slice
(
0
,
-
1
)
:
str
;
const
env
=
process
.
env
.
VERCEL_ENV
||
process
.
env
.
NODE_ENV
;
const
env
=
process
.
env
.
VERCEL_ENV
||
process
.
env
.
NODE_ENV
;
const
isDev
=
env
===
'
development
'
;
const
isDev
=
env
===
'
development
'
;
...
...
lib/csp/getCspPolicy.ts
View file @
81a46c28
...
@@ -123,6 +123,10 @@ function makePolicyMap() {
...
@@ -123,6 +123,10 @@ function makePolicyMap() {
'
fonts.googleapis.com
'
,
'
fonts.googleapis.com
'
,
],
],
'
prefetch-src
'
:
[
...
MAIN_DOMAINS
,
],
'
object-src
'
:
[
'
object-src
'
:
[
KEY_WORDS
.
NONE
,
KEY_WORDS
.
NONE
,
],
],
...
...
lib/networks/networkExplorers.ts
View file @
81a46c28
...
@@ -16,7 +16,7 @@ import appConfig from 'configs/app/config';
...
@@ -16,7 +16,7 @@ import appConfig from 'configs/app/config';
// },
// },
// ]).replaceAll('"', '\'');
// ]).replaceAll('"', '\'');
const
stripTrailingSlash
=
(
str
:
string
)
=>
str
.
at
(
-
1
)
===
'
/
'
?
str
.
slice
(
0
,
-
1
)
:
str
;
const
stripTrailingSlash
=
(
str
:
string
)
=>
str
[
str
.
length
-
1
]
===
'
/
'
?
str
.
slice
(
0
,
-
1
)
:
str
;
const
addLeadingSlash
=
(
str
:
string
)
=>
str
.
at
(
0
)
===
'
/
'
?
str
:
'
/
'
+
str
;
const
addLeadingSlash
=
(
str
:
string
)
=>
str
.
at
(
0
)
===
'
/
'
?
str
:
'
/
'
+
str
;
const
networkExplorers
:
Array
<
NetworkExplorer
>
=
(()
=>
{
const
networkExplorers
:
Array
<
NetworkExplorer
>
=
(()
=>
{
...
...
ui/shared/RoutedTabs/useAdaptiveTabs.tsx
View file @
81a46c28
...
@@ -15,7 +15,7 @@ export default function useAdaptiveTabs(tabs: Array<RoutedTab>, disabled?: boole
...
@@ -15,7 +15,7 @@ export default function useAdaptiveTabs(tabs: Array<RoutedTab>, disabled?: boole
const
calculateCut
=
React
.
useCallback
(()
=>
{
const
calculateCut
=
React
.
useCallback
(()
=>
{
const
listWidth
=
listRef
.
current
?.
getBoundingClientRect
().
width
;
const
listWidth
=
listRef
.
current
?.
getBoundingClientRect
().
width
;
const
tabWidths
=
tabsRefs
.
map
((
tab
)
=>
tab
.
current
?.
getBoundingClientRect
().
width
);
const
tabWidths
=
tabsRefs
.
map
((
tab
)
=>
tab
.
current
?.
getBoundingClientRect
().
width
);
const
menuWidth
=
tabWidths
.
at
(
-
1
)
;
const
menuWidth
=
tabWidths
[
tabWidths
.
length
-
1
]
;
if
(
!
listWidth
||
!
menuWidth
)
{
if
(
!
listWidth
||
!
menuWidth
)
{
return
tabs
.
length
;
return
tabs
.
length
;
...
...
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