mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-25 04:35:17 +00:00
refactor: ➖ Remove useless dependancy
Remove @capacitor/browser dependancy from the app, extra space that can be accomplished now with `this.$vuetube.openexternal(url)`
This commit is contained in:
parent
2438c77b42
commit
db92f4d595
10 changed files with 15 additions and 25 deletions
|
@ -43,7 +43,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { Browser } from "@capacitor/browser";
|
||||
export default {
|
||||
props: {
|
||||
textRuns: {
|
||||
|
@ -52,8 +51,8 @@ export default {
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
async openExternal(url) {
|
||||
await Browser.open({ url: url });
|
||||
openExternal(url) {
|
||||
this.$vuetube.openExternal(url);
|
||||
},
|
||||
async openInternal(url) {
|
||||
await this.$router.push(url);
|
||||
|
|
|
@ -67,8 +67,8 @@
|
|||
|
||||
methods: {
|
||||
dl(item) {
|
||||
console.log(item.download_url)
|
||||
window.open(item.download_url, '_blank');
|
||||
this.$router.push(`/mods/updates`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { Browser } from "@capacitor/browser";
|
||||
import { Device } from "@capacitor/device";
|
||||
|
||||
export default {
|
||||
|
@ -113,8 +112,8 @@ export default {
|
|||
this.lang = this.$lang().mods.about;
|
||||
},
|
||||
methods: {
|
||||
async openExternal(url) {
|
||||
await Browser.open({ url: url });
|
||||
openExternal(url) {
|
||||
this.$vuetube.openExternal(url);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -73,8 +73,6 @@
|
|||
</style>
|
||||
|
||||
<script>
|
||||
import { Browser } from "@capacitor/browser";
|
||||
|
||||
export default {
|
||||
computed: {
|
||||
roundTweak() {
|
||||
|
@ -95,14 +93,12 @@ export default {
|
|||
this.lang = this.$lang("mods").updates;
|
||||
},
|
||||
methods: {
|
||||
async openExternal(item) {
|
||||
await Browser.open({
|
||||
url: item.html_url,
|
||||
});
|
||||
openExternal(item) {
|
||||
this.$vuetube.openExternal(item.html_url,);
|
||||
},
|
||||
|
||||
install(item, index) {
|
||||
this.$router.push(`/activities/packageInstaller?v=${index}`)
|
||||
this.$router.push(`/activities/packageInstaller?v=${index}`);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -18,6 +18,12 @@ Vue.directive("emoji", {
|
|||
let backActions;
|
||||
|
||||
const module = {
|
||||
|
||||
//--- Open External / Open In Browser ---//
|
||||
openExternal(url) {
|
||||
window.open(url, '_blank');
|
||||
},
|
||||
|
||||
//--- Get GitHub Commits ---//
|
||||
releases: new Promise((resolve, reject) => {
|
||||
Http.request({
|
||||
|
|
|
@ -11,7 +11,6 @@ apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
|
|||
dependencies {
|
||||
implementation project(':capacitor-community-http')
|
||||
implementation project(':capacitor-app')
|
||||
implementation project(':capacitor-browser')
|
||||
implementation project(':capacitor-device')
|
||||
implementation project(':capacitor-filesystem')
|
||||
implementation project(':capacitor-haptics')
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
"pkg": "@capacitor/app",
|
||||
"classpath": "com.capacitorjs.plugins.app.AppPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@capacitor/browser",
|
||||
"classpath": "com.capacitorjs.plugins.browser.BrowserPlugin"
|
||||
},
|
||||
{
|
||||
"pkg": "@capacitor/device",
|
||||
"classpath": "com.capacitorjs.plugins.device.DevicePlugin"
|
||||
|
|
|
@ -8,9 +8,6 @@ project(':capacitor-community-http').projectDir = new File('../node_modules/@cap
|
|||
include ':capacitor-app'
|
||||
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
|
||||
|
||||
include ':capacitor-browser'
|
||||
project(':capacitor-browser').projectDir = new File('../node_modules/@capacitor/browser/android')
|
||||
|
||||
include ':capacitor-device'
|
||||
project(':capacitor-device').projectDir = new File('../node_modules/@capacitor/device/android')
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ def capacitor_pods
|
|||
pod 'CapacitorCordova', :path => '../../node_modules/@capacitor/ios'
|
||||
pod 'CapacitorCommunityHttp', :path => '..\..\node_modules\@capacitor-community\http'
|
||||
pod 'CapacitorApp', :path => '..\..\node_modules\@capacitor\app'
|
||||
pod 'CapacitorBrowser', :path => '..\..\node_modules\@capacitor\browser'
|
||||
pod 'CapacitorDevice', :path => '..\..\node_modules\@capacitor\device'
|
||||
pod 'CapacitorFilesystem', :path => '..\..\node_modules\@capacitor\filesystem'
|
||||
pod 'CapacitorHaptics', :path => '..\..\node_modules\@capacitor\haptics'
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
"@capacitor-community/http": "^1.4.1",
|
||||
"@capacitor/android": "^3.4.0",
|
||||
"@capacitor/app": "^1.1.1",
|
||||
"@capacitor/browser": "^1.0.7",
|
||||
"@capacitor/cli": "^3.4.0",
|
||||
"@capacitor/core": "^3.4.0",
|
||||
"@capacitor/device": "^1.1.2",
|
||||
|
|
Loading…
Reference in a new issue