Skip to content

Commit

Permalink
web/satellite/v2: fixed style-src CSP error
Browse files Browse the repository at this point in the history
Made inline styles to be loaded from file to resolve CSP error

Issue:
#6701

Change-Id: I0d15475d61bf4d0a499ca884b5a4b77decb6de56
  • Loading branch information
VitaliiShpital committed Jan 19, 2024
1 parent 0741205 commit 577546a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 30 deletions.
30 changes: 1 addition & 29 deletions web/satellite/index-vuetify.html
Expand Up @@ -5,36 +5,8 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="dns-prefetch" href="https://js.stripe.com">
<link rel="stylesheet" href="/vuetify-poc/src/styles/app-preloader.scss">
<title>Storj</title>

<style>
#pre-app-loader {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}

#pre-app-loader div {
border: 4px solid rgb(1,73,255);
border-top: 4px solid transparent;
border-radius: 50%;
width: 90px;
height: 90px;
animation: spin .7s linear infinite;
}

#pre-app-loader img {
position: absolute;
inset: 0;
margin: auto;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div id="pre-app-loader">
Expand Down
2 changes: 1 addition & 1 deletion web/satellite/vuetify-poc/src/components/ErrorPage.vue
Expand Up @@ -117,7 +117,7 @@ onMounted(() => {
content: '';
position: fixed;
inset: 0;
background: url('../../static/images/errors/world.svg') no-repeat center;
background: url('../../../static/images/errors/world.svg') no-repeat center;
background-size: auto 75%;
z-index: -1;
opacity: 0.15;
Expand Down
29 changes: 29 additions & 0 deletions web/satellite/vuetify-poc/src/styles/app-preloader.scss
@@ -0,0 +1,29 @@
// Copyright (C) 2024 Storj Labs, Inc.
// See LICENSE for copying information.

#pre-app-loader {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}

#pre-app-loader div {
border: 4px solid rgb(1,73,255);
border-top: 4px solid transparent;
border-radius: 50%;
width: 90px;
height: 90px;
animation: spin .7s linear infinite;
}

#pre-app-loader img {
position: absolute;
inset: 0;
margin: auto;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

0 comments on commit 577546a

Please sign in to comment.