Run prettier
This commit is contained in:
parent
3db490a0bb
commit
4fbec34f24
@ -46,4 +46,4 @@ export function featureDetect(): FeatureDetectionResult {
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
return await res.json();
|
||||
}
|
||||
|
||||
function U2L(input: Date|number): string {
|
||||
function U2L(input: Date | number): string {
|
||||
if (input instanceof Date) {
|
||||
return input.toLocaleString();
|
||||
}
|
||||
@ -68,69 +68,69 @@
|
||||
<h2>Browser Features</h2>
|
||||
{#await featureDetect()}
|
||||
Checking browser features
|
||||
{:then features}
|
||||
{:then features}
|
||||
<h3>Critical Features</h3>
|
||||
{#if !features.critical}
|
||||
<p>OwlBoard will not function properly without these browser features. If you see any crosses here
|
||||
you may need to update your browser or choose another browser. Chrome, Edge, Firefox, Brave & Samsung Browser
|
||||
have been tested.
|
||||
<p>
|
||||
OwlBoard will not function properly without these browser features. If you see any crosses here you may need to update your browser or choose another browser. Chrome,
|
||||
Edge, Firefox, Brave & Samsung Browser have been tested.
|
||||
</p>
|
||||
{/if}
|
||||
{/if}
|
||||
<ul class="feature-list">
|
||||
<li>
|
||||
Fetch <span class="feature-status {features.missing.includes('fetch') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('fetch') ? '✗' : '✓'}
|
||||
</span>
|
||||
Fetch <span class="feature-status {features.missing.includes('fetch') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("fetch") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Local Storage <span class="feature-status {features.missing.includes('localStorage') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('localStorage') ? '✗' : '✓'}
|
||||
</span>
|
||||
Local Storage <span class="feature-status {features.missing.includes('localStorage') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("localStorage") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Session Storage <span class="feature-status {features.missing.includes('sessionStorage') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('sessionStorage') ? '✗' : '✓'}
|
||||
</span>
|
||||
Session Storage <span class="feature-status {features.missing.includes('sessionStorage') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("sessionStorage") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Promises <span class="feature-status {features.missing.includes('promise') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('promise') ? '✗' : '✓'}
|
||||
</span>
|
||||
Promises <span class="feature-status {features.missing.includes('promise') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("promise") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h3>Nice-to-have Features</h3>
|
||||
{#if !features.nice}
|
||||
<p>OwlBoard may run slowly or be missing some functions without these browser features. If you see any crosses here
|
||||
you may want to update your browser or choose another browser for improved performance. Chrome, Edge, Firefox,
|
||||
Brave & Samsung Browser have been tested.
|
||||
</ul>
|
||||
|
||||
<h3>Nice-to-have Features</h3>
|
||||
{#if !features.nice}
|
||||
<p>
|
||||
OwlBoard may run slowly or be missing some functions without these browser features. If you see any crosses here you may want to update your browser or choose another
|
||||
browser for improved performance. Chrome, Edge, Firefox, Brave & Samsung Browser have been tested.
|
||||
</p>
|
||||
{/if}
|
||||
<ul class="feature-list">
|
||||
{/if}
|
||||
<ul class="feature-list">
|
||||
<li>
|
||||
Geolocation <span class="feature-status {features.missing.includes('geolocation') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('geolocation') ? '✗' : '✓'}
|
||||
</span>
|
||||
Geolocation <span class="feature-status {features.missing.includes('geolocation') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("geolocation") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Service Worker <span class="feature-status {features.missing.includes('serviceWorker') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('serviceWorker') ? '✗' : '✓'}
|
||||
</span>
|
||||
Service Worker <span class="feature-status {features.missing.includes('serviceWorker') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("serviceWorker") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Dialog <span class="feature-status {features.missing.includes('dialog') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('dialog') ? '✗' : '✓'}
|
||||
</span>
|
||||
Dialog <span class="feature-status {features.missing.includes('dialog') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("dialog") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
<li>
|
||||
Popover API <span class="feature-status {features.missing.includes('popover') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes('popover') ? '✗' : '✓'}
|
||||
</span>
|
||||
Popover API <span class="feature-status {features.missing.includes('popover') ? 'cross' : 'tick'}">
|
||||
{features.missing.includes("popover") ? "✗" : "✓"}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
{:catch error}
|
||||
</ul>
|
||||
{:catch error}
|
||||
Failed to detect browser features: {error.message}
|
||||
{/await}
|
||||
{/await}
|
||||
|
||||
<Nav />
|
||||
|
||||
@ -148,34 +148,34 @@
|
||||
margin-top: 8px;
|
||||
}
|
||||
.feature-list {
|
||||
list-style-type: none; /* Remove bullet points */
|
||||
padding: 0;
|
||||
text-align: center; /* Center the list */
|
||||
}
|
||||
list-style-type: none; /* Remove bullet points */
|
||||
padding: 0;
|
||||
text-align: center; /* Center the list */
|
||||
}
|
||||
|
||||
.feature-list li {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 8px 0;
|
||||
}
|
||||
.feature-list li {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.feature-status {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.feature-status {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
color: white;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.tick {
|
||||
background-color: green;
|
||||
}
|
||||
.tick {
|
||||
background-color: green;
|
||||
}
|
||||
|
||||
.cross {
|
||||
background-color: red;
|
||||
}
|
||||
.cross {
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user