Improved Material you nav and status bar
This commit is contained in:
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "us.materialio.app"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 79
|
||||
versionName "1.6.28"
|
||||
versionCode 80
|
||||
versionName "1.6.29"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -15,6 +15,7 @@ dependencies {
|
||||
implementation project(':capacitor-screen-orientation')
|
||||
implementation project(':capacitor-status-bar')
|
||||
implementation project(':capgo-inappbrowser')
|
||||
implementation project(':hugotomazi-capacitor-navigation-bar')
|
||||
implementation project(':mediagrid-capacitor-native-audio')
|
||||
implementation project(':capacitor-nodejs')
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ project(':capacitor-status-bar').projectDir = new File('../node_modules/@capacit
|
||||
include ':capgo-inappbrowser'
|
||||
project(':capgo-inappbrowser').projectDir = new File('../node_modules/@capgo/inappbrowser/android')
|
||||
|
||||
include ':hugotomazi-capacitor-navigation-bar'
|
||||
project(':hugotomazi-capacitor-navigation-bar').projectDir = new File('../node_modules/@hugotomazi/capacitor-navigation-bar/android')
|
||||
|
||||
include ':mediagrid-capacitor-native-audio'
|
||||
project(':mediagrid-capacitor-native-audio').projectDir = new File('../node_modules/@mediagrid/capacitor-native-audio/android')
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Materialious",
|
||||
"version": "1.6.28",
|
||||
"version": "1.6.29",
|
||||
"description": "Modern material design for Invidious.",
|
||||
"author": {
|
||||
"name": "Ward Pearce",
|
||||
|
||||
Generated
+12
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.6.27",
|
||||
"version": "1.6.28",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "materialious",
|
||||
"version": "1.6.27",
|
||||
"version": "1.6.28",
|
||||
"dependencies": {
|
||||
"@capacitor-community/electron": "^5.0.1",
|
||||
"@capacitor/android": "^6.1.2",
|
||||
@@ -19,6 +19,7 @@
|
||||
"@capacitor/status-bar": "^6.0.1",
|
||||
"@capgo/inappbrowser": "^6.6.8",
|
||||
"@ffmpeg/ffmpeg": "^0.12.10",
|
||||
"@hugotomazi/capacitor-navigation-bar": "^4.0.1",
|
||||
"@mediagrid/capacitor-native-audio": "^1.0.0",
|
||||
"beercss": "^3.8.0",
|
||||
"bgutils-js": "^3.1.1",
|
||||
@@ -2177,6 +2178,15 @@
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@hugotomazi/capacitor-navigation-bar": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@hugotomazi/capacitor-navigation-bar/-/capacitor-navigation-bar-4.0.1.tgz",
|
||||
"integrity": "sha512-CtG9c2mxH1hxNvr8+PsoMhfKxoUkv17DQGqt82Y65gM4UARBe0Dp2fa8Eeo+ZzybJ1nRwSAiB4kEQ3nx5UpT1A==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@capacitor/core": "^4.0.1 || ^5.0.0 || ^6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/config-array": {
|
||||
"version": "0.11.14",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "materialious",
|
||||
"version": "1.6.28",
|
||||
"version": "1.6.29",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
@@ -53,6 +53,7 @@
|
||||
"@capacitor/status-bar": "^6.0.1",
|
||||
"@capgo/inappbrowser": "^6.6.8",
|
||||
"@ffmpeg/ffmpeg": "^0.12.10",
|
||||
"@hugotomazi/capacitor-navigation-bar": "^4.0.1",
|
||||
"@mediagrid/capacitor-native-audio": "^1.0.0",
|
||||
"beercss": "^3.8.0",
|
||||
"bgutils-js": "^3.1.1",
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
getBestThumbnail,
|
||||
proxyVideoUrl,
|
||||
pullBitratePreference,
|
||||
setStatusBarColor,
|
||||
videoLength,
|
||||
type PhasedDescription
|
||||
} from './misc';
|
||||
@@ -43,7 +42,7 @@
|
||||
synciousInstanceStore,
|
||||
synciousStore
|
||||
} from './store';
|
||||
import { getDynamicTheme } from './theme';
|
||||
import { getDynamicTheme, setStatusBarColor } from './theme';
|
||||
|
||||
export let data: { video: VideoPlay; content: PhasedDescription; playlistId: string | null };
|
||||
export let audioMode = false;
|
||||
@@ -365,6 +364,7 @@
|
||||
|
||||
if (get(playerAutoPlayStore)) {
|
||||
player.play();
|
||||
player.exitFullscreen();
|
||||
}
|
||||
await loadPlayerPos();
|
||||
});
|
||||
@@ -424,8 +424,6 @@
|
||||
}
|
||||
|
||||
if (Capacitor.getPlatform() === 'android') {
|
||||
let initialFullscreen = true;
|
||||
|
||||
const videoFormats = data.video.adaptiveFormats.filter((format) =>
|
||||
format.type.startsWith('video/')
|
||||
);
|
||||
@@ -433,14 +431,6 @@
|
||||
originalOrigination = await ScreenOrientation.orientation();
|
||||
|
||||
player.addEventListener('fullscreen-change', async (event: FullscreenChangeEvent) => {
|
||||
// A bit of a hack to fix Android automatically
|
||||
// fullscreening when opening a video.
|
||||
if (initialFullscreen) {
|
||||
player.exitFullscreen();
|
||||
initialFullscreen = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.detail) {
|
||||
// Ensure bar color is black while in fullscreen
|
||||
await StatusBar.setBackgroundColor({ color: '#000000' });
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
import { pushState } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { StatusBar } from '@capacitor/status-bar';
|
||||
import he from 'he';
|
||||
import humanNumber from 'human-number';
|
||||
import type Peer from 'peerjs';
|
||||
import { get } from 'svelte/store';
|
||||
import type { Image } from './api/model';
|
||||
import { instanceStore, interfaceForceCase } from './store';
|
||||
import { getDynamicTheme } from './theme';
|
||||
|
||||
|
||||
export type TitleCase = 'uppercase' | 'lowercase' | 'sentence case' | 'title case' | null;
|
||||
@@ -291,11 +288,3 @@ export function ensureNoTrailingSlash(url: any): string {
|
||||
|
||||
return url.endsWith('/') ? url.slice(0, -1) : url;
|
||||
}
|
||||
|
||||
export async function setStatusBarColor() {
|
||||
if (Capacitor.getPlatform() === 'android') {
|
||||
await StatusBar.setBackgroundColor({
|
||||
color: (await getDynamicTheme())['--surface-container']
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import { StatusBar, Style } from '@capacitor/status-bar';
|
||||
import { NavigationBar } from '@hugotomazi/capacitor-navigation-bar';
|
||||
import ui from 'beercss';
|
||||
import { get } from 'svelte/store';
|
||||
import { darkModeStore, interfaceAmoledTheme } from './store';
|
||||
@@ -15,6 +18,26 @@ export async function getDynamicTheme(mode?: string): Promise<Record<string, str
|
||||
return themeVars;
|
||||
}
|
||||
|
||||
export async function setStatusBarColor() {
|
||||
if (Capacitor.getPlatform() === 'android') {
|
||||
const surfaceColor = (await getDynamicTheme())['--surface-container'];
|
||||
|
||||
await StatusBar.setBackgroundColor({
|
||||
color: surfaceColor
|
||||
});
|
||||
|
||||
await NavigationBar.setColor({
|
||||
color: surfaceColor,
|
||||
darkButtons: !get(darkModeStore)
|
||||
});
|
||||
|
||||
if (get(darkModeStore)) {
|
||||
await StatusBar.setStyle({ style: Style.Dark });
|
||||
} else {
|
||||
await StatusBar.setStyle({ style: Style.Light });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function setAmoledTheme() {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
import { bookmarkletLoadFromUrl, loadSettingsFromEnv } from '$lib/externalSettings';
|
||||
import Logo from '$lib/Logo.svelte';
|
||||
import MiniPlayer from '$lib/MiniPlayer.svelte';
|
||||
import { setStatusBarColor } from '$lib/misc';
|
||||
import PageLoading from '$lib/PageLoading.svelte';
|
||||
import Search from '$lib/Search.svelte';
|
||||
import Settings from '$lib/Settings.svelte';
|
||||
@@ -23,7 +22,7 @@
|
||||
themeColorStore
|
||||
} from '$lib/store';
|
||||
import SyncParty from '$lib/SyncParty.svelte';
|
||||
import { setAmoledTheme, setTheme } from '$lib/theme';
|
||||
import { setAmoledTheme, setStatusBarColor, setTheme } from '$lib/theme';
|
||||
import Thumbnail from '$lib/Thumbnail.svelte';
|
||||
import { App } from '@capacitor/app';
|
||||
import { Browser } from '@capacitor/browser';
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import json
|
||||
import os
|
||||
import re
|
||||
|
||||
LATEST_VERSION = "1.6.28"
|
||||
LATEST_VERSION = "1.6.29"
|
||||
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
|
||||
|
||||
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")
|
||||
|
||||
Reference in New Issue
Block a user