0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-18 01:05:13 +00:00

feat: Add plugins

Add 'test plugin' already installed by default
This commit is contained in:
Kenny 2022-04-04 14:03:05 -04:00
parent 7503ae123e
commit 98b6393fc4
3 changed files with 71 additions and 1 deletions

View file

@ -0,0 +1,60 @@
<template>
<div class="py-2">
<v-list-item v-for="(plugin, index) in plugins" :key="index" class="my-1">
<v-card flat class="card my-2 background" :class="$vuetify.theme.dark ? 'lighten-1' : 'darken-1'">
<v-card-title style="padding: 0 0.25em 0 0.75em">{{ plugin.manifest.name }} {{ plugin.manifest.version }}</v-card-title>
<div style="padding: 1em 1em 0 0.75em; padding-left: 1.25em;">by {{ plugin.manifest.author }} {{ plugin.manifest.license ? `(${plugin.manifest.license})` : '' }}</div>
<v-card-text>
{{ plugin.manifest.description }}
</v-card-text>
</v-card>
</v-list-item>
</div>
</template>
<style scoped>
.card {
width: 100%;
}
.subtitle {
margin: 0.4em;
font-size: 0.75em;
transform: translateY(5%);
}
.date {
transform: translateY(-40%);
}
.btn-icon {
margin-right: 0.25em;
}
.tags {
margin-left: 0.5em;
}
</style>
<script>
export default {
data() {
return {
plugins: new Array(),
installedVersion: process.env.appVersion,
};
},
async mounted() {
const temp = require('~/plugins/demoPlugin.js');
this.plugins = [temp];
}
};
</script>

View file

@ -51,7 +51,7 @@ 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" },
{ {
name: "Updates", name: "Updates",
icon: "mdi-cloud-download-outline", icon: "mdi-cloud-download-outline",

View file

@ -0,0 +1,10 @@
module.exports = {
manifest: {
name: "Test plugin",
version: "1.0",
author: "Frontesque",
description: "A plugin to test how vuetube handles plugins // Add 'Hello, World!' to the home page.",
homepage: "https://vuetube.app",
license: "GPL-3.0"
}
}