0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-29 06:33:05 +00:00
This commit is contained in:
Alex 2022-04-08 08:30:42 +12:00
commit 7ca3910285
15 changed files with 234 additions and 60 deletions

View file

@ -4,8 +4,6 @@ on:
push: push:
branches: branches:
- main - main
pull_request:
workflow_dispatch:
env: env:
NODE_VERSION: 16 NODE_VERSION: 16

View file

@ -14,9 +14,6 @@
v-show="!search" v-show="!search"
class="scrollcontainer" class="scrollcontainer"
style="overflow: hidden; height: calc(100vh - 8rem)" style="overflow: hidden; height: calc(100vh - 8rem)"
:style="{
borderRadius: `${roundTweak / 2}rem`,
}"
> >
<!-- element above removes artifacting from things like v-ripple by --> <!-- element above removes artifacting from things like v-ripple by -->
<!-- scrollbox below must be a standalone div --> <!-- scrollbox below must be a standalone div -->

View file

@ -2,6 +2,7 @@
* Data Storage: * Data Storage:
* localStorage.setItem("key", data) * localStorage.setItem("key", data)
* localStorage.getItem('key') * localStorage.getItem('key')
* this.$router.push("PageName");
*/ */
export default { export default {

View file

@ -0,0 +1,19 @@
<template>
<div>
Redirecting...
</div>
</template>
<script>
export default {
layout: "empty",
mounted() {
this.$router.push(
"/watch?v="
+ $nuxt.$route.params.redirect_
);
}
}
</script>

View file

@ -18,22 +18,27 @@ export default {
layout: "empty", layout: "empty",
data: () => ({ data: () => ({
progressMsg: "Fetching the API", progressMsg: "Connecting",
}), }),
async mounted() { async mounted() {
this.$store.commit("tweaks/initTweaks"); this.$store.commit("tweaks/initTweaks");
const theming = new Promise((resolve) => const theming = new Promise((resolve) =>
// Set timeout is required for $vuetify.theme... dont ask me why -Front // Set timeout is required for $vuetify.theme... dont ask me why -Front
setTimeout(() => { setTimeout(() => {
this.$vuetify.theme.dark = JSON.parse(localStorage.getItem("darkTheme")) === true; this.$vuetify.theme.dark =
JSON.parse(localStorage.getItem("darkTheme")) === true;
if (localStorage.getItem("primaryDark") != null) if (localStorage.getItem("primaryDark") != null)
this.$vuetify.theme.themes.dark.primary = localStorage.getItem("primaryDark"); this.$vuetify.theme.themes.dark.primary =
localStorage.getItem("primaryDark");
if (localStorage.getItem("primaryLight") != null) if (localStorage.getItem("primaryLight") != null)
this.$vuetify.theme.themes.light.primary = localStorage.getItem("primaryLight"); this.$vuetify.theme.themes.light.primary =
localStorage.getItem("primaryLight");
if (localStorage.getItem("backgroundDark") != null) if (localStorage.getItem("backgroundDark") != null)
this.$vuetify.theme.themes.dark.background = localStorage.getItem("backgroundDark"); this.$vuetify.theme.themes.dark.background =
localStorage.getItem("backgroundDark");
if (localStorage.getItem("backgroundLight") != null) if (localStorage.getItem("backgroundLight") != null)
this.$vuetify.theme.themes.light.background = localStorage.getItem("backgroundLight"); this.$vuetify.theme.themes.light.background =
localStorage.getItem("backgroundLight");
this.$vuetube.navigationBar.setTheme( this.$vuetube.navigationBar.setTheme(
this.$vuetify.theme.currentTheme.background, this.$vuetify.theme.currentTheme.background,
!this.$vuetify.theme.dark !this.$vuetify.theme.dark
@ -48,7 +53,8 @@ export default {
await theming; await theming;
await this.$youtube.getAPI(); await this.$youtube.getAPI();
this.progressMsg = "Navigating Home"; this.progressMsg = "Launching";
this.$router.push(`/${localStorage.getItem("startPage") || "home"}`); this.$router.push(`/${localStorage.getItem("startPage") || "home"}`);
}, },
}; };

View file

@ -1,5 +1,6 @@
<template> <template>
<center style="padding: 1em"> <div style="padding: 1em">
<center>
<div class="row pa-4" style="flex-direction: column"> <div class="row pa-4" style="flex-direction: column">
<div> <div>
<v-img <v-img
@ -8,28 +9,51 @@
:class="$vuetify.theme.dark ? '' : 'invert'" :class="$vuetify.theme.dark ? '' : 'invert'"
/> />
</div> </div>
<v-spacer /> <h1 class="pageTitle mb-3">VueTube</h1>
<div> </div>
<h1 class="pageTitle mb-3">VueTube</h1> </center>
<v-btn @click="openExternal('https://github.com/Frontesque/VueTube')"
><v-icon>mdi-github</v-icon></v-btn <!-- App Information -->
> <v-card class="obj" :class="$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'" :style="{borderRadius: `${roundTweak / 2}rem`}">
<v-btn @click="openExternal('https://discord.gg/7P8KJrdd5W')" <v-card-title>App Information</v-card-title>
><v-icon>mdi-discord</v-icon></v-btn <v-card-text>
> <h3>App Version</h3>
</div> {{ version.substring(0, 7) || "Unknown" }}
</v-card-text>
</v-card>
<!-- End App Information -->
<!-- Device Information -->
<v-card class="obj" :class="$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'" :style="{borderRadius: `${roundTweak / 2}rem`}">
<v-card-title>Device Information</v-card-title>
<v-card-text>
<h3>Platform</h3>
{{ deviceInfo.platform || "Unknown" }}<br>
<h3>Operating System</h3>
{{ deviceInfo.operatingSystem || "Unknown" }} ({{ deviceInfo.osVersion || "Unknown" }})<br>
<h3>Model</h3>
{{ deviceInfo.model || "Unknown" }}<br>
<h3>Manufacturer</h3>
{{ deviceInfo.manufacturer || "Unknown" }}<br>
<h3>Emulator</h3>
{{ deviceInfo.isVirtual ? "yes" : "no" }}
</v-card-text>
</v-card>
<!-- End Device Information -->
<!-- App Links --->
<div class="obj">
<v-btn @click="openExternal('https://github.com/Frontesque/VueTube')" class="action" :class="$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'" :style="{borderRadius: `${roundTweak / 2}rem`}">
<v-icon x-large class="actionIcon">mdi-github</v-icon>
Github
</v-btn>
<v-btn @click="openExternal('https://discord.gg/7P8KJrdd5W')" class="action obj" :class="$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'" :style="{borderRadius: `${roundTweak / 2}rem`}">
<v-icon x-large class="actionIcon">mdi-discord</v-icon>
Discord
</v-btn>
</div> </div>
<h3 style="margin-top: 2em">App Information</h3> </div>
<div>App Version: {{ version.substring(0, 7) }}</div>
<h3 style="margin-top: 1em">Device Information</h3>
<div>Platform: {{ deviceInfo.platform }}</div>
<div>OS: {{ deviceInfo.operatingSystem }} ({{ deviceInfo.osVersion }})</div>
<div>Model: {{ deviceInfo.model }}</div>
<div>Manufacturer: {{ deviceInfo.manufacturer }}</div>
<div>Emulator: {{ deviceInfo.isVirtual ? "yes" : "no" }}</div>
</center>
</template> </template>
<script> <script>
@ -37,6 +61,13 @@ import { Browser } from "@capacitor/browser";
import { Device } from "@capacitor/device"; import { Device } from "@capacitor/device";
export default { export default {
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
}
},
data() { data() {
return { return {
version: process.env.appVersion, version: process.env.appVersion,
@ -60,4 +91,15 @@ export default {
.pageTitle { .pageTitle {
margin-bottom: 1em; margin-bottom: 1em;
} }
.obj {
margin-top: 1em;
}
.action {
min-width: 100% !important;
min-height: 5em;
padding: 0 !important;
}
.actionIcon {
margin-right: 0.5em;
}
</style> </style>

View file

@ -4,9 +4,9 @@
<!-- Top Notice --> <!-- Top Notice -->
<center style="margin: 2em;"> <center style="margin: 2em;">
<h1>VueTube Registry</h1> <h1>Registry Editor</h1>
<v-alert text outlined type="warning"> <v-alert text outlined type="warning">
MESSING WITH SETTINGS MAY CAUSE YOUR APP TO BREAK! EDITING ENTRIES MAY CAUSE YOUR APP TO BREAK!
</v-alert> </v-alert>
</center> </center>
@ -20,7 +20,7 @@
<!-- Registry List Loader --> <!-- Registry List Loader -->
<v-list-item v-for="(item, index) in keys" :key="index"> <v-list-item v-for="(item, index) in keys" :key="index">
<v-card class="card rounded-lg" :class="$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'"> <v-card class="card" :class="$vuetify.theme.dark ? 'background lighten-1' : 'background darken-1'" :style="{borderRadius: `${roundTweak / 2}rem`}">
<v-card-title v-text="item.key" /> <v-card-title v-text="item.key" />
<v-card-text v-text="item.value" /> <v-card-text v-text="item.value" />
<v-card-actions> <v-card-actions>
@ -104,6 +104,13 @@
<script> <script>
export default { export default {
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
}
},
data() { data() {
return { return {
keys: [], keys: [],

View file

@ -5,6 +5,7 @@
class="card background" class="card background"
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
flat flat
:style="{borderRadius: `${roundTweak / 2}rem`}"
> >
<v-card-title> <v-card-title>
<v-chip v-if="item.error" outlined class="errorChip" color="error" <v-chip v-if="item.error" outlined class="errorChip" color="error"
@ -22,6 +23,7 @@
<v-expansion-panel <v-expansion-panel
class="background" class="background"
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
:style="{borderRadius: `${roundTweak / 2}rem`}"
> >
<v-expansion-panel-header>More</v-expansion-panel-header> <v-expansion-panel-header>More</v-expansion-panel-header>
<v-expansion-panel-content class="logContent" v-text="item.data" /> <v-expansion-panel-content class="logContent" v-text="item.data" />
@ -53,6 +55,11 @@
<script> <script>
export default { export default {
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
}
},
data() { data() {
return { return {
logs: new Array(), logs: new Array(),

View file

@ -4,6 +4,7 @@
flat flat
class="pb-5 background" class="pb-5 background"
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
:style="{borderRadius: `${roundTweak / 2}rem`}"
> >
<v-card-title>Default Page</v-card-title> <v-card-title>Default Page</v-card-title>
<v-card-text> <v-card-text>
@ -21,6 +22,13 @@
<script> <script>
export default { export default {
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
}
},
data() { data() {
return { return {
page: "home", page: "home",

View file

@ -5,6 +5,7 @@
flat flat
class="card my-2 background" class="card my-2 background"
:class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'"
:style="{ borderRadius: `${roundTweak / 2}rem` }"
> >
<v-card-title style="padding: 0 0.25em 0 0.75em"> <v-card-title style="padding: 0 0.25em 0 0.75em">
{{ item.author ? item.author.login : item.commit.author.name }} {{ item.author ? item.author.login : item.commit.author.name }}
@ -89,31 +90,23 @@
import { Browser } from "@capacitor/browser"; import { Browser } from "@capacitor/browser";
export default { export default {
computed: {
roundTweak() {
return this.$store.state.tweaks.roundTweak;
},
},
data() { data() {
return { return {
commits: new Array(), commits: new Array(),
installedVersion: process.env.appVersion, installedVersion: process.env.appVersion,
}; };
}, },
async mounted() {
const commits = await this.$vuetube.commits;
if (commits[0].sha) {
//If Commit Valid
this.commits = commits;
} else {
console.log(commits);
}
},
methods: {
async openExternal(item) {
await Browser.open({ url: item.html_url });
},
install(item) { install(item) {
this.$vuetube.getRuns(item, (data) => { this.$vuetube.getRuns(item, (data) => {
console.log(data); console.log(data);
}); });
},
}, },
}; };
</script> </script>

View file

@ -14,7 +14,6 @@
<!-- Dev Mode Open --> <!-- Dev Mode Open -->
<v-btn text class="entry" @click="dev()" /> <v-btn text class="entry" @click="dev()" />
</div> </div>
</template> </template>
@ -51,7 +50,13 @@ export default {
to: "/mods/tweaks", to: "/mods/tweaks",
}, },
{ name: "Startup Options", icon: "mdi-restart", to: "/mods/startup" }, { name: "Startup Options", icon: "mdi-restart", to: "/mods/startup" },
{ name: "Plugins", icon: "mdi-puzzle", to: "", disabled: true }, {
name: "Plugins",
icon: "mdi-puzzle",
to: "",
to: "/mods/plugins",
disabled: true,
},
{ {
name: "Updates", name: "Updates",
icon: "mdi-cloud-download-outline", icon: "mdi-cloud-download-outline",
@ -68,7 +73,7 @@ export default {
if (this.devClicks >= 6) { if (this.devClicks >= 6) {
this.$router.push("/mods/developer"); this.$router.push("/mods/developer");
} }
} },
} },
}; };
</script> </script>

View file

@ -5,10 +5,11 @@
style="position: sticky; top: 0; z-index: 696969" style="position: sticky; top: 0; z-index: 696969"
:vid-src="vidSrc" :vid-src="vidSrc"
ref="player" ref="player"
v-if="useBetaPlayer !== 'true'"
/> />
<!-- VueTube Player V1 --> <!-- VueTube Player V1 -->
<!-- <VTPlayerV1 :sources="sources" v-if="sources.length > 0" />--> <vuetubePlayer :sources="sources" v-if="useBetaPlayer === 'true'" />
<v-card v-if="loaded" class="ml-2 mr-2 background" flat> <v-card v-if="loaded" class="ml-2 mr-2 background" flat>
<v-card-title <v-card-title
@ -150,11 +151,14 @@ import VidLoadRenderer from "~/components/vidLoadRenderer.vue";
import { getCpn } from "~/plugins/utils"; import { getCpn } from "~/plugins/utils";
import SlimVideoDescriptionRenderer from "~/components/UtilRenderers/slimVideoDescriptionRenderer.vue"; import SlimVideoDescriptionRenderer from "~/components/UtilRenderers/slimVideoDescriptionRenderer.vue";
import ItemSectionRenderer from "~/components/SectionRenderers/itemSectionRenderer.vue"; import ItemSectionRenderer from "~/components/SectionRenderers/itemSectionRenderer.vue";
import vuetubePlayer from "~/components/Player/index.vue";
export default { export default {
components: { components: {
ShelfRenderer,
VidLoadRenderer, VidLoadRenderer,
SlimVideoDescriptionRenderer, SlimVideoDescriptionRenderer,
vuetubePlayer,
ItemSectionRenderer, ItemSectionRenderer,
}, },
data() { data() {
@ -191,8 +195,10 @@ export default {
loaded: false, loaded: false,
interval: null, interval: null,
video: null, video: null,
useBetaPlayer: false,
}; };
}, },
watch: { watch: {
// Watch for change in the route query string (in this case, ?v=xxxxxxxx to ?v=yyyyyyyy) // Watch for change in the route query string (in this case, ?v=xxxxxxxx to ?v=yyyyyyyy)
$route: { $route: {
@ -213,6 +219,8 @@ export default {
mounted() { mounted() {
this.startTime = Math.floor(Date.now() / 1000); this.startTime = Math.floor(Date.now() / 1000);
this.getVideo(); this.getVideo();
this.useBetaPlayer = localStorage.getItem("debug.BetaPlayer");
}, },
destroyed() { destroyed() {

View file

@ -16,9 +16,15 @@ const ytApiVal = {
CLIENT_WEB: 2, CLIENT_WEB: 2,
}; };
const filesystem = {
plugins: "vuetube/plugins",
temp: "vuetube/temp",
}
module.exports = { module.exports = {
URLS: url, URLS: url,
YT_API_VALUES: ytApiVal, YT_API_VALUES: ytApiVal,
fs: filesystem,
LOGGER_NAMES: { LOGGER_NAMES: {
search: "Search", search: "Search",
autoComplete: "AutoComplete", autoComplete: "AutoComplete",

View file

@ -0,0 +1,76 @@
//--- Modules/Imports ---//
import { Filesystem, Directory, Encoding } from '@capacitor/filesystem';
import { fs } from './constants';
//--- Set Up App Directory ---//
const APP_DIRECTORY = Directory.Documents;
const ensureStructure = new Promise(async (resolve, reject) => {
const perms = await Filesystem.checkPermissions();
if (perms.publicStorage !== "granted") {
perms = await Filesystem.requestPermissions();
}
//--- Ensure Plugins Folder ---//
try {
await Filesystem.mkdir({ directory: APP_DIRECTORY, recursive: true,
path: fs.plugins,
});
} catch (e) { /* Exists */ }
//--- Ensure Temp Folder ---//
try {
await Filesystem.mkdir({ directory: APP_DIRECTORY, recursive: true,
path: fs.temp,
});
} catch (e) { /* Exists */ }
perms
? resolve(true)
: reject(false)
})
const module = {
//--- Get Plugins ---//
list: new Promise(async (resolve, reject) => {
let plugins = new Array();
if (await !ensureStructure) reject("Invalid Structure");
// Temp Plugin List
plugins = Filesystem.readdir({
directory: APP_DIRECTORY,
path: fs.plugins
})
// End Temp Plugin List
resolve(plugins);
}),
//--- End Get Plugins ---//
//--- Delete Plugin ---//
list: async (pluginName) => {
console.log(fs.plugins);
/*
const contents = await Filesystem.readFile({
path: 'secrets/text.txt',
directory: Directory.Documents,
encoding: Encoding.UTF8,
});
*/
}
};
//--- Start ---//
export default ({ app }, inject) => {
inject("tppl", module);
};

View file

@ -8,7 +8,8 @@
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme"> android:theme="@style/AppTheme"
android:requestLegacyExternalStorage="true">
<activity <activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"