mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 23:09:52 +02:00
Enable dev and compact basic mode.
This commit is contained in:
parent
70a0d50ede
commit
1bea2870f0
1 changed files with 62 additions and 35 deletions
|
@ -26,9 +26,11 @@
|
||||||
<v-app-bar
|
<v-app-bar
|
||||||
app
|
app
|
||||||
>
|
>
|
||||||
|
|
||||||
<v-app-bar-nav-icon @click="drawer = true"></v-app-bar-nav-icon>
|
<v-app-bar-nav-icon @click="drawer = true"></v-app-bar-nav-icon>
|
||||||
|
|
||||||
<v-toolbar-title>Inventory</v-toolbar-title>
|
<v-toolbar-title>Inventory</v-toolbar-title>
|
||||||
|
|
||||||
</v-app-bar>
|
</v-app-bar>
|
||||||
|
|
||||||
<v-navigation-drawer
|
<v-navigation-drawer
|
||||||
|
@ -39,15 +41,24 @@
|
||||||
<v-list
|
<v-list
|
||||||
nav
|
nav
|
||||||
>
|
>
|
||||||
<v-list-item-group
|
<v-list-item-group>
|
||||||
|
|
||||||
>
|
<v-list-item @click="compactToggle = !compactToggle">
|
||||||
<v-list-item @click="addDialog.show = true">
|
|
||||||
<v-list-item-icon>
|
<v-switch
|
||||||
<v-icon>mdi-plus</v-icon>
|
@click="compactToggle = !compactToggle"
|
||||||
</v-list-item-icon>
|
v-model="compactToggle"
|
||||||
<v-list-item-title>Add Item</v-list-item-title>
|
:label="`Compact`"
|
||||||
</v-list-item>
|
></v-switch>
|
||||||
|
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
|
<v-list-item @click="addDialog.show = true">
|
||||||
|
<v-list-item-icon>
|
||||||
|
<v-icon>mdi-plus</v-icon>
|
||||||
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>Add Item</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
|
||||||
</v-list-item-group>
|
</v-list-item-group>
|
||||||
</v-list>
|
</v-list>
|
||||||
|
@ -73,12 +84,12 @@
|
||||||
max-width="344"
|
max-width="344"
|
||||||
outlined
|
outlined
|
||||||
>
|
>
|
||||||
<v-list-item three-line>
|
<v-list-item one-line>
|
||||||
|
|
||||||
<v-list-item-content class="pb-1 pt-2">
|
<v-list-item-content class="pb-1 pt-2">
|
||||||
<div class="overline" style="font-size: 0.825rem !important;">{{item.type}}</div>
|
<div class="overline" style="font-size: 0.825rem !important;">{{item.type}}</div>
|
||||||
<v-list-item-title class="subtitle-1 mb-1">{{item.name}}</v-list-item-title>
|
<v-list-item-title class="subtitle-1 mb-1">{{item.name}}</v-list-item-title>
|
||||||
<v-list-item-subtitle>{{item.url}}</v-list-item-subtitle>
|
<v-list-item-subtitle v-show="!compactToggle">{{item.url}}</v-list-item-subtitle>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
|
|
||||||
<v-menu bottom left>
|
<v-menu bottom left>
|
||||||
|
@ -466,30 +477,42 @@
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var vue_this;
|
var vue_this;
|
||||||
|
|
||||||
EventBridge.scriptEventReceived.connect(function(receivedCommand) {
|
function browserDevelopment() {
|
||||||
receivedCommand = JSON.parse(receivedCommand);
|
if (typeof EventBridge !== 'undefined') {
|
||||||
// alert("RECEIVED COMMAND:" + receivedCommand.command)
|
return false; // We are in the browser, probably for development purposes.
|
||||||
if (receivedCommand.app == "inventory") {
|
} else {
|
||||||
// We route the data based on the command given.
|
return true; // We are in Vircadia.
|
||||||
if (receivedCommand.command == 'script-to-web-inventory') {
|
|
||||||
// alert("INVENTORY RECEIVED ON APP:" + JSON.stringify(receivedCommand.data));
|
|
||||||
vue_this.receiveInventory(receivedCommand.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (receivedCommand.command == 'script-to-web-receiving-item') {
|
|
||||||
// alert("RECEIVING ITEM OFFER:" + JSON.stringify(receivedCommand.data));
|
|
||||||
vue_this.receivingItem(receivedCommand.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (receivedCommand.command == 'script-to-web-nearby-users') {
|
|
||||||
// alert("RECEIVING NEARBY USERS:" + JSON.stringify(receivedCommand.data));
|
|
||||||
vue_this.receiveNearbyUsers(receivedCommand.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
|
if (!browserDevelopment()) {
|
||||||
|
|
||||||
|
EventBridge.scriptEventReceived.connect(function(receivedCommand) {
|
||||||
|
receivedCommand = JSON.parse(receivedCommand);
|
||||||
|
// alert("RECEIVED COMMAND:" + receivedCommand.command)
|
||||||
|
if (receivedCommand.app == "inventory") {
|
||||||
|
// We route the data based on the command given.
|
||||||
|
if (receivedCommand.command == 'script-to-web-inventory') {
|
||||||
|
// alert("INVENTORY RECEIVED ON APP:" + JSON.stringify(receivedCommand.data));
|
||||||
|
vue_this.receiveInventory(receivedCommand.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (receivedCommand.command == 'script-to-web-receiving-item') {
|
||||||
|
// alert("RECEIVING ITEM OFFER:" + JSON.stringify(receivedCommand.data));
|
||||||
|
vue_this.receivingItem(receivedCommand.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (receivedCommand.command == 'script-to-web-nearby-users') {
|
||||||
|
// alert("RECEIVING NEARBY USERS:" + JSON.stringify(receivedCommand.data));
|
||||||
|
vue_this.receiveNearbyUsers(receivedCommand.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#inventoryApp',
|
el: '#inventoryApp',
|
||||||
|
@ -612,6 +635,7 @@ new Vue({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
sortBy: "alphabetical",
|
sortBy: "alphabetical",
|
||||||
|
compactToggle: true,
|
||||||
darkTheme: true,
|
darkTheme: true,
|
||||||
drawer: false,
|
drawer: false,
|
||||||
}),
|
}),
|
||||||
|
@ -797,9 +821,12 @@ new Vue({
|
||||||
"command": command,
|
"command": command,
|
||||||
"data": data
|
"data": data
|
||||||
};
|
};
|
||||||
|
|
||||||
// alert(JSON.stringify(JSONtoSend));
|
if (!browserDevelopment()) {
|
||||||
EventBridge.emitWebEvent(JSON.stringify(JSONtoSend));
|
EventBridge.emitWebEvent(JSON.stringify(JSONtoSend));
|
||||||
|
} else {
|
||||||
|
alert(JSON.stringify(JSONtoSend));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
Loading…
Reference in a new issue