mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 22:39:18 +02:00
Even *further* progress.
This commit is contained in:
parent
e138278ebc
commit
42ab992397
3 changed files with 143 additions and 24 deletions
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<v-navigation-drawer
|
<v-navigation-drawer
|
||||||
v-model="drawer"
|
v-model="drawer"
|
||||||
absolute
|
fixed
|
||||||
temporary
|
temporary
|
||||||
>
|
>
|
||||||
<v-list
|
<v-list
|
||||||
|
@ -49,6 +49,7 @@
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col
|
<v-col
|
||||||
v-for="item in items"
|
v-for="item in items"
|
||||||
|
v-bind:key="item.url"
|
||||||
cols="12"
|
cols="12"
|
||||||
sm="6"
|
sm="6"
|
||||||
md="4"
|
md="4"
|
||||||
|
@ -60,28 +61,72 @@
|
||||||
outlined
|
outlined
|
||||||
>
|
>
|
||||||
<v-list-item three-line>
|
<v-list-item three-line>
|
||||||
<v-list-item-content>
|
|
||||||
<div class="overline mb-4">{{item.type}}</div>
|
<v-list-item-content class="pb-1 pt-2">
|
||||||
<v-list-item-title class="headline mb-1">{{item.name}}</v-list-item-title>
|
<div class="overline" style="font-size: 0.825rem !important;">{{item.type}}</div>
|
||||||
<!-- <v-list-item-subtitle>Greyhound divisely hello coldly fonwderfully</v-list-item-subtitle> -->
|
<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-content>
|
</v-list-item-content>
|
||||||
|
|
||||||
|
<!-- <v-card-actions>
|
||||||
|
<v-btn class="" color="purple">Share</v-btn>
|
||||||
|
<v-btn class="" color="red" @click="removeDialog.show = true;">Remove</v-btn>
|
||||||
|
</v-card-actions> -->
|
||||||
|
|
||||||
|
<v-menu bottom left>
|
||||||
|
<template v-slot:activator="{ on }">
|
||||||
|
<v-btn
|
||||||
|
:style="{backgroundColor: (getIconColor(item.type)) }"
|
||||||
|
fab
|
||||||
|
x-large
|
||||||
|
dark
|
||||||
|
v-on="on"
|
||||||
|
>
|
||||||
|
<v-icon>{{displayIcon(item.type)}}</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<v-list color="grey darken-3">
|
||||||
|
<v-list-item
|
||||||
|
@click="useItem(item.url)"
|
||||||
|
>
|
||||||
|
<v-list-item-title>Use</v-list-item-title>
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-icon>mdi-play</v-icon>
|
||||||
|
</v-list-item-action>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item
|
||||||
|
@click="renameItem(item.url)"
|
||||||
|
>
|
||||||
|
<v-list-item-title>Rename</v-list-item-title>
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-icon>mdi-pencil</v-icon>
|
||||||
|
</v-list-item-action>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item
|
||||||
|
@click="shareItem(item.url)"
|
||||||
|
>
|
||||||
|
<v-list-item-title>Share</v-list-item-title>
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-icon>mdi-share</v-icon>
|
||||||
|
</v-list-item-action>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item
|
||||||
|
@click="removeDialog.show = true;"
|
||||||
|
color="red darken-1"
|
||||||
|
>
|
||||||
|
<v-list-item-title>Remove</v-list-item-title>
|
||||||
|
<v-list-item-action>
|
||||||
|
<v-icon>mdi-minus</v-icon>
|
||||||
|
</v-list-item-action>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
</v-menu>
|
||||||
|
|
||||||
|
|
||||||
<v-list-item-avatar
|
|
||||||
size="80"
|
|
||||||
:style="{backgroundColor: (getIconColor(item.type)) }"
|
|
||||||
>
|
|
||||||
<v-icon x-large dark>{{displayIcon(item.type)}}</v-icon>
|
|
||||||
</v-list-item-avatar>
|
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
|
|
||||||
<v-card-actions>
|
|
||||||
<v-btn class="px-5" color="purple">Share</v-btn>
|
|
||||||
<v-btn class="px-3" color="red" @click="removeDialog.show = true;">Remove</v-btn>
|
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
|
|
||||||
<v-btn class="px-7" color="success" :href="item.url">Use</v-btn>
|
|
||||||
</v-card-actions>
|
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
@ -168,6 +213,7 @@
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="receiveDialog.show"
|
v-model="receiveDialog.show"
|
||||||
max-width="380"
|
max-width="380"
|
||||||
|
persistent
|
||||||
>
|
>
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title class="headline">Receiving Item</v-card-title>
|
<v-card-title class="headline">Receiving Item</v-card-title>
|
||||||
|
@ -241,8 +287,8 @@ new Vue({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "script",
|
"type": "script",
|
||||||
"name": "TEST",
|
"name": "TESTLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG",
|
||||||
"url": "https://google.com/vr.js",
|
"url": "https://google.com/vrLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG.js",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "avatar",
|
"type": "avatar",
|
||||||
|
@ -287,8 +333,13 @@ new Vue({
|
||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
receiveDialog: {
|
receiveDialog: {
|
||||||
show: true,
|
show: false,
|
||||||
|
user: null,
|
||||||
|
name: null,
|
||||||
|
type: null,
|
||||||
|
url: null,
|
||||||
},
|
},
|
||||||
|
sortBy: "alphabetical",
|
||||||
darkTheme: true,
|
darkTheme: true,
|
||||||
drawer: false,
|
drawer: false,
|
||||||
}),
|
}),
|
||||||
|
@ -299,6 +350,33 @@ new Vue({
|
||||||
methods: {
|
methods: {
|
||||||
addItem: function(url) {
|
addItem: function(url) {
|
||||||
|
|
||||||
|
},
|
||||||
|
removeItem: function(url) {
|
||||||
|
|
||||||
|
},
|
||||||
|
renameItem: function(url) {
|
||||||
|
|
||||||
|
},
|
||||||
|
receivingItem: function(name, url) {
|
||||||
|
|
||||||
|
},
|
||||||
|
shareItem: function(url) {
|
||||||
|
|
||||||
|
},
|
||||||
|
acceptItem: function(url) {
|
||||||
|
|
||||||
|
},
|
||||||
|
useItem: function(url) {
|
||||||
|
alert(url);
|
||||||
|
this.sendAppMessage("test", "testData");
|
||||||
|
},
|
||||||
|
sendAppMessage: function(command, data) {
|
||||||
|
var JSONtoSend = {
|
||||||
|
"app": "inventory",
|
||||||
|
"command": command,
|
||||||
|
"data": data
|
||||||
|
};
|
||||||
|
EventBridge.emitWebEvent(JSON.stringify(JSONtoSend));
|
||||||
},
|
},
|
||||||
displayIcon: function(itemType) {
|
displayIcon: function(itemType) {
|
||||||
return this.iconType[itemType].icon;
|
return this.iconType[itemType].icon;
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
(function () { // BEGIN LOCAL_SCOPE
|
||||||
|
var AppUi = Script.require('appUi');
|
||||||
|
var ui;
|
||||||
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
|
|
||||||
|
// APP EVENT ROUTING
|
||||||
|
|
||||||
|
function onWebAppEventReceived(event) {
|
||||||
|
var eventJSON = JSON.parse(event);
|
||||||
|
if (eventJSON.app == "inventory") { // This is our web app!
|
||||||
|
print("gemstoneApp.js received a web event: " + event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tablet.webEventReceived.connect(onWebAppEventReceived);
|
||||||
|
|
||||||
|
// END APP EVENT ROUTING
|
||||||
|
|
||||||
|
function saveInventory() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function onOpened() {
|
||||||
|
console.log("hello world!");
|
||||||
|
}
|
||||||
|
|
||||||
|
function onClosed() {
|
||||||
|
console.log("hello world!");
|
||||||
|
}
|
||||||
|
|
||||||
|
function startup() {
|
||||||
|
ui = new AppUi({
|
||||||
|
buttonName: "INVENTORY",
|
||||||
|
home: Script.resolvePath("inventory.html"),
|
||||||
|
graphicsDirectory: Script.resolvePath("./"), // Where your button icons are located
|
||||||
|
onOpened: onOpened,
|
||||||
|
onClosed: onClosed
|
||||||
|
});
|
||||||
|
}
|
||||||
|
startup();
|
||||||
|
}()); // END LOCAL_SCOPE
|
|
@ -4443,7 +4443,7 @@
|
||||||
|
|
||||||
.v-card__subtitle,
|
.v-card__subtitle,
|
||||||
.v-card__text {
|
.v-card__text {
|
||||||
font-size: 1.075rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.375rem;
|
line-height: 1.375rem;
|
||||||
letter-spacing: 0.0071428571em;
|
letter-spacing: 0.0071428571em;
|
||||||
|
@ -14356,7 +14356,7 @@ html.overflow-y-hidden {
|
||||||
font-family: "Roboto", sans-serif !important;
|
font-family: "Roboto", sans-serif !important;
|
||||||
}
|
}
|
||||||
.v-application .overline {
|
.v-application .overline {
|
||||||
font-size: 0.925rem !important;
|
font-size: 0.625rem !important;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
letter-spacing: 0.1666666667em !important;
|
letter-spacing: 0.1666666667em !important;
|
||||||
line-height: 1rem;
|
line-height: 1rem;
|
||||||
|
|
Loading…
Reference in a new issue