Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Multi-Tasking Support in Workspace View #146

Merged
merged 5 commits into from
Aug 11, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
🚧 Adds new component to handle multi-tasking
  • Loading branch information
Lissy93 committed Aug 11, 2021
commit 126ae5f155821999236f5ee1dac177c0d71e00bc
57 changes: 57 additions & 0 deletions src/components/Workspace/MultiTaskingWebComtent.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<div class="web-content" ref="container">
<button @click="launchApp">Click Me</button>
</div>
</template>

<script>
import Vue from 'vue';
import WebContent from '@/components/Workspace/WebContent';

export default {
name: 'WebContent',
props: {
url: String,
currentApp: String,
},
data: () => ({
openApps: [],
activeApp: '',
}),
methods: {
launchApp() {
if (this.openApps.includes(this.url)) {
this.openExistingApp();
} else {
this.openApps.push(this.url);
this.appendNewApp();
}
},
appendNewApp() {
const ComponentClass = Vue.extend(WebContent);
const instance = new ComponentClass({
propsData: { url: this.url },
});
instance.$mount(); // pass nothing
this.$refs.container.appendChild(instance.$el);
},
openExistingApp() {
console.log('Already Exists', this.url);
// TODO: Find open frame, and set visibility
},
},
};
</script>

<style lang="scss" scoped>

iframe {
position: absolute;
left: var(--side-bar-width);
height: calc(100% - var(--header-height));
width: calc(100% - var(--side-bar-width));
border: none;
background: white;
}

</style>