diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..e0f905339 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,28 @@ +{ + "bracketSameLine": false, + "bracketSpacing": true, + "embeddedLanguageFormatting": "off", + "htmlWhitespaceSensitivity": "strict", + "printWidth": 160, + "semi": false, + "singleAttributePerLine": true, + "singleQuote": true, + "trailingComma": "none", + "tabWidth": 2, + "useTabs": false, + "overrides": [ + { + "files": "*.html", + "options": { + "singleAttributePerLine": false + } + }, + { + "files": "*.json", + "options": { + "parser": "json", + "printWidth": 80 + } + } + ] +} diff --git a/front/index.html b/front/index.html index 186250640..092ef0c79 100644 --- a/front/index.html +++ b/front/index.html @@ -1,101 +1,99 @@ - + - - - - - - - Funkwhale - - - - - - - - - - - - + #fake-sidebar.loaded, #fake-content.loaded { + display: none; + } + #orange-square { + width: 56px; + height: 56px; + background-color: #f2711c; + } + #fake-content { + height: 100vh; + flex-grow: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } + #fake-content h1 { + margin-bottom: 2em; + } + #fake-content .placeholder { + width: 20em; + max-width: 95%; + } + @media only screen and (max-width: 768px) { + #fake-app { + flex-direction: column; + } + #fake-sidebar { + width: 100%; + height: 56px; + } + } + + - -
-
-
-
-
- -

Loading Funkwhale…

-
-
-
-
-
-
-
-
-
-
-
-
+ +
+
+
+
+
+ +

Loading Funkwhale…

+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- - - +
+ + diff --git a/front/public/embed.html b/front/public/embed.html index 8e367ada3..f109f21cb 100644 --- a/front/public/embed.html +++ b/front/public/embed.html @@ -1,517 +1,508 @@ - + + + + + + - - - - - + - + Funkwhale Widget - Funkwhale Widget + - + - + const formatDuration = (duration) => { + if (duration === 0) return - + const time = intl.format(new Date(ZERO_DATE + duration * 1e3)) + return time.replace(/^00:/, '') + } - + // Logo component + const Logo = () => ({ $template: '#logo-template' }) - - + // Icon component + const Icon = ({ icon }) => ({ $template: '#icon-template', icon }) -
-
- {{ error.value }} -
-
+ // Media Session + const initializeMediaSession = () => { + if ('mediaSession' in navigator) { + navigator.mediaSession.setActionHandler('play', () => { + player.playing = true + audio.element.play() + }) - +
+