diff --git a/android/.idea/.gitignore b/android/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/android/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/android/.idea/compiler.xml b/android/.idea/compiler.xml new file mode 100644 index 00000000..b86273d9 --- /dev/null +++ b/android/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/android/.idea/deploymentTargetSelector.xml b/android/.idea/deploymentTargetSelector.xml new file mode 100644 index 00000000..b268ef36 --- /dev/null +++ b/android/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/android/.idea/migrations.xml b/android/.idea/migrations.xml new file mode 100644 index 00000000..f8051a6f --- /dev/null +++ b/android/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/android/.idea/misc.xml b/android/.idea/misc.xml new file mode 100644 index 00000000..b2c751a3 --- /dev/null +++ b/android/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/android/.idea/runConfigurations.xml b/android/.idea/runConfigurations.xml new file mode 100644 index 00000000..931b96c3 --- /dev/null +++ b/android/.idea/runConfigurations.xml @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index d2ca0a7b..564f6c30 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,6 +1,7 @@ apply plugin: 'com.android.application' android { + namespace "seedit.android" compileSdkVersion rootProject.ext.compileSdkVersion defaultConfig { applicationId "seedit.android" @@ -24,6 +25,9 @@ android { } repositories { + google() + mavenCentral() + maven { url "https://maven.google.com" } flatDir{ dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs' } @@ -33,10 +37,11 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" implementation project(':capacitor-android') + implementation project(':capacitor-cordova-android-plugins') testImplementation "junit:junit:$junitVersion" androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" - implementation project(':capacitor-cordova-android-plugins') + implementation "org.apache.cordova:framework:$cordovaAndroidVersion" } apply from: 'capacitor.build.gradle' diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index 0929acbc..151fee42 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -2,8 +2,8 @@ android { compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 755f6149..fd7168b4 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,5 @@ - - + + android:launchMode="singleTask" + android:exported="true"> diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index dacd4148..8ceced6f 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -2,5 +2,10 @@ "appId": "seedit.android", "appName": "seedit", "webDir": "build", - "bundledWebRuntime": false + "bundledWebRuntime": false, + "plugins": { + "CapacitorHttp": { + "enabled": true + } + } } diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index 64e754b9..04fe5a28 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png index cb2a0694..cda04258 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png index 64e754b9..04fe5a28 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 3b47c824..63956218 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png index d5c0b9e7..91665dab 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png index 3b47c824..63956218 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index dbbfe93b..dee31d71 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png index 48c1e5b7..83d15622 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png index dbbfe93b..dee31d71 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index f5e3b544..8f0fe2bc 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png index ac724897..d358b975 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png index f5e3b544..8f0fe2bc 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d13255d..6f8e0053 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png index 660f4931..0393de52 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png index 4d13255d..6f8e0053 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/android/build.gradle b/android/build.gradle index ad085c34..10c52591 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,10 +4,10 @@ buildscript { repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.2.1' + classpath 'com.android.tools.build:gradle:7.4.2' classpath 'com.google.gms:google-services:4.3.5' // NOTE: Do not place your application dependencies here; they belong @@ -20,7 +20,7 @@ apply from: "variables.gradle" allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar index e708b1c0..2c352119 100644 Binary files a/android/gradle/wrapper/gradle-wrapper.jar and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 3c4101c3..09523c0e 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/gradlew b/android/gradlew index 4f906e0c..f5feea6d 100755 --- a/android/gradlew +++ b/android/gradlew @@ -1,7 +1,7 @@ -#!/usr/bin/env sh +#!/bin/sh # -# Copyright 2015 the original author or authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,69 +15,104 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -87,9 +122,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -98,88 +133,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. # For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=`expr $i + 1` + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat index ac1b06f9..9b42019c 100644 --- a/android/gradlew.bat +++ b/android/gradlew.bat @@ -13,8 +13,10 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +27,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,13 +43,13 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -56,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 goto fail @@ -75,13 +78,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/android/icons/icon-foreground.png b/android/icons/icon-foreground.png index d99368ff..6b39f8f2 100644 Binary files a/android/icons/icon-foreground.png and b/android/icons/icon-foreground.png differ diff --git a/android/icons/icon.png b/android/icons/icon.png index fdf789be..7bfcd937 100644 Binary files a/android/icons/icon.png and b/android/icons/icon.png differ diff --git a/android/variables.gradle b/android/variables.gradle index 967549c5..22e638b3 100644 --- a/android/variables.gradle +++ b/android/variables.gradle @@ -1,7 +1,7 @@ ext { - minSdkVersion = 21 - compileSdkVersion = 30 - targetSdkVersion = 30 + minSdkVersion = 22 + compileSdkVersion = 33 + targetSdkVersion = 33 androidxActivityVersion = '1.2.0' androidxAppCompatVersion = '1.2.0' androidxCoordinatorLayoutVersion = '1.1.0' @@ -10,5 +10,5 @@ ext { junitVersion = '4.13.1' androidxJunitVersion = '1.1.2' androidxEspressoCoreVersion = '3.3.0' - cordovaAndroidVersion = '7.0.0' -} \ No newline at end of file + cordovaAndroidVersion = '10.1.1' +} diff --git a/capacitor.config.ts b/capacitor.config.ts index 095f3310..ae326b41 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -4,7 +4,12 @@ const config: CapacitorConfig = { appId: 'seedit.android', appName: 'seedit', webDir: 'build', - bundledWebRuntime: false + bundledWebRuntime: false, + plugins: { + "CapacitorHttp": { + "enabled": true + }, + }, }; -export default config; +export default config; \ No newline at end of file diff --git a/package.json b/package.json index dfe99605..98a0f967 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "license": "GPL-2.0-only", "private": true, "dependencies": { - "@capacitor/app": "1.1.1", - "@capacitor/device": "^6.0.1", + "@capacitor/app": "6.0.1", "@floating-ui/react": "0.26.1", "@plebbit/plebbit-react-hooks": "https://github.com/plebbit/plebbit-react-hooks.git#e5b30dcd62f1f355bc3ce52555e7f71ea4cae06b", "@testing-library/jest-dom": "5.14.1", @@ -84,9 +83,9 @@ ] }, "devDependencies": { - "@capacitor/android": "3.6.0", - "@capacitor/cli": "3.6.0", - "@capacitor/core": "3.6.0", + "@capacitor/android": "5.0.0", + "@capacitor/cli": "5.0.0", + "@capacitor/core": "5.0.0", "@electron/rebuild": "3.6.0", "@types/memoizee": "0.4.9", "concurrently": "8.0.1", diff --git a/public/translations/ar/default.json b/public/translations/ar/default.json index f8108853..61418c8f 100644 --- a/public/translations/ar/default.json +++ b/public/translations/ar/default.json @@ -313,5 +313,6 @@ "profile_info": "تم إنشاء حسابك u/{{shortAddress}}. انتقل إلى <1>التفضيلات لتصدير حسابك، وتعيين اسم عرض، والمزيد.", "show_all_instead": "عرض المشاركات منذ {{timeFilterName}} ، <1>عرض الكل بدلاً من ذلك", "subplebbit_offline_info": "قد يكون الرد على الرسائل غير متاح حالياً وقد تفشل النشر.", - "posts_last_synced_info": "آخر تزامن الرسائل {{time}}، قد يكون الرد على الرسائل غير متاح حالياً وقد تفشل النشر." + "posts_last_synced_info": "آخر تزامن الرسائل {{time}}، قد يكون الرد على الرسائل غير متاح حالياً وقد تفشل النشر.", + "stored_locally": "مخزنة محليًا ({{location}})، ليست متزامنة عبر الأجهزة" } \ No newline at end of file diff --git a/public/translations/bn/default.json b/public/translations/bn/default.json index cd2c4444..fb367b21 100644 --- a/public/translations/bn/default.json +++ b/public/translations/bn/default.json @@ -313,5 +313,6 @@ "profile_info": "আপনার অ্যাকাউন্ট u/{{shortAddress}} তৈরি হয়েছে। আপনার অ্যাকাউন্ট রপ্তানি করতে, একটি প্রদর্শন নাম সেট করতে, এবং আরও কিছু করার জন্য <1>পছন্দসমূহ এ যান।", "show_all_instead": "আপনি {{timeFilterName}} থেকে পোস্টগুলি দেখছেন, <1>তার পরিবর্তে সব দেখান", "subplebbit_offline_info": "সাবপ্লেবিট অফলাইন হতে পারে এবং প্রকাশনা ব্যর্থ হতে পারে।", - "posts_last_synced_info": "পোস্টগুলি সর্বশেষ সিঙ্ক হয়েছে {{time}}, সাবপ্লেবিট অফলাইন হতে পারে এবং প্রকাশনা ব্যর্থ হতে পারে।" + "posts_last_synced_info": "পোস্টগুলি সর্বশেষ সিঙ্ক হয়েছে {{time}}, সাবপ্লেবিট অফলাইন হতে পারে এবং প্রকাশনা ব্যর্থ হতে পারে।", + "stored_locally": "স্থানীয়ভাবে সংরক্ষিত ({{location}}), ডিভাইসের মধ্যে সিঙ্ক করা হয়নি" } \ No newline at end of file diff --git a/public/translations/cs/default.json b/public/translations/cs/default.json index 29024eaa..77922c57 100644 --- a/public/translations/cs/default.json +++ b/public/translations/cs/default.json @@ -313,5 +313,6 @@ "profile_info": "Váš účet u/{{shortAddress}} byl vytvořen. Přejděte na <1>nastavení, abyste exportovali svůj účet, nastavili zobrazené jméno a další.", "show_all_instead": "Zobrazujeme příspěvky od {{timeFilterName}}, <1>zobrazit vše místo toho", "subplebbit_offline_info": "Subplebbit může být offline a zveřejnění může selhat.", - "posts_last_synced_info": "Poslední synchronizace příspěvků {{time}}, subplebbit může být offline a zveřejňování může selhat." + "posts_last_synced_info": "Poslední synchronizace příspěvků {{time}}, subplebbit může být offline a zveřejňování může selhat.", + "stored_locally": "Uloženo lokálně ({{location}}), není synchronizováno mezi zařízeními" } \ No newline at end of file diff --git a/public/translations/da/default.json b/public/translations/da/default.json index 22d84e2f..bf3bd4e2 100644 --- a/public/translations/da/default.json +++ b/public/translations/da/default.json @@ -313,5 +313,6 @@ "profile_info": "Din konto u/{{shortAddress}} er oprettet. Gå til <1>indstillinger for at eksportere din konto, indstille et visningsnavn og mere.", "show_all_instead": "Viser indlæg siden {{timeFilterName}}, <1>vis alle i stedet", "subplebbit_offline_info": "Subplebbiten kan være offline, og offentliggørelse kan mislykkes.", - "posts_last_synced_info": "Seneste synkroniserede indlæg {{time}}, subplebbiten kan være offline, og offentliggørelse kan mislykkes." + "posts_last_synced_info": "Seneste synkroniserede indlæg {{time}}, subplebbiten kan være offline, og offentliggørelse kan mislykkes.", + "stored_locally": "Lager lokalt ({{location}}), ikke synkroniseret på tværs af enheder" } \ No newline at end of file diff --git a/public/translations/de/default.json b/public/translations/de/default.json index 4cb19b83..941d7f7e 100644 --- a/public/translations/de/default.json +++ b/public/translations/de/default.json @@ -313,5 +313,6 @@ "profile_info": "Ihr Konto u/{{shortAddress}} wurde erstellt. Gehen Sie zu <1>Präferenzen, um Ihr Konto zu exportieren, einen Anzeigenamen festzulegen und mehr.", "show_all_instead": "Zeigt Beiträge seit {{timeFilterName}}, <1>stattdessen alles anzeigen", "subplebbit_offline_info": "Der Subplebbit könnte offline sein und das Veröffentlichen könnte fehlschlagen.", - "posts_last_synced_info": "Beiträge zuletzt synchronisiert {{time}}, der Subplebbit könnte offline sein und das Veröffentlichen könnte fehlschlagen." + "posts_last_synced_info": "Beiträge zuletzt synchronisiert {{time}}, der Subplebbit könnte offline sein und das Veröffentlichen könnte fehlschlagen.", + "stored_locally": "Lokal gespeichert ({{location}}), nicht geräteübergreifend synchronisiert" } \ No newline at end of file diff --git a/public/translations/el/default.json b/public/translations/el/default.json index 3e0b8f10..1a4fcc88 100644 --- a/public/translations/el/default.json +++ b/public/translations/el/default.json @@ -313,5 +313,6 @@ "profile_info": "Ο λογαριασμός σας u/{{shortAddress}} έχει δημιουργηθεί. Μεταβείτε στις <1>προτιμήσεις για να εξάγετε τον λογαριασμό σας, να ορίσετε ένα εμφανιζόμενο όνομα και άλλα.", "show_all_instead": "Εμφανίζονται αναρτήσεις από {{timeFilterName}}, <1>εμφάνιση όλων αντί αυτού", "subplebbit_offline_info": "Το subplebbit ενδέχεται να είναι εκτός σύνδεσης και η δημοσίευση μπορεί να αποτύχει.", - "posts_last_synced_info": "Τελευταία συγχρονισμένες αναρτήσεις {{time}}, το subplebbit ενδέχεται να είναι εκτός σύνδεσης και η δημοσίευση μπορεί να αποτύχει." + "posts_last_synced_info": "Τελευταία συγχρονισμένες αναρτήσεις {{time}}, το subplebbit ενδέχεται να είναι εκτός σύνδεσης και η δημοσίευση μπορεί να αποτύχει.", + "stored_locally": "Αποθηκευμένο τοπικά ({{location}}), δεν συγχρονίζεται σε όλες τις συσκευές" } \ No newline at end of file diff --git a/public/translations/en/default.json b/public/translations/en/default.json index cb43a47a..31808564 100644 --- a/public/translations/en/default.json +++ b/public/translations/en/default.json @@ -313,5 +313,6 @@ "profile_info": "Your account u/{{shortAddress}} was created. Go to <1>preferences to export your account, set a display name, and more.", "show_all_instead": "Showing posts since {{timeFilterName}}, <1>show all instead", "subplebbit_offline_info": "The subplebbit might be offline and publishing might fail.", - "posts_last_synced_info": "Posts last synced {{time}}, the subplebbit might be offline and publishing might fail." + "posts_last_synced_info": "Posts last synced {{time}}, the subplebbit might be offline and publishing might fail.", + "stored_locally": "Stored locally ({{location}}), not synced across devices" } \ No newline at end of file diff --git a/public/translations/es/default.json b/public/translations/es/default.json index 965bf012..1a945e51 100644 --- a/public/translations/es/default.json +++ b/public/translations/es/default.json @@ -313,5 +313,6 @@ "profile_info": "Tu cuenta u/{{shortAddress}} fue creada. Ve a <1>preferencias para exportar tu cuenta, establecer un nombre de visualización y más.", "show_all_instead": "Mostrando publicaciones desde {{timeFilterName}}, <1>mostrar todo en su lugar", "subplebbit_offline_info": "El subplebbit podría estar fuera de línea y la publicación podría fallar.", - "posts_last_synced_info": "Últimas publicaciones sincronizadas {{time}}, el subplebbit podría estar fuera de línea y la publicación podría fallar." + "posts_last_synced_info": "Últimas publicaciones sincronizadas {{time}}, el subplebbit podría estar fuera de línea y la publicación podría fallar.", + "stored_locally": "Almacenado localmente ({{location}}), no sincronizado entre dispositivos" } \ No newline at end of file diff --git a/public/translations/fa/default.json b/public/translations/fa/default.json index 6ec82e55..d3595105 100644 --- a/public/translations/fa/default.json +++ b/public/translations/fa/default.json @@ -313,5 +313,6 @@ "profile_info": "حساب شما u/{{shortAddress}} ایجاد شد. به <1>تنظیمات بروید تا حساب خود را صادر کنید، نام نمایشی تنظیم کنید و موارد دیگر.", "show_all_instead": "نمایش پست‌ها از {{timeFilterName}}، <1>به‌جای آن همه را نشان بده", "subplebbit_offline_info": "زیرپلبیت ممکن است آفلاین باشد و انتشار ممکن است شکست خورده باشد.", - "posts_last_synced_info": "آخرین پست‌ها همگام‌سازی شده‌اند {{time}}، زیرپلبیت ممکن است آفلاین باشد و انتشار ممکن است شکست خورده باشد." + "posts_last_synced_info": "آخرین پست‌ها همگام‌سازی شده‌اند {{time}}، زیرپلبیت ممکن است آفلاین باشد و انتشار ممکن است شکست خورده باشد.", + "stored_locally": "محلی ذخیره شده ({{location}})، با دستگاه‌ها همگام‌سازی نشده است" } \ No newline at end of file diff --git a/public/translations/fi/default.json b/public/translations/fi/default.json index c67176b3..4d74f727 100644 --- a/public/translations/fi/default.json +++ b/public/translations/fi/default.json @@ -313,5 +313,6 @@ "profile_info": "Tilisi u/{{shortAddress}} on luotu. Siirry kohtaan <1>asetukset viedäksesi tilisi, asettaaksesi näyttönimen ja muuta.", "show_all_instead": "Näytetään viestejä ajasta {{timeFilterName}}, <1>näytä kaikki sen sijaan", "subplebbit_offline_info": "Subplebbit voi olla offline-tilassa, ja julkaisu voi epäonnistua.", - "posts_last_synced_info": "Viimeksi synkronoidut viestit {{time}}, subplebbit voi olla offline-tilassa, ja julkaisu voi epäonnistua." + "posts_last_synced_info": "Viimeksi synkronoidut viestit {{time}}, subplebbit voi olla offline-tilassa, ja julkaisu voi epäonnistua.", + "stored_locally": "Tallennettu paikallisesti ({{location}}), ei synkronoitu laitteiden välillä" } \ No newline at end of file diff --git a/public/translations/fil/default.json b/public/translations/fil/default.json index 53088baa..a0b97df2 100644 --- a/public/translations/fil/default.json +++ b/public/translations/fil/default.json @@ -313,5 +313,6 @@ "profile_info": "Ang iyong account na u/{{shortAddress}} ay nalikha na. Pumunta sa <1>mga kagustuhan upang i-export ang iyong account, mag-set ng display name, at higit pa.", "show_all_instead": "Ipinapakita ang mga post mula {{timeFilterName}}, <1>ipakita ang lahat sa halip", "subplebbit_offline_info": "Maaaring offline ang subplebbit at maaaring mabigo ang paglalathala.", - "posts_last_synced_info": "Huling naka-sync na mga post {{time}}, maaaring offline ang subplebbit at maaaring mabigo ang paglalathala." + "posts_last_synced_info": "Huling naka-sync na mga post {{time}}, maaaring offline ang subplebbit at maaaring mabigo ang paglalathala.", + "stored_locally": "Nakaimbak nang lokal ({{location}}), hindi naka-sync sa iba pang device" } \ No newline at end of file diff --git a/public/translations/fr/default.json b/public/translations/fr/default.json index a707b8b4..c245f831 100644 --- a/public/translations/fr/default.json +++ b/public/translations/fr/default.json @@ -313,5 +313,6 @@ "profile_info": "Votre compte u/{{shortAddress}} a été créé. Allez dans <1>préférences pour exporter votre compte, définir un nom d'affichage, et plus encore.", "show_all_instead": "Affichage des publications depuis {{timeFilterName}}, <1>afficher tout à la place", "subplebbit_offline_info": "Le subplebbit pourrait être hors ligne et la publication pourrait échouer.", - "posts_last_synced_info": "Dernières publications synchronisées {{time}}, le subplebbit pourrait être hors ligne et la publication pourrait échouer." + "posts_last_synced_info": "Dernières publications synchronisées {{time}}, le subplebbit pourrait être hors ligne et la publication pourrait échouer.", + "stored_locally": "Stocké localement ({{location}}), non synchronisé entre les appareils" } \ No newline at end of file diff --git a/public/translations/he/default.json b/public/translations/he/default.json index 534b573f..5c8b88f3 100644 --- a/public/translations/he/default.json +++ b/public/translations/he/default.json @@ -313,5 +313,6 @@ "profile_info": "החשבון שלך u/{{shortAddress}} נוצר. עבור אל <1>העדפות כדי לייצא את החשבון שלך, להגדיר שם תצוגה ועוד.", "show_all_instead": "מראה פוסטים מאז {{timeFilterName}}, <1>הצג הכל במקום זאת", "subplebbit_offline_info": "הסאבפלביט עשוי להיות לא מקוון והפרסום עשוי להכשל.", - "posts_last_synced_info": "הפוסטים סונכרנו לאחרונה {{time}}, הסאבפלביט עשוי להיות לא מקוון והפרסום עשוי להכשל." + "posts_last_synced_info": "הפוסטים סונכרנו לאחרונה {{time}}, הסאבפלביט עשוי להיות לא מקוון והפרסום עשוי להכשל.", + "stored_locally": "מאוחסן מקומית ({{location}}), לא מסונכרן בין מכשירים" } \ No newline at end of file diff --git a/public/translations/hi/default.json b/public/translations/hi/default.json index a39bef35..56f10461 100644 --- a/public/translations/hi/default.json +++ b/public/translations/hi/default.json @@ -313,5 +313,6 @@ "profile_info": "आपका खाता u/{{shortAddress}} बनाया गया था। अपने खाते को निर्यात करने, एक प्रदर्शन नाम सेट करने और अन्य के लिए <1>प्राथमिकताएँ पर जाएँ।", "show_all_instead": "आप {{timeFilterName}} से पोस्ट देख रहे हैं, <1>इसके बजाय सभी दिखाएं", "subplebbit_offline_info": "सबप्लेबिट ऑफलाइन हो सकता है और प्रकाशन विफल हो सकता है।", - "posts_last_synced_info": "आखिरी बार सिंक की गई पोस्ट {{time}}, सबप्लेबिट ऑफलाइन हो सकता है और प्रकाशन विफल हो सकता है।" + "posts_last_synced_info": "आखिरी बार सिंक की गई पोस्ट {{time}}, सबप्लेबिट ऑफलाइन हो सकता है और प्रकाशन विफल हो सकता है।", + "stored_locally": "स्थानीय रूप से संग्रहीत ({{location}}), उपकरणों के बीच समन्वयित नहीं" } \ No newline at end of file diff --git a/public/translations/hu/default.json b/public/translations/hu/default.json index aeabf172..f3b30f67 100644 --- a/public/translations/hu/default.json +++ b/public/translations/hu/default.json @@ -313,5 +313,6 @@ "profile_info": "A fiókod u/{{shortAddress}} létrejött. Menj a <1>beállítások menübe, hogy exportáld a fiókodat, beállíts egy megjelenítési nevet és még többet.", "show_all_instead": "A {{timeFilterName}} óta látható bejegyzések, <1>helyette mindent mutass", "subplebbit_offline_info": "A subplebbit offline lehet, és a közzététel sikertelen lehet.", - "posts_last_synced_info": "Legutóbb szinkronizált bejegyzések {{time}}, a subplebbit offline lehet, és a közzététel sikertelen lehet." + "posts_last_synced_info": "Legutóbb szinkronizált bejegyzések {{time}}, a subplebbit offline lehet, és a közzététel sikertelen lehet.", + "stored_locally": "Helyben tárolva ({{location}}), nem szinkronizálva eszközök között" } \ No newline at end of file diff --git a/public/translations/id/default.json b/public/translations/id/default.json index 8866310d..6069829c 100644 --- a/public/translations/id/default.json +++ b/public/translations/id/default.json @@ -313,5 +313,6 @@ "profile_info": "Akun Anda u/{{shortAddress}} telah dibuat. Pergi ke <1>pengaturan untuk mengekspor akun Anda, mengatur nama tampilan, dan lainnya.", "show_all_instead": "Menampilkan pos sejak {{timeFilterName}}, <1>tampilkan semua sebagai gantinya", "subplebbit_offline_info": "Subplebbit mungkin offline dan penerbitan mungkin gagal.", - "posts_last_synced_info": "Posting terakhir disinkronkan {{time}}, subplebbit mungkin offline dan penerbitan mungkin gagal." + "posts_last_synced_info": "Posting terakhir disinkronkan {{time}}, subplebbit mungkin offline dan penerbitan mungkin gagal.", + "stored_locally": "Disimpan secara lokal ({{location}}), tidak disinkronkan antar perangkat" } \ No newline at end of file diff --git a/public/translations/it/default.json b/public/translations/it/default.json index 571a1a7a..7a04bd27 100644 --- a/public/translations/it/default.json +++ b/public/translations/it/default.json @@ -313,5 +313,6 @@ "profile_info": "Il tuo account u/{{shortAddress}} è stato creato. Vai su <1>preferenze per esportare il tuo account, scegliere un nome utente e altro.", "show_all_instead": "Stai visualizzando post da {{timeFilterName}}, <1>visualizza tutto invece", "subplebbit_offline_info": "Il subplebbit potrebbe essere offline e la pubblicazione potrebbe fallire.", - "posts_last_synced_info": "Ultimi post sincronizzati {{time}}, il subplebbit potrebbe essere offline e la pubblicazione potrebbe fallire." + "posts_last_synced_info": "Ultimi post sincronizzati {{time}}, il subplebbit potrebbe essere offline e la pubblicazione potrebbe fallire.", + "stored_locally": "Memorizzato localmente ({{location}}), non sincronizzato tra i dispositivi" } \ No newline at end of file diff --git a/public/translations/ja/default.json b/public/translations/ja/default.json index 3d0dd648..0c89e637 100644 --- a/public/translations/ja/default.json +++ b/public/translations/ja/default.json @@ -313,5 +313,6 @@ "profile_info": "あなたのアカウントu/{{shortAddress}}が作成されました。アカウントをエクスポートし、表示名を設定するには、<1>設定に移動してください。", "show_all_instead": "{{timeFilterName}} からの投稿を表示しています。<1>その代わりにすべて表示", "subplebbit_offline_info": "サブプレビットがオフラインになっている可能性があり、公開が失敗することがあります。", - "posts_last_synced_info": "最後に同期された投稿 {{time}}, サブプレビットがオフラインになっている可能性があり、公開が失敗することがあります。" + "posts_last_synced_info": "最後に同期された投稿 {{time}}, サブプレビットがオフラインになっている可能性があり、公開が失敗することがあります。", + "stored_locally": "ローカルに保存されています ({{location}})、デバイス間で同期されていません" } \ No newline at end of file diff --git a/public/translations/ko/default.json b/public/translations/ko/default.json index e5b56fca..d2a81bec 100644 --- a/public/translations/ko/default.json +++ b/public/translations/ko/default.json @@ -313,5 +313,6 @@ "profile_info": "귀하의 계정 u/{{shortAddress}}가 생성되었습니다. 계정을 내보내고 표시 이름을 설정하려면 <1>환경설정으로 이동하십시오.", "show_all_instead": "{{timeFilterName}} 이후의 게시물이 표시됩니다. <1>대신 모두 표시", "subplebbit_offline_info": "서브플레빗이 오프라인 일 수 있으며 게시가 실패할 수 있습니다.", - "posts_last_synced_info": "최근 동기화된 게시물 {{time}}, 서브플레빗이 오프라인 일 수 있으며 게시가 실패할 수 있습니다." + "posts_last_synced_info": "최근 동기화된 게시물 {{time}}, 서브플레빗이 오프라인 일 수 있으며 게시가 실패할 수 있습니다.", + "stored_locally": "로컬에 저장됨 ({{location}}), 장치 간에 동기화되지 않음" } \ No newline at end of file diff --git a/public/translations/mr/default.json b/public/translations/mr/default.json index dbc0a7c9..a898b261 100644 --- a/public/translations/mr/default.json +++ b/public/translations/mr/default.json @@ -313,5 +313,6 @@ "profile_info": "तुमचा खाता u/{{shortAddress}} तयार करण्यात आला आहे. तुमचा खाता निर्यात करण्यासाठी, एक प्रदर्शन नाव सेट करण्यासाठी आणि अधिकसाठी <1>प्राधान्ये येथे जा.", "show_all_instead": "{{timeFilterName}} पासून पोस्ट दर्शवित आहेत, <1>त्याऐवजी सर्व दाखवा", "subplebbit_offline_info": "सबप्लेबिट मोबाइल असून प्रकाशन अयशस्वी होऊ शकतो.", - "posts_last_synced_info": "शेवटच्या बारीस सिन्क केलेले पोस्ट {{time}}, सबप्लेबिट मोबाइल असून प्रकाशन अयशस्वी होऊ शकतो." + "posts_last_synced_info": "शेवटच्या बारीस सिन्क केलेले पोस्ट {{time}}, सबप्लेबिट मोबाइल असून प्रकाशन अयशस्वी होऊ शकतो.", + "stored_locally": "स्थानिकपणे संग्रहित ({{location}}), उपकरणांमध्ये समन्वयित केलेले नाही" } \ No newline at end of file diff --git a/public/translations/nl/default.json b/public/translations/nl/default.json index d9332079..33ddf8f7 100644 --- a/public/translations/nl/default.json +++ b/public/translations/nl/default.json @@ -313,5 +313,6 @@ "profile_info": "Uw account u/{{shortAddress}} is aangemaakt. Ga naar <1>voorkeuren om uw account te exporteren, een weergeven naam in te stellen en meer.", "show_all_instead": "Berichten sinds {{timeFilterName}}, <1>toon in plaats daarvan alles", "subplebbit_offline_info": "De subplebbit kan offline zijn en publiceren kan mislukken.", - "posts_last_synced_info": "Laatste keer gesynchroniseerde berichten {{time}}, de subplebbit kan offline zijn en publiceren kan mislukken." + "posts_last_synced_info": "Laatste keer gesynchroniseerde berichten {{time}}, de subplebbit kan offline zijn en publiceren kan mislukken.", + "stored_locally": "Lokaal opgeslagen ({{location}}), niet gesynchroniseerd tussen apparaten" } \ No newline at end of file diff --git a/public/translations/no/default.json b/public/translations/no/default.json index 59ae5486..8beb0ed8 100644 --- a/public/translations/no/default.json +++ b/public/translations/no/default.json @@ -313,5 +313,6 @@ "profile_info": "Kontoen din u/{{shortAddress}} ble opprettet. Gå til <1>innstillinger for å eksportere kontoen din, sette et visningsnavn og mer.", "show_all_instead": "Viser innlegg siden {{timeFilterName}}, <1>vis alt i stedet", "subplebbit_offline_info": "Subplebbiten kan være offline, og publisering kan mislykkes.", - "posts_last_synced_info": "Siste synkroniserte innlegg {{time}}, subplebbiten kan være offline, og publisering kan mislykkes." + "posts_last_synced_info": "Siste synkroniserte innlegg {{time}}, subplebbiten kan være offline, og publisering kan mislykkes.", + "stored_locally": "Lagring lokalt ({{location}}), ikke synkronisert på tvers av enheter" } \ No newline at end of file diff --git a/public/translations/pl/default.json b/public/translations/pl/default.json index 13bc95d3..86933fd4 100644 --- a/public/translations/pl/default.json +++ b/public/translations/pl/default.json @@ -313,5 +313,6 @@ "profile_info": "Twoje konto u/{{shortAddress}} zostało utworzone. Przejdź do <1>preferencji, aby wyeksportować swoje konto, ustawić nazwę wyświetlaną i nie tylko.", "show_all_instead": "Pokazuje posty od {{timeFilterName}}, <1>pokaż wszystko zamiast tego", "subplebbit_offline_info": "Subplebbit może być offline, a publikacja może się nie powieść.", - "posts_last_synced_info": "Ostatnio zsynchronizowane posty {{time}}, subplebbit może być offline, a publikacja może się nie powieść." + "posts_last_synced_info": "Ostatnio zsynchronizowane posty {{time}}, subplebbit może być offline, a publikacja może się nie powieść.", + "stored_locally": "Przechowywane lokalnie ({{location}}), nie synchronizowane między urządzeniami" } \ No newline at end of file diff --git a/public/translations/pt/default.json b/public/translations/pt/default.json index 25913635..e36c6ec5 100644 --- a/public/translations/pt/default.json +++ b/public/translations/pt/default.json @@ -313,5 +313,6 @@ "profile_info": "Sua conta u/{{shortAddress}} foi criada. Vá para <1>preferências para exportar sua conta, definir um nome de exibição e mais.", "show_all_instead": "Exibindo postagens desde {{timeFilterName}}, <1>mostrar tudo em vez disso", "subplebbit_offline_info": "O subplebbit pode estar offline e a publicação pode falhar.", - "posts_last_synced_info": "Posts sincronizados pela última vez {{time}}, o subplebbit pode estar offline e a publicação pode falhar." + "posts_last_synced_info": "Posts sincronizados pela última vez {{time}}, o subplebbit pode estar offline e a publicação pode falhar.", + "stored_locally": "Armazenado localmente ({{location}}), não sincronizado entre dispositivos" } \ No newline at end of file diff --git a/public/translations/ro/default.json b/public/translations/ro/default.json index 061f293f..703dbb4e 100644 --- a/public/translations/ro/default.json +++ b/public/translations/ro/default.json @@ -313,5 +313,6 @@ "profile_info": "Contul tău u/{{shortAddress}} a fost creat. Accesați <1>preferințe pentru a exporta contul tău, seta un nume de afișare și altele.", "show_all_instead": "Afișând postări din {{timeFilterName}}, <1>afișați totul în schimb", "subplebbit_offline_info": "Subplebbitul ar putea fi offline și publicarea ar putea eșua.", - "posts_last_synced_info": "Ultimele postări sincronizate {{time}}, subplebbitul ar putea fi offline și publicarea ar putea eșua." + "posts_last_synced_info": "Ultimele postări sincronizate {{time}}, subplebbitul ar putea fi offline și publicarea ar putea eșua.", + "stored_locally": "Stocat local ({{location}}), nu este sincronizat între dispozitive" } \ No newline at end of file diff --git a/public/translations/ru/default.json b/public/translations/ru/default.json index bfa2e7c2..400bea2e 100644 --- a/public/translations/ru/default.json +++ b/public/translations/ru/default.json @@ -313,5 +313,6 @@ "profile_info": "Ваш аккаунт u/{{shortAddress}} был создан. Перейдите в <1>настройки, чтобы экспортировать свою учетную запись, установить отображаемое имя и многое другое.", "show_all_instead": "Показаны записи с {{timeFilterName}}, <1>показать все вместо этого", "subplebbit_offline_info": "Сабплеббит может быть офлайн, и публикация может не удалиться.", - "posts_last_synced_info": "Последние синхронизированные сообщения {{time}}, сабплеббит может быть офлайн, и публикация может не удалиться." + "posts_last_synced_info": "Последние синхронизированные сообщения {{time}}, сабплеббит может быть офлайн, и публикация может не удалиться.", + "stored_locally": "Сохранено локально ({{location}}), не синхронизировано между устройствами" } \ No newline at end of file diff --git a/public/translations/sq/default.json b/public/translations/sq/default.json index 8eca3812..45e2471e 100644 --- a/public/translations/sq/default.json +++ b/public/translations/sq/default.json @@ -313,5 +313,6 @@ "profile_info": "Llogaria juaj u/{{shortAddress}} është krijuar. Shkoni te <1>preferencat për të eksportuar llogarinë tuaj, vendosur një emër shfaqje dhe më shumë.", "show_all_instead": "Duke treguar postimet që nga {{timeFilterName}}, <1>tregoni gjithçka në vend", "subplebbit_offline_info": "Subplebbiti mund të jetë jashtë linje dhe publikimi mund të dështojë.", - "posts_last_synced_info": "Postimet e fundit të sinkronizuara {{time}}, subplebbiti mund të jetë jashtë linje dhe publikimi mund të dështojë." + "posts_last_synced_info": "Postimet e fundit të sinkronizuara {{time}}, subplebbiti mund të jetë jashtë linje dhe publikimi mund të dështojë.", + "stored_locally": "Ruajtur lokalmente ({{location}}), nuk është sinkronizuar ndërmjet pajisjeve" } \ No newline at end of file diff --git a/public/translations/sv/default.json b/public/translations/sv/default.json index 326b2fd9..1f929053 100644 --- a/public/translations/sv/default.json +++ b/public/translations/sv/default.json @@ -313,5 +313,6 @@ "profile_info": "Ditt konto u/{{shortAddress}} har skapats. Gå till <1>inställningar för att exportera ditt konto, ställa in ett visningsnamn och mer.", "show_all_instead": "Visar inlägg sedan {{timeFilterName}}, <1>visa allt istället", "subplebbit_offline_info": "Subplebbit kan vara offline och publicering kan misslyckas.", - "posts_last_synced_info": "Inlägg senast synkroniserade {{time}}, subplebbit kan vara offline och publicering kan misslyckas." + "posts_last_synced_info": "Inlägg senast synkroniserade {{time}}, subplebbit kan vara offline och publicering kan misslyckas.", + "stored_locally": "Lagrad lokalt ({{location}}), inte synkroniserad mellan enheter" } \ No newline at end of file diff --git a/public/translations/te/default.json b/public/translations/te/default.json index c98dca64..2187ec89 100644 --- a/public/translations/te/default.json +++ b/public/translations/te/default.json @@ -313,5 +313,6 @@ "profile_info": "మీ ఖాతా u/{{shortAddress}} సృష్టించబడింది. మీ ఖాతాను ఎగుమతి చేయడానికి, ఒక ప్రదర్శన పేరును అమర్చడానికి మరియు మరింత కోసం <1>ప్రాధమికతలు కి వెళ్లండి.", "show_all_instead": "{{timeFilterName}} నుండి పోస్టులు చూపిస్తున్నాయి, <1>అదకు బదులు అన్నీ చూపించు", "subplebbit_offline_info": "సబ్ప్లెబిట్ ఆఫ్‌లైన్ ఉండవచ్చు మరియు ప్రచురణ విఫలమైనా ఉంటుంది.", - "posts_last_synced_info": "ఇటీవలే సింక్ చేసిన పోస్ట్లు {{time}}, సబ్‌ప్లెబిట్ ఆఫ్‌లైన్ ఉండవచ్చు, మరియు ప్రకటన విఫలమవుతుంది." + "posts_last_synced_info": "ఇటీవలే సింక్ చేసిన పోస్ట్లు {{time}}, సబ్‌ప్లెబిట్ ఆఫ్‌లైన్ ఉండవచ్చు, మరియు ప్రకటన విఫలమవుతుంది.", + "stored_locally": "స్థానికంగా నిల్వ ({{location}}), పరికరాల మధ్య సమన్వయించడం లేదు" } \ No newline at end of file diff --git a/public/translations/th/default.json b/public/translations/th/default.json index eea2ee2a..baf051b1 100644 --- a/public/translations/th/default.json +++ b/public/translations/th/default.json @@ -313,5 +313,6 @@ "profile_info": "บัญชีของคุณ u/{{shortAddress}} ถูกสร้างขึ้น ไปที่ <1>การตั้งค่า เพื่อส่งออกบัญชีของคุณ ตั้งชื่อแสดงผล และอื่น ๆ", "show_all_instead": "แสดงโพสต์ตั้งแต่ {{timeFilterName}} <1>แสดงทั้งหมดแทน", "subplebbit_offline_info": "เซ็บเพล็บบิทอาจออฟไลน์และการเผยแพร่อาจล้มเหลว", - "posts_last_synced_info": "โพสต์ล่าสุดที่ซิงค์ {{time}}, ซับเพลบบิทอาจออฟไลน์และการเผยแพร่อาจล้มเหลว" + "posts_last_synced_info": "โพสต์ล่าสุดที่ซิงค์ {{time}}, ซับเพลบบิทอาจออฟไลน์และการเผยแพร่อาจล้มเหลว", + "stored_locally": "จัดเก็บในเครื่อง ({{location}}) ไม่ได้ซิงค์ข้ามอุปกรณ์" } \ No newline at end of file diff --git a/public/translations/tr/default.json b/public/translations/tr/default.json index 9e7d9739..1585fd7d 100644 --- a/public/translations/tr/default.json +++ b/public/translations/tr/default.json @@ -313,5 +313,6 @@ "profile_info": "Hesabınız u/{{shortAddress}} oluşturuldu. Hesabınızı dışa aktarmak, bir görüntü adı ayarlamak ve daha fazlası için <1>tercihler e gidin.", "show_all_instead": "{{timeFilterName}} tarihinden itibaren gönderiler gösteriliyor, <1>bunun yerine hepsini göster", "subplebbit_offline_info": "Subplebbit çevrimdışı olabilir ve yayınlama başarısız olabilir.", - "posts_last_synced_info": "Son senkronize edilen gönderiler {{time}}, subplebbit çevrimdışı olabilir ve yayınlama başarısız olabilir." + "posts_last_synced_info": "Son senkronize edilen gönderiler {{time}}, subplebbit çevrimdışı olabilir ve yayınlama başarısız olabilir.", + "stored_locally": "Yerel olarak saklanıyor ({{location}}), cihazlar arasında senkronize edilmedi" } \ No newline at end of file diff --git a/public/translations/uk/default.json b/public/translations/uk/default.json index 07fba41b..e011ec21 100644 --- a/public/translations/uk/default.json +++ b/public/translations/uk/default.json @@ -313,5 +313,6 @@ "profile_info": "Ваш обліковий запис u/{{shortAddress}} був створений. Перейдіть до <1>налаштувань, щоб експортувати свій обліковий запис, встановити відображуване ім'я тощо.", "show_all_instead": "Показані пости з {{timeFilterName}}, <1>показати все замість цього", "subplebbit_offline_info": "Сабплебіт може бути офлайн, а публікація може не вдастися.", - "posts_last_synced_info": "Останні синхронізовані повідомлення {{time}}, сабплебіт може бути офлайн, а публікація може не вдастися." + "posts_last_synced_info": "Останні синхронізовані повідомлення {{time}}, сабплебіт може бути офлайн, а публікація може не вдастися.", + "stored_locally": "Збережено локально ({{location}}), не синхронізується між пристроями" } \ No newline at end of file diff --git a/public/translations/ur/default.json b/public/translations/ur/default.json index 7274e158..8e5490c1 100644 --- a/public/translations/ur/default.json +++ b/public/translations/ur/default.json @@ -313,5 +313,6 @@ "profile_info": "آپ کا اکاؤنٹ u/{{shortAddress}} بنایا گیا ہے۔ اپنے اکاؤنٹ کو برآمد کرنے، ایک ڈسپلے نام سیٹ کرنے اور مزید کے لیے <1>ترجیحات پر جائیں۔", "show_all_instead": "{{timeFilterName}} سے پوسٹ دکھا رہا ہے، <1>اس کے بجائے سب کچھ دکھائیں", "subplebbit_offline_info": "سب پلیبٹ آف لائن ہوسکتا ہے اور شائع ہونے میں ناکام ہوسکتا ہے۔", - "posts_last_synced_info": "آخری بار پوسٹ سنک کی گئی {{time}}, سب پلیبٹ آف لائن ہوسکتا ہے اور شائع ہونے میں ناکام ہوسکتا ہے۔" + "posts_last_synced_info": "آخری بار پوسٹ سنک کی گئی {{time}}, سب پلیبٹ آف لائن ہوسکتا ہے اور شائع ہونے میں ناکام ہوسکتا ہے۔", + "stored_locally": "مقامی طور پر محفوظ ({{location}})، آلات کے درمیان ہم وقت سازی نہیں کی گئی" } \ No newline at end of file diff --git a/public/translations/vi/default.json b/public/translations/vi/default.json index af155623..1a0db6da 100644 --- a/public/translations/vi/default.json +++ b/public/translations/vi/default.json @@ -313,5 +313,6 @@ "profile_info": "Tài khoản của bạn u/{{shortAddress}} đã được tạo. Đi đến <1>cài đặt để xuất tài khoản của bạn, đặt tên hiển thị và hơn thế nữa.", "show_all_instead": "Đang hiển thị bài viết từ {{timeFilterName}}, <1>hiển thị tất cả thay vào đó", "subplebbit_offline_info": "Subplebbit có thể ngoại tuyến và việc xuất bản có thể thất bại.", - "posts_last_synced_info": "Bài viết được đồng bộ lần cuối {{time}}, subplebbit có thể ngoại tuyến và việc xuất bản có thể thất bại." + "posts_last_synced_info": "Bài viết được đồng bộ lần cuối {{time}}, subplebbit có thể ngoại tuyến và việc xuất bản có thể thất bại.", + "stored_locally": "Lưu trữ cục bộ ({{location}}), không được đồng bộ qua các thiết bị" } \ No newline at end of file diff --git a/public/translations/zh/default.json b/public/translations/zh/default.json index abf7c48f..4ba74ccb 100644 --- a/public/translations/zh/default.json +++ b/public/translations/zh/default.json @@ -313,5 +313,6 @@ "profile_info": "您的账户 u/{{shortAddress}} 已创建。前往 <1>偏好设置 以导出您的账户、设置显示名称等。", "show_all_instead": "显示自 {{timeFilterName}} 以来的帖子,<1>显示所有帖子", "subplebbit_offline_info": "子维基可能离线,发布可能失败。", - "posts_last_synced_info": "最后同步的帖子 {{time}}, 子维基可能离线,发布可能失败。" + "posts_last_synced_info": "最后同步的帖子 {{time}}, 子维基可能离线,发布可能失败。", + "stored_locally": "本地存储 ({{location}}),未在设备之间同步" } \ No newline at end of file diff --git a/src/components/post/embed/embed.tsx b/src/components/post/embed/embed.tsx index df650624..3885a89d 100644 --- a/src/components/post/embed/embed.tsx +++ b/src/components/post/embed/embed.tsx @@ -46,26 +46,37 @@ interface EmbedComponentProps { parsedUrl: URL; } -const youtubeHosts = new Set(['youtube.com', 'www.youtube.com', 'youtu.be', 'www.youtu.be', 'm.youtube.com']); +const youtubeHosts = new Set(['youtube.com', 'www.youtube.com', 'youtu.be', 'www.youtu.be', 'm.youtube.com', 'music.youtube.com']); const YoutubeEmbed = ({ parsedUrl }: EmbedComponentProps) => { - let youtubeId = parsedUrl.searchParams.get('v'); + let embedSrc = ''; - if (!youtubeId && parsedUrl.host.includes('youtu.be')) { - youtubeId = parsedUrl.pathname.substring(1); + if (parsedUrl.searchParams.has('list')) { + const playlistId = parsedUrl.searchParams.get('list'); + embedSrc = `https://www.youtube.com/embed/videoseries?list=${playlistId}`; + } else { + let videoId = parsedUrl.searchParams.get('v'); + + if (!videoId && parsedUrl.host.includes('youtu.be')) { + videoId = parsedUrl.pathname.substring(1); + } + + if (videoId) { + embedSrc = `https://www.youtube.com/embed/${videoId}`; + } } - if (youtubeId) { + if (embedSrc) { return (