mirror of
https://github.com/Lissy93/dashy.git
synced 2024-12-30 12:36:11 +03:00
⚡ Re: #254 - Adds new tab functionality to Workspace
This commit is contained in:
parent
bc100b8143
commit
0bfca16dda
@ -58,8 +58,8 @@ export default {
|
|||||||
this.isOpen = this.isOpen.map((val, ind) => (ind !== index ? false : !val));
|
this.isOpen = this.isOpen.map((val, ind) => (ind !== index ? false : !val));
|
||||||
},
|
},
|
||||||
/* When item clicked, emit a launch event */
|
/* When item clicked, emit a launch event */
|
||||||
launchApp(url) {
|
launchApp(options) {
|
||||||
this.$emit('launch-app', url);
|
this.$emit('launch-app', options);
|
||||||
},
|
},
|
||||||
/* If an initial URL is specified, then open relevant section */
|
/* If an initial URL is specified, then open relevant section */
|
||||||
openDefaultSection() {
|
openDefaultSection() {
|
||||||
|
@ -17,6 +17,7 @@ export default {
|
|||||||
icon: String,
|
icon: String,
|
||||||
title: String,
|
title: String,
|
||||||
url: String,
|
url: String,
|
||||||
|
target: String,
|
||||||
click: Function,
|
click: Function,
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -24,7 +25,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
itemClicked() {
|
itemClicked() {
|
||||||
if (this.url) this.$emit('launch-app', this.url);
|
if (this.url) this.$emit('launch-app', { url: this.url, target: this.target });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
:icon="item.icon"
|
:icon="item.icon"
|
||||||
:title="item.title"
|
:title="item.title"
|
||||||
:url="item.url"
|
:url="item.url"
|
||||||
|
:target="item.target"
|
||||||
@launch-app="launchApp"
|
@launch-app="launchApp"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -26,8 +27,8 @@ export default {
|
|||||||
SideBarItem,
|
SideBarItem,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
launchApp(url) {
|
launchApp(options) {
|
||||||
this.$emit('launch-app', url);
|
this.$emit('launch-app', options);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -37,8 +37,12 @@ export default {
|
|||||||
MultiTaskingWebComtent,
|
MultiTaskingWebComtent,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
launchApp(url) {
|
launchApp(options) {
|
||||||
this.url = url;
|
if (options.target === 'newtab') {
|
||||||
|
window.open(options.url, '_blank');
|
||||||
|
} else {
|
||||||
|
this.url = options.url;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
setTheme() {
|
setTheme() {
|
||||||
const theme = this.GetTheme();
|
const theme = this.GetTheme();
|
||||||
|
Loading…
Reference in New Issue
Block a user