From 8ae2868befab453ef5960a5f0eab6b4164125cf2 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Fri, 28 Nov 2025 12:23:11 +1300 Subject: [PATCH] Improved sharing videos --- materialious/android/app/build.gradle | 2 +- .../android/app/capacitor.build.gradle | 1 + .../android/capacitor.settings.gradle | 3 + materialious/electron/package-lock.json | 4 +- materialious/electron/package.json | 2 +- materialious/package-lock.json | 14 ++- materialious/package.json | 1 + materialious/src/lib/components/Player.svelte | 2 +- .../src/lib/components/ShareVideo.svelte | 119 +++++++++--------- .../lib/components/settings/Settings.svelte | 6 +- materialious/src/lib/i18n/locales/en.json | 3 +- .../routes/(app)/watch/[slug]/+page.svelte | 7 +- update_versions.py | 2 +- 13 files changed, 94 insertions(+), 72 deletions(-) diff --git a/materialious/android/app/build.gradle b/materialious/android/app/build.gradle index d073e945..3503af93 100644 --- a/materialious/android/app/build.gradle +++ b/materialious/android/app/build.gradle @@ -7,7 +7,7 @@ android { applicationId "us.materialio.app" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 169 + versionCode 170 versionName "1.11.9" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { diff --git a/materialious/android/app/capacitor.build.gradle b/materialious/android/app/capacitor.build.gradle index 51164fc0..319f01fb 100644 --- a/materialious/android/app/capacitor.build.gradle +++ b/materialious/android/app/capacitor.build.gradle @@ -14,6 +14,7 @@ dependencies { implementation project(':capacitor-browser') implementation project(':capacitor-clipboard') implementation project(':capacitor-screen-orientation') + implementation project(':capacitor-share') implementation project(':capacitor-nodejs') } diff --git a/materialious/android/capacitor.settings.gradle b/materialious/android/capacitor.settings.gradle index 01670f74..c77eadac 100644 --- a/materialious/android/capacitor.settings.gradle +++ b/materialious/android/capacitor.settings.gradle @@ -17,5 +17,8 @@ project(':capacitor-clipboard').projectDir = new File('../node_modules/@capacito include ':capacitor-screen-orientation' project(':capacitor-screen-orientation').projectDir = new File('../node_modules/@capacitor/screen-orientation/android') +include ':capacitor-share' +project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android') + include ':capacitor-nodejs' project(':capacitor-nodejs').projectDir = new File('../node_modules/capacitor-nodejs/android') diff --git a/materialious/electron/package-lock.json b/materialious/electron/package-lock.json index 864d330b..48ef5424 100644 --- a/materialious/electron/package-lock.json +++ b/materialious/electron/package-lock.json @@ -1,12 +1,12 @@ { "name": "Materialious", - "version": "1.11.8", + "version": "1.11.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "Materialious", - "version": "1.11.7", + "version": "1.11.9", "license": "MIT", "dependencies": { "@capacitor-community/electron": "^5.0.0", diff --git a/materialious/electron/package.json b/materialious/electron/package.json index 0ba2e8a5..9fcbf230 100644 --- a/materialious/electron/package.json +++ b/materialious/electron/package.json @@ -43,4 +43,4 @@ "capacitor", "electron" ] -} +} \ No newline at end of file diff --git a/materialious/package-lock.json b/materialious/package-lock.json index 56a8fb4a..c586708e 100644 --- a/materialious/package-lock.json +++ b/materialious/package-lock.json @@ -1,12 +1,12 @@ { "name": "materialious", - "version": "1.11.8", + "version": "1.11.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "materialious", - "version": "1.11.7", + "version": "1.11.9", "hasInstallScript": true, "dependencies": { "@capacitor-community/electron": "^5.0.1", @@ -17,6 +17,7 @@ "@capacitor/clipboard": "^7.0.0", "@capacitor/core": "^7.4.3", "@capacitor/screen-orientation": "^7.0.0", + "@capacitor/share": "^7.0.2", "beercss": "^3.12.13", "bgutils-js": "^3.2.0", "capacitor-nodejs": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz", @@ -2081,6 +2082,15 @@ "@capacitor/core": ">=7.0.0" } }, + "node_modules/@capacitor/share": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@capacitor/share/-/share-7.0.2.tgz", + "integrity": "sha512-VyNPo/9831xnL17IMDeft5yNdBjoKNb451P95sRcr69hulRDqHc+kndqOVaMXnaA6IyBdWnnFv/n1HUf4cXpGw==", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": ">=7.0.0" + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", diff --git a/materialious/package.json b/materialious/package.json index 3d7cbe2a..24940c98 100644 --- a/materialious/package.json +++ b/materialious/package.json @@ -49,6 +49,7 @@ "@capacitor/clipboard": "^7.0.0", "@capacitor/core": "^7.4.3", "@capacitor/screen-orientation": "^7.0.0", + "@capacitor/share": "^7.0.2", "beercss": "^3.12.13", "bgutils-js": "^3.2.0", "capacitor-nodejs": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz", diff --git a/materialious/src/lib/components/Player.svelte b/materialious/src/lib/components/Player.svelte index dbd7711b..6dfc12b9 100644 --- a/materialious/src/lib/components/Player.svelte +++ b/materialious/src/lib/components/Player.svelte @@ -833,7 +833,7 @@ id="player" poster={getBestThumbnail(data.video.videoThumbnails, 9999, 9999)} > - {#if isEmbed && !isAndroidTvStore} + {#if isEmbed && !$isAndroidTvStore}
{data.video.title}
diff --git a/materialious/src/lib/components/ShareVideo.svelte b/materialious/src/lib/components/ShareVideo.svelte index 30f49375..6b1360ed 100644 --- a/materialious/src/lib/components/ShareVideo.svelte +++ b/materialious/src/lib/components/ShareVideo.svelte @@ -1,6 +1,8 @@ -{#if currentTime !== undefined} -
  • - -
    {$_('player.share.includeTimestamp')}
    + + {#if currentTime !== undefined} +
  • + +
    {$_('player.share.includeTimestamp')}
    +
  • +
    + {/if} + -
    -{/if} - - - + + +
    + +
    {$_('player.share.copiedSuccess')}
    diff --git a/materialious/src/lib/components/settings/Settings.svelte b/materialious/src/lib/components/settings/Settings.svelte index ae2cd411..9ae42643 100644 --- a/materialious/src/lib/components/settings/Settings.svelte +++ b/materialious/src/lib/components/settings/Settings.svelte @@ -95,7 +95,7 @@ {tabs[tabIds.indexOf(activeTab)].icon} {tabs[tabIds.indexOf(activeTab)].label} - {#each tabs as tab, _} + {#each tabs as tab (tab)}
  • { activeTab = tab.id; @@ -112,7 +112,7 @@