-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor VersionCheck component: Update sidebar header text and align…
…ment
- Loading branch information
1 parent
547782a
commit 27b8d72
Showing
3 changed files
with
78 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
packages/studiocms_dashboard/src/components/shared-parts/VersionCheck.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
import currentVersion from 'studiocms:version'; | ||
interface Props { | ||
status?: 'outdated' | 'latest' | 'future'; | ||
} | ||
const { status } = Astro.props; | ||
--- | ||
|
||
<code class="version-check"> | ||
<span>v{currentVersion}</span> | ||
{status && <span class="status" class:list={[status]} />} | ||
</code> | ||
|
||
<style> | ||
.version-check { | ||
display: flex; | ||
flex-direction: row; | ||
gap: .375rem; | ||
width: 100%; | ||
justify-content: left; | ||
text-align: center; | ||
align-items: center; | ||
align-content: center; | ||
vertical-align: middle; | ||
color: hsl(var(--text-muted)); | ||
font-size: .875em; | ||
} | ||
|
||
.outdated { | ||
display: inline-block; | ||
width: 14px; | ||
height: 14px; | ||
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M12 16.5V9.75m0 0l3 3m-3-3l-3 3M6.75 19.5a4.5 4.5 0 0 1-1.41-8.775a5.25 5.25 0 0 1 10.233-2.33a3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5z'/%3E%3C/svg%3E"); | ||
background-color: hsl(var(--warning-base)); | ||
-webkit-mask-image: var(--svg); | ||
mask-image: var(--svg); | ||
-webkit-mask-repeat: no-repeat; | ||
mask-repeat: no-repeat; | ||
-webkit-mask-size: 100% 100%; | ||
mask-size: 100% 100%; | ||
} | ||
|
||
.latest { | ||
display: inline-block; | ||
width: 14px; | ||
height: 14px; | ||
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m4.5 12.75l6 6l9-13.5'/%3E%3C/svg%3E"); | ||
background-color: hsl(var(--success-base)); | ||
-webkit-mask-image: var(--svg); | ||
mask-image: var(--svg); | ||
-webkit-mask-repeat: no-repeat; | ||
mask-repeat: no-repeat; | ||
-webkit-mask-size: 100% 100%; | ||
mask-size: 100% 100%; | ||
} | ||
|
||
.future { | ||
display: inline-block; | ||
width: 14px; | ||
height: 14px; | ||
--svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9.75 3.104v5.714a2.25 2.25 0 0 1-.659 1.591L5 14.5M9.75 3.104q-.376.034-.75.082m.75-.082a24.3 24.3 0 0 1 4.5 0m0 0v5.714c0 .597.237 1.17.659 1.591L19.8 15.3M14.25 3.104q.377.034.75.082M19.8 15.3l-1.57.393A9.07 9.07 0 0 1 12 15a9.07 9.07 0 0 0-6.23-.693L5 14.5m14.8.8l1.402 1.402c1.232 1.232.65 3.318-1.067 3.611A48.3 48.3 0 0 1 12 21a48 48 0 0 1-8.135-.687c-1.718-.293-2.3-2.379-1.067-3.61L5 14.5'/%3E%3C/svg%3E"); | ||
background-color: hsl(var(--primary-base)); | ||
-webkit-mask-image: var(--svg); | ||
mask-image: var(--svg); | ||
-webkit-mask-repeat: no-repeat; | ||
mask-repeat: no-repeat; | ||
-webkit-mask-size: 100% 100%; | ||
mask-size: 100% 100%; | ||
} | ||
|
||
</style> |