Skip to content

Commit 7235c0a

Browse files
authored
Merge pull request #120 from codeitcodes/dev
Dev
2 parents 0d16c7d + 87e9937 commit 7235c0a

File tree

6 files changed

+45
-9
lines changed

6 files changed

+45
-9
lines changed

full.css

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,12 @@ body.notransition .live-view.file-open {
448448
content: unset;
449449
}
450450

451+
.live-view.centered-contents {
452+
display: flex;
453+
align-items: center;
454+
justify-content: center;
455+
}
456+
451457
.live-view img {
452458
width: 100%;
453459
max-height: 100%;
@@ -1732,16 +1738,16 @@ body.mobile.expanded .splash-wrapper::before {
17321738
pointer-events: auto;
17331739
}
17341740

1735-
.splash-wrapper .loading-subtitle a {
1736-
color: var(--rosemary-lightness-deluxe);
1741+
a.link[href] {
1742+
color: var(--rosemary-lightness-deluxe) !important;
17371743
text-decoration: none;
17381744
}
17391745

1740-
.splash-wrapper a:active {
1746+
a.link[href]:active {
17411747
text-decoration: underline;
17421748
}
17431749

1744-
body:not(.mobile) .splash-wrapper a:hover {
1750+
body:not(.mobile) a.link[href]:hover {
17451751
text-decoration: underline;
17461752
}
17471753

full.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226

227227
<div class="splash-wrapper">
228228
<div class="cube-loader"></div>
229-
<div class="loading-subtitle">Connection problems? <a href="https://twitter.com/codeitcodes" target="_blank">Let us know!</a></div>
229+
<div class="loading-subtitle">Connection problems? <a href="https://twitter.com/codeitcodes" target="_blank" class="link">Let us know!</a></div>
230230
</div>
231231

232232

links.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function createLink(linkData) {
1010

1111
// save link
1212
let base = 'https://cde.run';
13-
if (isDev) base = 'https://dev.cde.run';
13+
if (window.location.origin === 'dev.codeit.codes') base = 'https://dev.cde.run';
1414

1515
let link = '';
1616

live-view/live-view.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,36 @@ async function renderLiveViewHTML(file) {
835835
logVersion();
836836

837837
}
838+
839+
840+
// if iOS version is lower than minimum
841+
842+
const isSafariWithMac = navigator.userAgent.toLowerCase().indexOf('safari') != -1;
843+
844+
if (isSafariWithMac) {
845+
846+
const safariVersion = Number(navigator.userAgent.split('Version/')[1].split(' Safari')[0]);
847+
848+
if (safariVersion < 15.4) {
849+
850+
// show message and return
851+
852+
liveView.innerHTML = `
853+
<div class="prompt">
854+
<svg style="margin-bottom: 7px;margin-top: -42px;" class="file-svg" viewBox="0 0 752 752" version="1.1" height="146" width="146" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="a"><path d="m139.21 139.21h473.58v473.58h-473.58z"></path></clipPath></defs><g clip-path="url(#a)"><path d="m356.27 572.35v-38.492c0-10.898 8.7578-19.73 19.73-19.73 10.898 0 19.734 8.7578 19.734 19.73v38.492c93.223-9.2539 167.36-83.395 176.62-176.62h-38.492c-10.898 0-19.73-8.7578-19.73-19.734 0-10.898 8.7578-19.73 19.73-19.73h38.492c-9.2539-93.227-83.395-167.36-176.62-176.62v38.496c0 10.895-8.7578 19.73-19.734 19.73-10.898 0-19.73-8.7578-19.73-19.73v-38.496c-93.227 9.2578-167.36 83.395-176.62 176.62h38.496c10.895 0 19.73 8.7578 19.73 19.73 0 10.898-8.7578 19.734-19.73 19.734h-38.496c9.2578 93.223 83.395 167.36 176.62 176.62zm19.73 40.441c-130.77 0-236.79-106.02-236.79-236.79 0-130.77 106.02-236.79 236.79-236.79 130.78 0 236.79 106.02 236.79 236.79 0 130.78-106.02 236.79-236.79 236.79zm88.371-333.09c10.426-3.1719 16.32 2.6562 13.133 13.133l-37.344 122.7c-3.1758 10.426-14.148 21.434-24.625 24.625l-122.7 37.344c-10.426 3.1719-16.32-2.6562-13.133-13.133l37.344-122.7c3.1719-10.426 14.148-21.438 24.625-24.625zm-111.21 75.098c0.69141-0.20703 1.0391-0.23047 1.2148-0.23828 0.19531-0.36328 0.21875-0.71094 0.42578-1.4023l-21.543 70.793 70.789-21.547c-0.69141 0.21094-1.0391 0.23438-1.2148 0.23828-0.19141 0.36328-0.21484 0.71094-0.42578 1.4023l21.547-70.789z" fill="hsl(223deg 75% 38%)"></path></g></svg>
855+
<div class="title">Upgrade iOS to run this file</div>
856+
<a class="desc link" href="https://support.apple.com/en-us/HT204416" target="_blank">Here's how</a>
857+
</div>
858+
`;
859+
860+
liveView.classList.add('centered-contents');
861+
liveView.classList.add('loaded');
862+
863+
return;
864+
865+
}
866+
867+
}
838868

839869

840870
// if service worker isn't installed yet

service-worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ self.addEventListener('activate', (evt) => {
8383
);
8484

8585
// send reload request to client
86-
/*workerChannel.postMessage({
86+
workerChannel.postMessage({
8787
type: 'reload'
88-
});*/
88+
});
8989

9090
});

worker/client-channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
// update worker name when updating worker
7-
const WORKER_NAME = 'codeit-worker-v489';
7+
const WORKER_NAME = 'codeit-worker-v490';
88

99

1010
// internal paths

0 commit comments

Comments
 (0)