Swap windows for tabs
Each ImJoy window now gets its own top-level tab. This involved some fairly significant refactoring of the ImJoy component, but I think it's cleaner now. I've moved imjoy-related stuff into a store "module" to keep it clean.
This commit is contained in:
parent
0e16835e1b
commit
7585e24744
6 changed files with 224 additions and 157 deletions
|
|
@ -44,7 +44,11 @@
|
|||
</div>
|
||||
|
||||
<div class="uk-card-footer uk-padding-small">
|
||||
<button class="uk-icon" type="button">
|
||||
<button
|
||||
v-if="openInImjoyMenuItems.length != 0"
|
||||
class="uk-icon"
|
||||
type="button"
|
||||
>
|
||||
<img
|
||||
style="width:25px;"
|
||||
src="https://imjoy.io/static/img/imjoy-icon.svg"
|
||||
|
|
@ -163,6 +167,7 @@
|
|||
<script>
|
||||
import UIkit from "uikit";
|
||||
import axios from "axios";
|
||||
import { mapState } from "vuex";
|
||||
|
||||
import keyvalList from "../../fieldComponents/keyvalList";
|
||||
|
||||
|
|
@ -223,9 +228,6 @@ export default {
|
|||
},
|
||||
|
||||
computed: {
|
||||
openInImjoyMenuItems: function() {
|
||||
return this.$store.state.openInImjoyMenuItems;
|
||||
},
|
||||
tagModalID: function() {
|
||||
return this.makeModalName("tag-modal-");
|
||||
},
|
||||
|
|
@ -252,7 +254,8 @@ export default {
|
|||
},
|
||||
captureURL: function() {
|
||||
return this.links.self.href;
|
||||
}
|
||||
},
|
||||
...mapState("imjoy", { openInImjoyMenuItems: "openImageMenu" })
|
||||
},
|
||||
|
||||
created: function() {},
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<div class="uk-card-footer uk-padding-small">
|
||||
<button
|
||||
v-if="openScanInImjoyMenuItemsPresent"
|
||||
v-if="openInImjoyMenuItems.length != 0"
|
||||
class="uk-icon"
|
||||
type="button"
|
||||
>
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
</button>
|
||||
<div uk-dropdown="pos: top-center">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li v-for="item in openScanInImjoyMenuItems" :key="item.name">
|
||||
<li v-for="item in openInImjoyMenuItems" :key="item.name">
|
||||
<a
|
||||
href="#"
|
||||
style="color:black"
|
||||
|
|
@ -125,10 +125,7 @@ export default {
|
|||
}
|
||||
return urls;
|
||||
},
|
||||
openScanInImjoyMenuItemsPresent: function() {
|
||||
return this.openScanInImjoyMenuItems.length > 0;
|
||||
},
|
||||
...mapState(["openScanInImjoyMenuItems"])
|
||||
...mapState("imjoy", { openInImjoyMenuItems: "openScanMenu" })
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue