Merge branch 'main' into dependabot/npm_and_yarn/materialious/vite-5.4.2

This commit is contained in:
Ward
2024-09-01 14:59:36 +12:00
committed by GitHub
23 changed files with 308 additions and 100 deletions
-10
View File
@@ -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
Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

+1
View File
@@ -0,0 +1 @@
<svg version="1.1" id="svg1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" viewBox="50.17 104.37 109.67 88.27"><defs id="defs1"/><g id="layer1"><g id="g6" transform="matrix(1.0140222,0,0,1.0140222,-1.4722742,-56.323482)"><g id="g1" transform="matrix(-1,0,0,1,201.63735,-7.4456246e-6)"><g id="g5"><path id="path5" style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill" d="m 114.65661,173.40906 -1.29294,4.82606 h -5.2e-4 l -44.404523,11.89798 32.504993,32.50551 10e-4,0.001 -6.12107,22.84563 -26.381853,-26.38185 -26.381335,-26.38134 36.03811,-9.65625 z m -4.28191,15.97939 -5.37486,20.05872 -0.54622,2.03915 -16.176276,-16.17679 z"/><path style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill" d="M 131.38171,245.48534 105,219.10365 l -26.381696,-26.3817 36.038076,-9.65637 36.03807,-9.65638 -9.65637,36.03807 z" id="path3"/></g></g><circle style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:10.8326;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill" id="path6" cx="86.980743" cy="163.40662" r="4.9097047"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:export-filename="Materialious.png"
inkscape:export-xdpi="192.00003"
inkscape:export-ydpi="192.00003"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="Meterialious.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.35055065"
inkscape:cx="852.9438"
inkscape:cy="494.93562"
inkscape:window-width="1920"
inkscape:window-height="1001"
inkscape:window-x="1644"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs1" /><g
inkscape:label="Laag 1"
inkscape:groupmode="layer"
id="layer1"><g
id="g6"
transform="matrix(1.0140222,0,0,1.0140222,-1.4722742,-56.323482)"><g
id="g1"
transform="matrix(-1,0,0,1,201.63735,-7.4456246e-6)"><g
id="g5"><path
id="path5"
style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="m 114.65661,173.40906 -1.29294,4.82606 h -5.2e-4 l -44.404523,11.89798 32.504993,32.50551 10e-4,0.001 -6.12107,22.84563 -26.381853,-26.38185 -26.381335,-26.38134 36.03811,-9.65625 z m -4.28191,15.97939 -5.37486,20.05872 -0.54622,2.03915 -16.176276,-16.17679 z" /><path
style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="M 131.38171,245.48534 105,219.10365 l -26.381696,-26.3817 36.038076,-9.65637 36.03807,-9.65638 -9.65637,36.03807 z"
id="path3" /></g></g><circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:10.8326;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
id="path6"
cx="86.980743"
cy="163.40662"
r="4.9097047" /></g></g></svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

+60
View File
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:export-filename="Materialious.png"
inkscape:export-xdpi="192.00003"
inkscape:export-ydpi="192.00003"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="Meterialious.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.35055065"
inkscape:cx="852.9438"
inkscape:cy="494.93562"
inkscape:window-width="1920"
inkscape:window-height="1001"
inkscape:window-x="1644"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs1" /><g
inkscape:label="Laag 1"
inkscape:groupmode="layer"
id="layer1"><path
id="rect1"
style="opacity:1;fill:#8a3ba5;fill-opacity:1;stroke-width:4.05609;stroke-linecap:square;paint-order:stroke markers fill"
d="M 37.266649,80.766659 V 216.23333 H 172.73331 V 80.766659 Z" /><g
id="g6"
transform="matrix(1.0140222,0,0,1.0140222,-1.4722742,-56.323482)"><g
id="g1"
transform="matrix(-1,0,0,1,201.63735,-7.4456246e-6)"><g
id="g5"><path
id="path5"
style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="m 114.65661,173.40906 -1.29294,4.82606 h -5.2e-4 l -44.404523,11.89798 32.504993,32.50551 10e-4,0.001 -6.12107,22.84563 -26.381853,-26.38185 -26.381335,-26.38134 36.03811,-9.65625 z m -4.28191,15.97939 -5.37486,20.05872 -0.54622,2.03915 -16.176276,-16.17679 z" /><path
style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="M 131.38171,245.48534 105,219.10365 l -26.381696,-26.3817 36.038076,-9.65637 36.03807,-9.65638 -9.65637,36.03807 z"
id="path3" /></g></g><circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:10.8326;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
id="path6"
cx="86.980743"
cy="163.40662"
r="4.9097047" /></g></g></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

+79
View File
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:export-filename="MaterialiousS.png"
inkscape:export-xdpi="192.00003"
inkscape:export-ydpi="192.00003"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="MeterialiousS.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
inkscape:zoom="0.99150695"
inkscape:cx="352.99803"
inkscape:cy="544.12125"
inkscape:window-width="1920"
inkscape:window-height="1001"
inkscape:window-x="1644"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs1" /><g
inkscape:label="Laag 1"
inkscape:groupmode="layer"
id="layer1"><path
id="rect1"
style="opacity:1;fill:#8a3ba5;fill-opacity:1;stroke-width:4.05609;stroke-linecap:square;paint-order:stroke markers fill"
d="M 37.266649,80.766659 V 216.23333 H 172.73331 V 80.766659 Z" /><g
id="g6-9"
transform="matrix(1.0140222,0,0,1.0140222,1.7027258,-52.619313)"
style="opacity:0.5;fill:#000000"><g
id="g2"
transform="matrix(-1,0,0,1,201.63735,-7.4456246e-6)"
style="fill:#000000"><g
id="g5-4"
style="fill:#000000"><path
id="path5-1"
style="color:#000000;fill:#000000;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="m 114.65661,173.40906 -1.29294,4.82606 h -5.2e-4 l -44.404523,11.89798 32.504993,32.50551 10e-4,0.001 -6.12107,22.84563 -26.381853,-26.38185 -26.381335,-26.38134 36.03811,-9.65625 z m -4.28191,15.97939 -5.37486,20.05872 -0.54622,2.03915 -16.176276,-16.17679 z" /><path
style="color:#000000;fill:#000000;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="M 131.38171,245.48534 105,219.10365 l -26.381696,-26.3817 36.038076,-9.65637 36.03807,-9.65638 -9.65637,36.03807 z"
id="path3-8" /></g></g><circle
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:10.8326;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
id="path6-1"
cx="86.980743"
cy="163.40662"
r="4.9097047" /></g><g
id="g6"
transform="matrix(1.0140222,0,0,1.0140222,-1.4722742,-56.323482)"><g
id="g1"
transform="matrix(-1,0,0,1,201.63735,-7.4456246e-6)"><g
id="g5"><path
id="path5"
style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="m 114.65661,173.40906 -1.29294,4.82606 h -5.2e-4 l -44.404523,11.89798 32.504993,32.50551 10e-4,0.001 -6.12107,22.84563 -26.381853,-26.38185 -26.381335,-26.38134 36.03811,-9.65625 z m -4.28191,15.97939 -5.37486,20.05872 -0.54622,2.03915 -16.176276,-16.17679 z" /><path
style="color:#000000;fill:#ffffff;stroke-linecap:square;-inkscape-stroke:none;paint-order:stroke markers fill"
d="M 131.38171,245.48534 105,219.10365 l -26.381696,-26.3817 36.038076,-9.65637 36.03807,-9.65638 -9.65637,36.03807 z"
id="path3" /></g></g><circle
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:10.8326;stroke-linecap:square;stroke-dasharray:none;stroke-opacity:1;paint-order:stroke markers fill"
id="path6"
cx="86.980743"
cy="163.40662"
r="4.9097047" /></g></g></svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

+2 -2
View File
@@ -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.
+1 -1
View File
@@ -3,6 +3,6 @@
# And the CLI then renames it
app
node_modules
build
dist
logs
build
Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

@@ -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",
+2 -1
View File
@@ -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"
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "materialious",
"version": "1.1.9",
"version": "1.1.11",
"private": true,
"scripts": {
"dev": "vite dev",
+1 -1
View File
@@ -53,7 +53,7 @@
<i>edit</i>
{/if}
</div>
<p style="margin-bottom: 0;">
<p class="no-margin">
{@html commentTimestamps(comment.contentHtml)}
</p>
<div style="display: flex;">
+1 -1
View File
@@ -87,7 +87,7 @@
<i class="front">search</i>
<input
id="search-box"
placeholder="Search (ctrl + K)"
placeholder={$_('searchPlaceholder')}
bind:value={search}
on:click={() => (showSearchBox = true)}
/>
+83 -74
View File
@@ -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 {}
}
</script>
{#if !thumbnailHidden}
<div class:sideways-root={sideways}>
<div
style="position: relative;"
on:mouseover={previewVideo}
on:mouseleave={() => (showVideoPreview = false)}
on:focus={() => {}}
@@ -250,7 +262,9 @@
on:click={syncChangeVideo}
>
{#if loading}
<progress class="circle"></progress>
{#if !sideways}
<div class="secondary-container" style="width: 100%;height: 200px;"></div>
{/if}
{:else if loaded}
{#if showVideoPreview && videoPreview}
<div style="max-width: 100%; max-height: {imgHeight}px;">
@@ -318,47 +332,42 @@
{/if}
</div>
<div class="small-padding">
<nav class="no-margin">
<div class="max">
<a
href={watchUrl.toString()}
data-sveltekit-preload-data="off"
class:ellipsis-root={!sideways}
>
<span class="bold" class:ellipsis={!sideways}>
{#if sideways}
{truncate(letterCase(video.title), 30)}
{:else}{letterCase(video.title)}{/if}</span
>
</a>
<div>
<a class:author={!sideways} href={`/channel/${video.authorId}`}>{video.author}</a>
<span>
{#if !('publishedText' in video) && 'viewCountText' in video}
&nbsp;{video.viewCountText}{/if}
</span>
<nav class="no-margin">
{#if 'publishedText' in video}
<div class="max">
{cleanNumber(video.viewCount)}{video.publishedText}
</div>
<button class="transparent circle">
<i>more_vert</i>
<menu class="left no-wrap">
<a href="#hide" on:click={hideVideo}>
{$_('hideVideo')}
</a>
<div class="divider"></div>
<ShareVideo {video} />
</menu>
</button>
{/if}
</nav>
</div>
<div class="thumbnail-details video-title">
{#if !sideways}
<div style="margin-right: 1em;">
{#if authorImg !== ''}
<img class="circle small" src={authorImg} alt="Author" />
{:else}
<progress style="padding: 15px;" class="circle small"></progress>
{/if}
</div>
</nav>
{/if}
<div class="video-title">
<a
style="padding-left: 1px;"
class="video-title"
data-sveltekit-preload-data="off"
href={watchUrl.toString()}
>
<span class="bold">{letterCase(video.title.trimEnd())}</span>
</a>
<div>
<a class:author={!sideways} href={`/channel/${video.authorId}`}>{video.author}</a>
{#if !('publishedText' in video) && 'viewCountText' in video}
<span style="margin-top: 1em;">
{video.viewCountText}
{$_('views')}
</span>
{/if}
{#if 'publishedText' in video}
<div class="max">
{cleanNumber(video.viewCount)}{video.publishedText}
</div>
{/if}
</div>
</div>
</div>
</div>
{/if}
@@ -367,23 +376,6 @@
<div id="video-container" style="display: none;"></div>
<style>
.ellipsis-root {
display: flex;
justify-content: flex-start;
position: absolute;
width: 100%;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.author {
margin-top: 1.4em;
}
.thumbnail {
width: 100%;
overflow: hidden;
@@ -394,12 +386,29 @@
}
.sideways-root {
height: 115px;
display: flex;
align-items: flex-start;
}
.sideways-root .thumbnail {
width: 180px;
width: 200px;
}
.video-title {
display: inline-block;
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.thumbnail-details {
display: flex;
align-items: start;
justify-content: start;
padding: 0 1em 1em 1em;
line-height: 1.5;
}
@media screen and (max-width: 1499px) {
+1 -1
View File
@@ -7,7 +7,7 @@
"cancel": "Cancel",
"create": "Create",
"title": "Title",
"searchPlaceholder": "Search...",
"searchPlaceholder": "Search (ctrl + k)",
"delete": "Delete",
"deleteAllHistory": "Delete all history",
"skipping": "Skipping",
+4
View File
@@ -27,6 +27,10 @@
margin-right: 5px !important;
}
.vds-poster :where(img) {
object-fit: cover !important;
}
.infinite-status-prompt {
display: none !important;
}
+12 -4
View File
@@ -10,12 +10,20 @@
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler",
"types": ["vidstack/svelte"]
"types": [
"vidstack/svelte"
]
},
"include": ["src/**/*.ts", "src/**/*.d.ts"],
"exclude": ["node_modules", "dist"]
"include": [
"src/**/*.ts",
"src/**/*.d.ts"
],
"exclude": [
"node_modules",
"dist"
]
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

+1 -1
View File
@@ -5,7 +5,7 @@ import json
import os
import re
LATEST_VERSION = "1.1.9"
LATEST_VERSION = "1.1.11"
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")