mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 04:11:10 +00:00
Implements directory browser dialog, part 1: file system treeview
This commit is contained in:
1 parent
4a53348013
commit
4e4ecbbfca
318 files changed
+6012
-1184
No files matched your search
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"ServerConfiguration": {
|
||||
"BaseAddress": "https://localhost",
|
||||
"Port": 7057
|
||||
"ApiVersion": 1,
|
||||
"BaseAddress": "http://localhost",
|
||||
"Port": 5214
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,13 @@
|
||||
:root {
|
||||
--background-color: #222;
|
||||
--border-color-light: #777777;
|
||||
--container-background: #232323;
|
||||
--border-color-light: #363636;
|
||||
--border-color-light-medium: #555555;
|
||||
--border-color-light-high: #777777;
|
||||
--border-color-dark: #000000;
|
||||
--border-color-dialog: #1E90FF;
|
||||
--shadow-color: #000000;
|
||||
--text-foreground: #6DCBFE;
|
||||
}
|
||||
|
||||
html,
|
||||
@@ -35,7 +41,7 @@ body {
|
||||
#page {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: var(--border-color-light) var(--border-color-dark) var(--border-color-dark) var(--border-color-light);
|
||||
border-color: var(--border-color-light-high) var(--border-color-dark) var(--border-color-dark) var(--border-color-light-high);
|
||||
background-color: #222;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
@@ -45,6 +51,21 @@ main {
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#modal-background {
|
||||
z-index: 998;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
background-color: #000000;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.above-modal {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.shine-effect {
|
||||
position: relative;
|
||||
top: -11px;
|
||||
@@ -61,7 +82,7 @@ main {
|
||||
|
||||
.enlightenment-panel {
|
||||
border-radius: 5px;
|
||||
background: linear-gradient(135deg, #404040, #232323);
|
||||
background: linear-gradient(135deg, #404040, var(--container-background));
|
||||
border-top: 1px solid #505050;
|
||||
border-left: 1px solid #505050;
|
||||
border-right: 1px solid #000;
|
||||
@@ -69,8 +90,8 @@ main {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
.container-background {
|
||||
background-color: var(--container-background);
|
||||
}
|
||||
|
||||
.panel {
|
||||
@@ -1146,6 +1167,14 @@ main {
|
||||
font-size: 24px !important;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"> -->
|
||||
<!-- <defs> -->
|
||||
<!-- <radialGradient id="circleGradient" cx="25%" cy="25%" r="75%" fx="30%" fy="15%"> -->
|
||||
<!-- <stop offset="0%" stop-color="#C1D0E5"/> -->
|
||||
<!-- <stop offset="100%" stop-color="#006CBE"/> -->
|
||||
<!-- </radialGradient> -->
|
||||
<!-- </defs> -->
|
||||
<!-- <circle cx="150" cy="150" r="150" fill="url(#circleGradient)" /> -->
|
||||
<!-- <path d="M180 75 L100 150 L180 225" fill="none" stroke="#FFFFFF" stroke-width="30" stroke-linecap="round" stroke-linejoin="round"/> -->
|
||||
<!-- </svg> -->
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300">
|
||||
<defs>
|
||||
<radialGradient id="baseGradient" cx="10%" cy="10%" r="100%" fx="20%" fy="5%">
|
||||
<stop offset="0%" stop-color="#76AD7D" stop-opacity="0.1"/>
|
||||
<stop offset="50%" stop-color="#006B0E" stop-opacity="1"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="highlightGradient" cx="75%" cy="95%" r="100%" fx="80%" fy="80%">
|
||||
<stop offset="0%" stop-color="#91EF86" stop-opacity="0.9"/>
|
||||
<stop offset="64%" stop-color="#54AC5F" stop-opacity="0.1"/>
|
||||
<stop offset="65%" stop-color="#FFFFFF" stop-opacity="0.3"/>
|
||||
<stop offset="100%" stop-color="#54AC5F" stop-opacity="0.3"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="refractionGradient" cx="75%" cy="75%" r="50%">
|
||||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.3"/>
|
||||
<stop offset="100%" stop-color="transparent" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<circle cx="150" cy="150" r="150" fill="url(#baseGradient)" />
|
||||
<circle cx="150" cy="150" r="150" fill="url(#highlightGradient)" />
|
||||
<circle cx="150" cy="150" r="150" fill="url(#refractionGradient)" />
|
||||
<path d="M180 75 L100 150 L180 225" fill="none" stroke="#FFFFFF" stroke-width="30" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
|
||||
<defs>
|
||||
<linearGradient id="starGradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
||||
<stop offset="0%" style="stop-color:#ffd700;stop-opacity:1" />
|
||||
<stop offset="100%" style="stop-color:#ffaa00;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<filter id="innerShadow" x="-20%" y="-20%" width="140%" height="140%">
|
||||
<feGaussianBlur in="SourceAlpha" stdDeviation="3" result="blur"/>
|
||||
<feOffset dx="2" dy="2"/>
|
||||
<feComposite in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowDiff"/>
|
||||
<feFlood flood-color="#000000" flood-opacity="0.75"/>
|
||||
<feComposite in2="shadowDiff" operator="in"/>
|
||||
<feComposite in2="SourceGraphic" operator="over"/>
|
||||
</filter>
|
||||
</defs>
|
||||
<path d="M50,0 L63,38 H100 L69,61 L81,100 L50,76 L19,100 L31,61 L0,38 H37 Z" fill="url(#starGradient)" filter="url(#innerShadow)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 942 B |
@@ -0,0 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300">
|
||||
<defs>
|
||||
<radialGradient id="baseGradient" cx="10%" cy="10%" r="100%" fx="20%" fy="5%">
|
||||
<stop offset="0%" stop-color="#76AD7D" stop-opacity="0.1"/>
|
||||
<stop offset="50%" stop-color="#006B0E" stop-opacity="1"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="highlightGradient" cx="75%" cy="95%" r="100%" fx="80%" fy="80%">
|
||||
<stop offset="0%" stop-color="#91EF86" stop-opacity="0.9"/>
|
||||
<stop offset="64%" stop-color="#54AC5F" stop-opacity="0.1"/>
|
||||
<stop offset="65%" stop-color="#FFFFFF" stop-opacity="0.3"/>
|
||||
<stop offset="100%" stop-color="#54AC5F" stop-opacity="0.3"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="refractionGradient" cx="75%" cy="75%" r="50%">
|
||||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.3"/>
|
||||
<stop offset="100%" stop-color="transparent" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<circle cx="150" cy="150" r="150" fill="url(#baseGradient)" />
|
||||
<circle cx="150" cy="150" r="150" fill="url(#highlightGradient)" />
|
||||
<circle cx="150" cy="150" r="150" fill="url(#refractionGradient)" />
|
||||
<path d="M120 75 L200 150 L120 225" fill="none" stroke="#FFFFFF" stroke-width="30" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,22 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300">
|
||||
<defs>
|
||||
<radialGradient id="baseGradient" cx="10%" cy="10%" r="100%" fx="20%" fy="5%">
|
||||
<stop offset="0%" stop-color="#76AD7D" stop-opacity="0.1"/>
|
||||
<stop offset="50%" stop-color="#006B0E" stop-opacity="1"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="highlightGradient" cx="75%" cy="95%" r="100%" fx="80%" fy="80%">
|
||||
<stop offset="0%" stop-color="#91EF86" stop-opacity="0.9"/>
|
||||
<stop offset="64%" stop-color="#54AC5F" stop-opacity="0.1"/>
|
||||
<stop offset="65%" stop-color="#FFFFFF" stop-opacity="0.3"/>
|
||||
<stop offset="100%" stop-color="#54AC5F" stop-opacity="0.3"/>
|
||||
</radialGradient>
|
||||
<radialGradient id="refractionGradient" cx="75%" cy="75%" r="50%">
|
||||
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.3"/>
|
||||
<stop offset="100%" stop-color="transparent" stop-opacity="0"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<circle cx="150" cy="150" r="150" fill="url(#baseGradient)" />
|
||||
<circle cx="150" cy="150" r="150" fill="url(#highlightGradient)" />
|
||||
<circle cx="150" cy="150" r="150" fill="url(#refractionGradient)" />
|
||||
<path d="M75 180 L150 100 L225 180" fill="none" stroke="#FFFFFF" stroke-width="30" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Lumina.Presentation.Web</title>
|
||||
<title>Lumina</title>
|
||||
<base href="/" />
|
||||
<link rel="stylesheet" href="css/blazor.css" />
|
||||
<link rel="stylesheet" href="css/site.css" />
|
||||
@@ -20,13 +20,15 @@
|
||||
</svg>
|
||||
<div class="loading-progress-text"></div>
|
||||
</div>
|
||||
|
||||
<!--Modal grid background-->
|
||||
<div id="modal-background" class="block"></div>
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
<script src="js/site.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Adjusts the height of a dropdown identified by `comboboxId` to fit in the available space.
|
||||
* @param {string} comboboxId The ID of the combobox whose dropdown should be adjusted.
|
||||
*/
|
||||
function adjustDropdownHeight(comboboxId) {
|
||||
const combobox = document.getElementById(comboboxId);
|
||||
const dropdown = combobox.querySelector('.enlightenment-dropdown');
|
||||
// get the bounds of the combobox and the height of the viewport
|
||||
const comboboxRect = combobox.getBoundingClientRect();
|
||||
const viewportHeight = window.innerHeight;
|
||||
// calculate the space available between the combobox and the bottom of the viewport, with a 10px margin
|
||||
const dropdownTopPosition = comboboxRect.top + comboboxRect.height;
|
||||
const availableSpace = viewportHeight - dropdownTopPosition - 10; // 10px margin
|
||||
dropdown.style.maxHeight = `${availableSpace}px`;
|
||||
}
|
||||
|
||||
window.showDirectoryPicker = async () => {
|
||||
try {
|
||||
const dirHandle = await window.showDirectoryPicker().ConfigureAwait(false);
|
||||
return dirHandle.name;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user