diff --git a/.github/workflows/prod-android.yml b/.github/workflows/prod-android.yml index 436ce05c..31f2976a 100644 --- a/.github/workflows/prod-android.yml +++ b/.github/workflows/prod-android.yml @@ -67,15 +67,6 @@ jobs: mv app/build/outputs/app-release-signed.aab app/release/app-release-signed.aab mv app/build/outputs/app-release-signed.apk app/release/app-release-signed.apk - - name: Build Changelog - id: changelog - uses: ardalanamini/auto-changelog@v3 - with: - mention-authors: false - mention-new-contributors: false - include-compare: false - semver: false - - name: get-npm-version id: package-version uses: martinbeentjes/npm-get-version-action@v1.3.1 @@ -86,7 +77,6 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - body: ${{ steps.changelog.outputs.changelog }} file: ./materialious/android/app/release/* tag: ${{ steps.package-version.outputs.current-version}} overwrite: true diff --git a/logo/Materialious.png b/logo/Materialious.png new file mode 100644 index 00000000..1aa00eed Binary files /dev/null and b/logo/Materialious.png differ diff --git a/logo/MaterialiousNoBg.svg b/logo/MaterialiousNoBg.svg new file mode 100644 index 00000000..3a20d98a --- /dev/null +++ b/logo/MaterialiousNoBg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/logo/MaterialiousNoBgNoCrop.svg b/logo/MaterialiousNoBgNoCrop.svg new file mode 100644 index 00000000..3936441d --- /dev/null +++ b/logo/MaterialiousNoBgNoCrop.svg @@ -0,0 +1,57 @@ + + + + diff --git a/logo/MaterialiousS.png b/logo/MaterialiousS.png new file mode 100644 index 00000000..bf47baac Binary files /dev/null and b/logo/MaterialiousS.png differ diff --git a/logo/Meterialious.svg b/logo/Meterialious.svg new file mode 100644 index 00000000..302a27bf --- /dev/null +++ b/logo/Meterialious.svg @@ -0,0 +1,60 @@ + + + + diff --git a/logo/MeterialiousS.svg b/logo/MeterialiousS.svg new file mode 100644 index 00000000..0d7c7c07 --- /dev/null +++ b/logo/MeterialiousS.svg @@ -0,0 +1,79 @@ + + + + diff --git a/logo/splash.png b/logo/splash.png new file mode 100644 index 00000000..c480c02f Binary files /dev/null and b/logo/splash.png differ diff --git a/materialious/android/app/build.gradle b/materialious/android/app/build.gradle index d2e897e6..96b540df 100644 --- a/materialious/android/app/build.gradle +++ b/materialious/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "us.materialio.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 21 - versionName "1.1.9" + versionCode 23 + versionName "1.1.11" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/materialious/electron/.gitignore b/materialious/electron/.gitignore index c340937a..24fca05e 100644 --- a/materialious/electron/.gitignore +++ b/materialious/electron/.gitignore @@ -3,6 +3,6 @@ # And the CLI then renames it app node_modules -build dist logs +build \ No newline at end of file diff --git a/materialious/electron/assets/appIcon.ico b/materialious/electron/assets/appIcon.ico deleted file mode 100644 index 3dd51715..00000000 Binary files a/materialious/electron/assets/appIcon.ico and /dev/null differ diff --git a/materialious/electron/electron-builder.config.json b/materialious/electron/electron-builder.config.json index b7052aab..852f435b 100644 --- a/materialious/electron/electron-builder.config.json +++ b/materialious/electron/electron-builder.config.json @@ -8,7 +8,7 @@ "vPrefixedTagName": false, "releaseType": "release" }, - "icon": "../static/icon512_maskable.png", + "icon": "logo.png", "files": [ "assets/**/*", "build/**/*", @@ -21,8 +21,7 @@ "allowToChangeInstallationDirectory": true }, "win": { - "target": "nsis", - "icon": "assets/appIcon.ico" + "target": "nsis" }, "mac": { "category": "Entertainment", diff --git a/materialious/electron/package.json b/materialious/electron/package.json index 8dd5d4de..97b2d998 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -1,7 +1,8 @@ { "name": "Materialious", - "version": "1.1.9", + "version": "1.1.11", "description": "Modern material design for Invidious.", + "type": "commonjs", "author": { "name": "Ward Pearce", "email": "wardpearce@pm.me" diff --git a/materialious/electron/resources/logo.png b/materialious/electron/resources/logo.png new file mode 100644 index 00000000..6f3a662c Binary files /dev/null and b/materialious/electron/resources/logo.png differ diff --git a/materialious/package.json b/materialious/package.json index 2b8e9c93..12780cec 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -1,6 +1,6 @@ { "name": "materialious", - "version": "1.1.9", + "version": "1.1.11", "private": true, "scripts": { "dev": "vite dev", diff --git a/materialious/src/lib/Comment.svelte b/materialious/src/lib/Comment.svelte index ee7ac4ed..89c0bc82 100644 --- a/materialious/src/lib/Comment.svelte +++ b/materialious/src/lib/Comment.svelte @@ -53,7 +53,7 @@ edit {/if} -

+

{@html commentTimestamps(comment.contentHtml)}

diff --git a/materialious/src/lib/Search.svelte b/materialious/src/lib/Search.svelte index ecbad408..ec68d16e 100644 --- a/materialious/src/lib/Search.svelte +++ b/materialious/src/lib/Search.svelte @@ -87,7 +87,7 @@ search (showSearchBox = true)} /> diff --git a/materialious/src/lib/Thumbnail.svelte b/materialious/src/lib/Thumbnail.svelte index 58ba6301..a4f1c206 100644 --- a/materialious/src/lib/Thumbnail.svelte +++ b/materialious/src/lib/Thumbnail.svelte @@ -2,15 +2,14 @@ import { createEventDispatcher, onDestroy, onMount } from 'svelte'; import { _ } from 'svelte-i18n'; import { get } from 'svelte/store'; - import { getDeArrow, getThumbnail, getVideo, getVideoProgress } from './Api'; + import { getChannel, getDeArrow, getThumbnail, getVideo, getVideoProgress } from './Api'; import type { Notification, PlaylistPageVideo, Video, VideoBase, VideoPlay } from './Api/model'; - import ShareVideo from './ShareVideo.svelte'; import { cleanNumber, getBestThumbnail, letterCase, + proxyGoogleImage, proxyVideoUrl, - truncate, videoLength } from './misc'; import type { PlayerEvents } from './player'; @@ -39,6 +38,8 @@ let videoPreviewVolume: number = 0.4; let imgHeight: number; + let authorImg: string = ''; + let proxyVideos = get(playerProxyVideosStore); let watchUrl = new URL(`${location.origin}/watch/${video.videoId}`); @@ -73,8 +74,21 @@ function disableSideways() { if (!startedSideways) return; - if (window.innerWidth <= 1500) sideways = false; - else sideways = true; + if (window.innerWidth <= 1500) { + sideways = false; + if (typeof authorImg === 'undefined') loadAuthor(); + } else sideways = true; + } + + async function loadAuthor() { + const channel = await getChannel(video.authorId); + + const authorImgObject = new Image(); + authorImgObject.src = proxyGoogleImage(getBestThumbnail(channel.authorThumbnails)); + + authorImgObject.onload = () => { + authorImg = authorImgObject.src; + }; } onMount(async () => { @@ -87,10 +101,17 @@ return; } + // Load author details in background. + if (!sideways) { + loadAuthor(); + } + // Check if sideways should be enabled or disabled. disableSideways(); - addEventListener('resize', disableSideways); + addEventListener('resize', () => { + disableSideways(); + }); let imageSrc = getBestThumbnail(video.videoThumbnails) as string; @@ -223,20 +244,11 @@ imgHeight = document.getElementById('thumbnail-container')?.clientHeight as number; } - - function hideVideo() { - try { - localStorage.setItem(`v_h_${video.videoId}`, '1'); - dispatch('videoHidden'); - thumbnailHidden = true; - } catch {} - } {#if !thumbnailHidden}
(showVideoPreview = false)} on:focus={() => {}} @@ -250,7 +262,9 @@ on:click={syncChangeVideo} > {#if loading} - + {#if !sideways} +
+ {/if} {:else if loaded} {#if showVideoPreview && videoPreview}
@@ -318,47 +332,42 @@ {/if}
-
- + {/if} +
+ + {letterCase(video.title.trimEnd())} + + +
+ {video.author} + {#if !('publishedText' in video) && 'viewCountText' in video} + + • {video.viewCountText} + {$_('views')} + + {/if} + + {#if 'publishedText' in video} +
+ {cleanNumber(video.viewCount)} • {video.publishedText} +
+ {/if} +
+
{/if} @@ -367,23 +376,6 @@