diff --git a/routes/_components/FreeTextLayout.html b/routes/_components/FreeTextLayout.html
index cbb82cb7..4257f55a 100644
--- a/routes/_components/FreeTextLayout.html
+++ b/routes/_components/FreeTextLayout.html
@@ -8,4 +8,12 @@
:global(.free-text p) {
margin: 30px 0;
}
+ :global(.free-text) {
+ overflow-y: auto; /* fixes weird iOS Safari bug where scrolling gets stuck */
+ }
+ @media (max-width: 767px) {
+ :global(.free-text) {
+ margin: 10px;
+ }
+ }
\ No newline at end of file
diff --git a/routes/_components/Layout.html b/routes/_components/Layout.html
index 3033ad50..ce524aa1 100644
--- a/routes/_components/Layout.html
+++ b/routes/_components/Layout.html
@@ -1,7 +1,7 @@
<:Window bind:innerHeight />
-
+
@@ -12,6 +12,7 @@
import debounce from 'lodash/debounce'
import throttle from 'lodash/throttle'
+ import { isFullscreen, attachFullscreenListener, detachFullscreenListener } from '../_utils/fullscreen'
import { mark, stop } from '../_utils/marks'
const SCROLL_EVENT_DELAY = 300
@@ -42,6 +43,9 @@
scroll(node, callback) {
const onScroll = throttle(event => {
mark('onScroll')
+ if (this.get('fullscreen')) {
+ return
+ }
callback(event)
stop('onScroll')
}, SCROLL_EVENT_DELAY, {
@@ -55,6 +59,17 @@
node.removeEventListener('scroll', onScroll);
}
};
+ },
+ fullscreen(node, callback) {
+ const onFullscreen = (() => {
+ callback()
+ })
+ attachFullscreenListener(onFullscreen)
+ return {
+ teardown() {
+ detachFullscreenListener(onFullscreen)
+ }
+ }
}
},
methods: {
@@ -63,6 +78,12 @@
scrollTop: event.target.scrollTop,
scrollHeight: event.target.scrollHeight
})
+ },
+ onFullscreenChange() {
+ mark('onFullscreenChange')
+ console.log('is fullscreen? ', isFullscreen())
+ this.set({ fullscreen: isFullscreen() })
+ stop('onFullscreenChange')
}
}
};
diff --git a/routes/_components/LoadingSpinner.html b/routes/_components/LoadingSpinner.html
index 37752e46..fb2e844e 100644
--- a/routes/_components/LoadingSpinner.html
+++ b/routes/_components/LoadingSpinner.html
@@ -17,15 +17,9 @@
0% {
transform: rotate(0deg);
}
- 25% {
- transform: rotate(90deg);
- }
50% {
transform: rotate(180deg);
}
- 75% {
- transform: rotate(270deg);
- }
100% {
transform: rotate(360deg);
}
diff --git a/routes/_components/Media.html b/routes/_components/Media.html
new file mode 100644
index 00000000..4daddffe
--- /dev/null
+++ b/routes/_components/Media.html
@@ -0,0 +1,68 @@
+
+
+
\ No newline at end of file
diff --git a/routes/_components/Status.html b/routes/_components/Status.html
index 8fd4900d..ff630593 100644
--- a/routes/_components/Status.html
+++ b/routes/_components/Status.html
@@ -46,13 +46,7 @@
-
+
\ No newline at end of file
diff --git a/routes/_components/VirtualListItem.html b/routes/_components/VirtualListItem.html
index 525a0997..3c14985e 100644
--- a/routes/_components/VirtualListItem.html
+++ b/routes/_components/VirtualListItem.html
@@ -1,7 +1,8 @@
<:Component {component} virtualProps="{{props}}" virtualIndex="{{index}}" virtualLength="{{$numItems}}"/>
diff --git a/routes/_utils/fullscreen.js b/routes/_utils/fullscreen.js
new file mode 100644
index 00000000..1edf3311
--- /dev/null
+++ b/routes/_utils/fullscreen.js
@@ -0,0 +1,23 @@
+export const isFullscreen = () => !!(document.fullscreenElement ||
+ document.webkitFullscreenElement ||
+ document.mozFullScreenElement);
+
+export const attachFullscreenListener = (listener) => {
+ if ('onfullscreenchange' in document) {
+ document.addEventListener('fullscreenchange', listener);
+ } else if ('onwebkitfullscreenchange' in document) {
+ document.addEventListener('webkitfullscreenchange', listener);
+ } else if ('onmozfullscreenchange' in document) {
+ document.addEventListener('mozfullscreenchange', listener);
+ }
+};
+
+export const detachFullscreenListener = (listener) => {
+ if ('onfullscreenchange' in document) {
+ document.removeEventListener('fullscreenchange', listener);
+ } else if ('onwebkitfullscreenchange' in document) {
+ document.removeEventListener('webkitfullscreenchange', listener);
+ } else if ('onmozfullscreenchange' in document) {
+ document.removeEventListener('mozfullscreenchange', listener);
+ }
+};
\ No newline at end of file
diff --git a/routes/_utils/virtualListStore.js b/routes/_utils/virtualListStore.js
index 048764bf..d0f18ee5 100644
--- a/routes/_utils/virtualListStore.js
+++ b/routes/_utils/virtualListStore.js
@@ -1,6 +1,8 @@
import { Store } from 'svelte/store.js'
import { mark, stop } from '../_utils/marks'
+const VIEWPORT_RENDER_FACTOR = 4
+
class VirtualListStore extends Store {
constructor(state) {
super(state)
@@ -46,7 +48,7 @@ virtualListStore.compute('visibleItems',
['items', 'scrollTop', 'itemHeights', 'offsetHeight'],
(items, scrollTop, itemHeights, offsetHeight) => {
mark('compute visibleItems')
- let renderBuffer = 3 * offsetHeight
+ let renderBuffer = VIEWPORT_RENDER_FACTOR * offsetHeight
let visibleItems = []
let totalOffset = 0
let len = items.length
diff --git a/routes/settings/_components/SettingsList.html b/routes/settings/_components/SettingsList.html
index 4e4fcb54..9f7600f4 100644
--- a/routes/settings/_components/SettingsList.html
+++ b/routes/settings/_components/SettingsList.html
@@ -9,9 +9,9 @@
margin: 20px auto;
}
- @media (min-width: 768px) {
+ @media (max-width: 767px) {
ul.settings-list {
- max-width: 80%;
+ max-width: 90%;
}
}
diff --git a/routes/settings/_components/SettingsListItem.html b/routes/settings/_components/SettingsListItem.html
index 48c07405..7afcddc1 100644
--- a/routes/settings/_components/SettingsListItem.html
+++ b/routes/settings/_components/SettingsListItem.html
@@ -43,5 +43,10 @@
.settings-list-item .offset-for-icon {
margin-left: 44px;
}
+ .settings-list-item span {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
\ No newline at end of file
diff --git a/routes/settings/instances/[instanceName].html b/routes/settings/instances/[instanceName].html
index 35515e08..cc714f8e 100644
--- a/routes/settings/instances/[instanceName].html
+++ b/routes/settings/instances/[instanceName].html
@@ -4,7 +4,7 @@
- {{params.instanceName}}
+ {{params.instanceName}}
{{#if instanceUserAccount}}
Logged in as:
@@ -87,6 +87,11 @@
margin: 0 5px;
flex-basis: 100%;
}
+ .instance-name-h1 {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }