More progress towards building
@@ -0,0 +1,61 @@
|
||||
name: Build Android
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build APK
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup java
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '17'
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 19.x
|
||||
|
||||
- name: Install app dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Build Svelte app
|
||||
run: npm run build
|
||||
|
||||
- name: Capacitor update
|
||||
run: npx cap update
|
||||
|
||||
- name: Capacitor copy
|
||||
run: npx cap copy
|
||||
|
||||
- name: Build app bundle
|
||||
run: cd android && ./gradlew bundle
|
||||
|
||||
- name: Extract Android signing key from env
|
||||
run: |
|
||||
echo "${{ secrets.RELEASE_KEYSTORE }}" > android/release.jks.base64
|
||||
base64 -d android/release.jks.base64 > android/release.decrypted.jks
|
||||
|
||||
- name: Sign dev build
|
||||
run: jarsigner -keystore android/release.decrypted.jks -storepass "${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" -signedjar ./android/app/build/outputs/bundle/release/app-release-signed.aab ./android/app/build/outputs/bundle/release/app-release.aab release
|
||||
|
||||
- name: Upload release bundle
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: app-release
|
||||
path: android/app/build/outputs/bundle/release/app-release-signed.aab
|
||||
- name: Upload binaries to release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: android/app/build/outputs/bundle/release/*
|
||||
overwrite: true
|
||||
file_glob: true
|
||||
@@ -0,0 +1,27 @@
|
||||
name: Build Desktop
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Build/release Electron app
|
||||
uses: samuelmeuli/action-electron-builder@v1
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
|
||||
package_root: "./materialious"
|
||||
|
||||
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
@@ -12,4 +12,6 @@ yarn.lock
|
||||
.env.*
|
||||
!.env.example
|
||||
vite.config.js.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
vite.config.ts.timestamp-*
|
||||
resources/android/**/*
|
||||
android/release.jks*
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@@ -8,7 +7,6 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||
android:name=".MainActivity"
|
||||
@@ -16,7 +14,6 @@
|
||||
android:theme="@style/AppTheme.NoActionBarLaunch"
|
||||
android:launchMode="singleTask"
|
||||
android:exported="true">
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
@@ -28,7 +25,6 @@
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="materialious-auth" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
@@ -36,9 +32,7 @@
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths"></meta-data>
|
||||
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 139 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 9.6 KiB |
@@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<background>
|
||||
<inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />
|
||||
</background>
|
||||
<foreground>
|
||||
<inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
|
||||
</foreground>
|
||||
</adaptive-icon>
|
||||
@@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<background>
|
||||
<inset android:drawable="@mipmap/ic_launcher_background" android:inset="16.7%" />
|
||||
</background>
|
||||
<foreground>
|
||||
<inset android:drawable="@mipmap/ic_launcher_foreground" android:inset="16.7%" />
|
||||
</foreground>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 531 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 997 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 350 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
@@ -12,6 +12,7 @@
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/assets": "^3.0.5",
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/adapter-static": "^3.0.1",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 49 KiB |
@@ -1,21 +1,20 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="%sveltekit.assets%/style.css" />
|
||||
<meta name="description" content="Modern material design for Invidious." />
|
||||
<meta
|
||||
name="keywords"
|
||||
content="invidious,materialious,proxy,youtube,yt,theme,interface,modern"
|
||||
/>
|
||||
<meta name="theme-color" content="#141316" />
|
||||
<title>Materialious</title>
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
|
||||
<body data-sveltekit-preload-data="hover" style="background-color: #141316">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
</html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/icon-only.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" href="%sveltekit.assets%/style.css" />
|
||||
<meta name="description" content="Modern material design for Invidious." />
|
||||
<meta name="keywords" content="invidious,materialious,proxy,youtube,yt,theme,interface,modern" />
|
||||
<meta name="theme-color" content="#141316" />
|
||||
<title>Materialious</title>
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
|
||||
<body data-sveltekit-preload-data="hover" style="background-color: #141316">
|
||||
<div style="display: contents">%sveltekit.body%</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,10 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import { peerJsOptions, removeWindowQueryFlag, setWindowQueryFlag } from '$lib/misc';
|
||||
import { peerJs, removeWindowQueryFlag, setWindowQueryFlag } from '$lib/misc';
|
||||
import type { PlayerEvents } from '$lib/player';
|
||||
import type { DataConnection } from 'peerjs';
|
||||
import Peer from 'peerjs';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
import { _ } from 'svelte-i18n';
|
||||
import { get } from 'svelte/store';
|
||||
@@ -34,7 +33,7 @@
|
||||
|
||||
const peerId = crypto.randomUUID();
|
||||
setWindowQueryFlag('sync', peerId);
|
||||
$syncPartyPeerStore = new Peer(peerId, peerJsOptions());
|
||||
$syncPartyPeerStore = peerJs(peerId);
|
||||
|
||||
if ($syncPartyPeerStore) {
|
||||
$syncPartyPeerStore.on('connection', (conn) => {
|
||||
@@ -69,7 +68,7 @@
|
||||
const currentUrl = get(page).url;
|
||||
const syncId = currentUrl.searchParams.get('sync');
|
||||
if (syncId) {
|
||||
$syncPartyPeerStore = new Peer(crypto.randomUUID(), peerJsOptions());
|
||||
$syncPartyPeerStore = peerJs(crypto.randomUUID());
|
||||
$syncPartyPeerStore.on('open', () => {
|
||||
if (!$syncPartyPeerStore) return;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { pushState } from '$app/navigation';
|
||||
import { page } from '$app/stores';
|
||||
import humanNumber from 'human-number';
|
||||
import type { PeerOptions } from 'peerjs';
|
||||
import { Peer } from 'peerjs';
|
||||
import { get } from 'svelte/store';
|
||||
import { instanceStore } from '../store';
|
||||
import type { Image } from './Api/model';
|
||||
@@ -128,12 +128,15 @@ export function removeWindowQueryFlag(key: string) {
|
||||
pushState(currentPage.url, currentPage.state);
|
||||
}
|
||||
|
||||
export function peerJsOptions(): PeerOptions {
|
||||
return {
|
||||
host: import.meta.env.VITE_DEFAULT_PEERJS_HOST && import.meta.env.VITE_DEFAULT_PEERJS_HOST !== '' ? import.meta.env.VITE_DEFAULT_PEERJS_HOST : '0.peerjs.com',
|
||||
path: import.meta.env.VITE_DEFAULT_PEERJS_PATH && import.meta.env.VITE_DEFAULT_PEERJS_PATH !== '' ? import.meta.env.VITE_DEFAULT_PEERJS_PATH : '/',
|
||||
port: import.meta.env.VITE_DEFAULT_PEERJS_PATH && import.meta.env.VITE_DEFAULT_PEERJS_PATH !== '' ? Number(import.meta.env.VITE_DEFAULT_PEERJS_PORT) : 443
|
||||
};
|
||||
export function peerJs(peerId: string): Peer {
|
||||
return new Peer(
|
||||
peerId,
|
||||
{
|
||||
host: import.meta.env.VITE_DEFAULT_PEERJS_HOST || '0.peerjs.com',
|
||||
path: import.meta.env.VITE_DEFAULT_PEERJS_PATH || '/',
|
||||
port: import.meta.env.VITE_DEFAULT_PEERJS_PORT || 443
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export function getBestThumbnail(
|
||||
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 49 KiB |