Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cargo/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ leak-timeout = "100ms"
# To address this, "archive.include" specifies additional paths that will be included in the archive.
archive.include = [


# Examples:
#
# { path = "application-data", relative-to = "target" },
Expand Down
1 change: 1 addition & 0 deletions .changeset/hip-seals-read.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---

---
1 change: 1 addition & 0 deletions .changeset/rude-pears-open.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---

---
1 change: 1 addition & 0 deletions .changeset/small-friends-grin.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---

---
18 changes: 10 additions & 8 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"toml": {
},
// cSpell:disable-next-line
"malva": {
},
"markup": {
Expand Down Expand Up @@ -57,13 +58,14 @@
"packages/**/test/**/hotCases/**",
],
"plugins": [
"https://plugins.dprint.dev/exec-0.5.0.json@8d9972eee71fa1590e04873540421f3eda7674d0f1aae3d7c788615e7b7413d0",
"https://plugins.dprint.dev/typescript-0.91.3.wasm",
"https://plugins.dprint.dev/json-0.19.3.wasm",
"https://plugins.dprint.dev/markdown-0.17.1.wasm",
"https://plugins.dprint.dev/toml-0.6.2.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.5.1.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.10.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.3.0.wasm",
"https://plugins.dprint.dev/dockerfile-0.3.2.wasm",
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf",
"https://plugins.dprint.dev/typescript-0.94.0.wasm",
"https://plugins.dprint.dev/json-0.20.0.wasm",
"https://plugins.dprint.dev/markdown-0.18.0.wasm",
"https://plugins.dprint.dev/toml-0.7.0.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.11.2.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.19.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm",
],
}
2 changes: 2 additions & 0 deletions cspell.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
],
// Glob
"ignorePaths": [
// cSpell:disable-next-line
".cargo/nextest.toml",
".gitignore",
// Tests
"coverage",
Expand Down
18 changes: 10 additions & 8 deletions packages/web-platform/web-elements/src/common-css/linear.css
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,16 @@ x-refresh-view,
x-swiper-item,
x-viewpager-item-ng,
x-viewpager-ng {
flex-wrap: var(--lynx-display-linear, nowrap) var(
--lynx-display-flex,
var(--flex-wrap)
);
flex-direction: var(--lynx-display-linear, var(--linear-flex-direction)) var(
--lynx-display-flex,
var(--flex-direction)
);
flex-wrap: var(--lynx-display-linear, nowrap)
var(
--lynx-display-flex,
var(--flex-wrap)
);
flex-direction: var(--lynx-display-linear, var(--linear-flex-direction))
var(
--lynx-display-flex,
var(--flex-direction)
);
justify-content: var(--lynx-display-linear, var(--linear-justify-content));
}

Expand Down
81 changes: 39 additions & 42 deletions packages/web-platform/web-explorer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
<link rel="icon" type="image/png" href="icons/icon-128x128.png">
<link rel="stylesheet" href="dist/static/css/index.css">
<title>Lynx Explorer on Web Platform</title>
<script
src="https://www.unpkg.com/@vant/touch-emulator@1.4.0/dist/index.js"
></script>
<script src="https://www.unpkg.com/@vant/touch-emulator@1.4.0/dist/index.js"></script>
<script type="module" src="./dist/static/js/index.js"></script>
<style>
#install-button {
Expand Down Expand Up @@ -48,15 +46,13 @@
}
</style>
</head>
<body
style="margin: 0; display: flex; flex-direction: column; align-items: stretch; width:100vw; max-height: 100vh;"
>
<div style="display: flex; flex: 1 1 0;">
<body style="margin: 0; display: flex; flex-direction: column; align-items: stretch; width: 100vw; max-height: 100vh">
<div style="display: flex; flex: 1 1 0">
<div
id="nav"
style="display: none; width:100%; border-width: 0px 0px 2px 0px; border-style: solid;"
style="display: none; width: 100%; border-width: 0px 0px 2px 0px; border-style: solid"
>
<div style="margin: 10px;" id="back-button" role="button">
<div style="margin: 10px" id="back-button" role="button">
<svg
viewBox="0 0 24 24"
fill="none"
Expand All @@ -79,53 +75,54 @@
</div>
<lynx-view
id="lynx-view"
style="flex: 0 1 100vh; height:100vh;"
style="flex: 0 1 100vh; height: 100vh"
></lynx-view>
<video
id="qr-scanner"
style="position: fixed; height: 100vh; width: 100vw;z-index:-1;"
style="position: fixed; height: 100vh; width: 100vw; z-index: -1"
>
</video>
<button id="install-button" style="display: none;"
>Install Lynx Explorer</button>
<button id="install-button" style="display: none">
Install Lynx Explorer
</button>
<script>
window.addEventListener('load', () => {
let deferredPrompt;
const addBtn = document.getElementById('install-button');
let deferredPrompt;
const addBtn = document.getElementById('install-button');

window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
deferredPrompt = e;
addBtn.style.display = 'block';
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
deferredPrompt = e;
addBtn.style.display = 'block';

// Add timeout to hide the button
setTimeout(() => {
addBtn.classList.add('fade-out');
// Add timeout to hide the button
setTimeout(() => {
addBtn.style.display = 'none';
}, 500);
}, 5000);
addBtn.classList.add('fade-out');
setTimeout(() => {
addBtn.style.display = 'none';
}, 500);
}, 5000);

addBtn.addEventListener('click', () => {
addBtn.style.display = 'none';
deferredPrompt.prompt();
deferredPrompt.userChoice.then((choiceResult) => {
if (choiceResult.outcome === 'accepted') {
console.log('User accepted the install prompt');
} else {
console.log('User dismissed the install prompt');
}
deferredPrompt = null;
addBtn.addEventListener('click', () => {
addBtn.style.display = 'none';
deferredPrompt.prompt();
deferredPrompt.userChoice.then((choiceResult) => {
if (choiceResult.outcome === 'accepted') {
console.log('User accepted the install prompt');
} else {
console.log('User dismissed the install prompt');
}
deferredPrompt = null;
});
});
});
});

if (window.matchMedia('(display-mode: standalone)').matches) {
console.log('PWA is installed');
} else {
console.log('PWA is not installed');
}
});
if (window.matchMedia('(display-mode: standalone)').matches) {
console.log('PWA is installed');
} else {
console.log('PWA is not installed');
}
});
</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<x-view class="page">
<filter-image
placeholder="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
>
</filter-image>
</x-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<x-view class="page">
<filter-image
src="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
>
</filter-image>
</x-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<filter-image
src="../../resources/firefox-logo.png"
blur-radius="20px"
style="width:100px; height:100px; background-color: aquamarine;"
style="width: 100px; height: 100px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<x-view class="page">
<filter-image
src="../../resources/firefox-logo.png"
style="width:200px; height:200px;"
style="width: 200px; height: 200px"
drop-shadow="30px 10px 4px #4444dd"
></filter-image>
</x-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,22 @@
<body>
<script src="/web-elements.js" defer></script>
<script type="module">
document.querySelector('#target').addEventListener('error', (ev) => {
ev.target.style.setProperty('background-color', 'green');
});
document.querySelector('#target').setAttribute('src', '/unknown/path');
document.querySelector('#target').addEventListener(
'error',
(ev) => {
ev.target.style.setProperty('background-color', 'green');
},
);
document.querySelector('#target').setAttribute(
'src',
'/unknown/path',
);
</script>
<x-view class="page">
<filter-image
src="../../resources/firefox-logo.png"
id="target"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
>
</filter-image>
</x-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
<script src="/web-elements.js" defer></script>
<script type="module">
document.querySelector('#target').addEventListener('load', (ev) => {
if (ev.detail.height === 984 && ev.detail.width === 953) {
ev.target.style.setProperty('background-color', 'green');
}
});
document.querySelector('#target').setAttribute(
'src',
'../../resources/firefox-logo.png',
);
if (ev.detail.height === 984 && ev.detail.width === 953) {
ev.target.style.setProperty('background-color', 'green');
}
});
document.querySelector('#target').setAttribute(
'src',
'../../resources/firefox-logo.png',
);
</script>
<x-view class="page">
<filter-image
id="target"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
>
</filter-image>
</x-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<filter-image
mode="aspectFill"
placeholder="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<filter-image
mode="aspectFill"
src="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<filter-image
mode="aspectFit"
placeholder="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<filter-image
mode="aspectFit"
src="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<filter-image
mode="center"
placeholder="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<filter-image
mode="center"
src="../../resources/firefox-logo.png"
style="width:100px; height:400px; background-color: aquamarine;"
style="width: 100px; height: 400px; background-color: aquamarine"
></filter-image>
</x-view>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,19 @@

<body>
<script src="/web-elements.js" defer></script>
<x-view style="--flex-direction:column">
<x-view style="--flex-direction: column">
<x-view
lynx-computed-display="flex"
style="display:flex;--lynx-display:flex;--lynx-display-toggle:var(--lynx-display-flex);width:100vw;height: 100vh;"
style="display: flex; --lynx-display: flex; --lynx-display-toggle: var(--lynx-display-flex); width: 100vw; height: 100vh"
>
<x-view style="width:100px;height:100px;background-color:red;"></x-view>
<x-view
style="width:100px;height:100px;background-color:green;"
style="width: 100px; height: 100px; background-color: red"
></x-view>
<x-view
style="width:100px;height:100px;background-color:yellow;"
style="width: 100px; height: 100px; background-color: green"
></x-view>
<x-view
style="width: 100px; height: 100px; background-color: yellow"
></x-view>
</x-view>
</x-view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@

<body>
<script src="/web-elements.js" defer></script>
<x-view style="--flex-grow:1;width:100vw;height:100vh">
<x-view style="--flex-grow: 1; width: 100vw; height: 100vh">
<x-view
lynx-computed-display="flex"
style="display:flex;--lynx-display:flex;--lynx-display-toggle:var(--lynx-display-flex);width: 50%;height:50%;background-color:red;flex-grow: var(--flex-grow)!important"
style="display: flex; --lynx-display: flex; --lynx-display-toggle: var(--lynx-display-flex); width: 50%; height: 50%; background-color: red; flex-grow: var(--flex-grow) !important"
can-use-linear-container
>
</x-view>
Expand Down
Loading
Loading