mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 12:28:51 +02:00
Serve working, build not working.
This commit is contained in:
parent
30b0735358
commit
e794091824
2 changed files with 1067 additions and 668 deletions
|
@ -23,629 +23,7 @@
|
|||
<body>
|
||||
<div id="inventoryApp">
|
||||
<v-app>
|
||||
<v-app-bar
|
||||
app
|
||||
>
|
||||
|
||||
<v-app-bar-nav-icon @click="drawer = true"></v-app-bar-nav-icon>
|
||||
|
||||
<v-toolbar-title>Inventory</v-toolbar-title>
|
||||
|
||||
</v-app-bar>
|
||||
|
||||
<v-navigation-drawer
|
||||
v-model="drawer"
|
||||
fixed
|
||||
temporary
|
||||
>
|
||||
<v-list
|
||||
nav
|
||||
class="pt-5"
|
||||
>
|
||||
<v-list-item-group>
|
||||
|
||||
<v-slider
|
||||
v-model="settings.displayDensity.size"
|
||||
:tick-labels="settings.displayDensity.labels"
|
||||
:max="2"
|
||||
step="1"
|
||||
ticks="always"
|
||||
tick-size="3"
|
||||
></v-slider>
|
||||
|
||||
<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 @click="createFolderDialog.show = true">
|
||||
<v-list-item-icon>
|
||||
<v-icon>mdi-folder-plus</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-title>Create Folder</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
</v-list-item-group>
|
||||
</v-list>
|
||||
</v-navigation-drawer>
|
||||
|
||||
<v-content>
|
||||
<v-container fluid>
|
||||
<v-data-iterator
|
||||
:items="items"
|
||||
hide-default-footer
|
||||
>
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col
|
||||
v-for="item in items"
|
||||
v-bind:key="item.uuid"
|
||||
cols="12"
|
||||
sm="6"
|
||||
md="4"
|
||||
lg="3"
|
||||
class="py-1"
|
||||
>
|
||||
<v-card
|
||||
class="mx-auto"
|
||||
max-width="344"
|
||||
outlined
|
||||
v-if="!item.folder"
|
||||
>
|
||||
<v-list-item one-line>
|
||||
|
||||
<v-list-item-content class="pb-1 pt-2">
|
||||
<div v-show="settings.displayDensity.size > 0" 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-subtitle v-show="settings.displayDensity.size == 2">{{item.url}}</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
|
||||
<v-menu bottom left>
|
||||
<template v-slot:activator="{ on }">
|
||||
<!-- settings.displayDensity.size >= 1 -->
|
||||
<v-btn
|
||||
:style="{backgroundColor: (getIconColor(item.type)) }"
|
||||
v-show="settings.displayDensity.size >= 1"
|
||||
medium
|
||||
fab
|
||||
dark
|
||||
v-on="on"
|
||||
>
|
||||
<v-icon>{{displayIcon(item.type)}}</v-icon>
|
||||
</v-btn>
|
||||
<!-- settings.displayDensity.size < 1 -->
|
||||
<v-btn
|
||||
:style="{backgroundColor: (getIconColor(item.type)) }"
|
||||
v-show="settings.displayDensity.size < 1"
|
||||
small
|
||||
fab
|
||||
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.type, 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="
|
||||
editDialog.show = true;
|
||||
editDialog.uuid = item.uuid;
|
||||
editDialog.data.type = item.type;
|
||||
editDialog.data.name = item.name;
|
||||
editDialog.data.url = item.url;
|
||||
"
|
||||
>
|
||||
<v-list-item-title>Edit</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="shareDialog.show = true; shareDialog.data.url = item.url; shareDialog.data.uuid = item.uuid; sendAppMessage('web-to-script-request-nearby-users', '')"
|
||||
>
|
||||
<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; removeDialog.uuid = item.uuid;"
|
||||
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>
|
||||
|
||||
</v-card>
|
||||
|
||||
<!-- The Folder Card -->
|
||||
<v-card
|
||||
class="mx-auto"
|
||||
max-width="344"
|
||||
outlined
|
||||
v-if="item.folder"
|
||||
color="blue darken-5"
|
||||
>
|
||||
<v-list-group
|
||||
value="true"
|
||||
color=""
|
||||
>
|
||||
|
||||
<template v-slot:activator>
|
||||
<v-list-item one-line color="orange">
|
||||
Test {{item.name}}
|
||||
</v-list-item>
|
||||
</template>
|
||||
|
||||
<v-col
|
||||
v-for="item in item.items"
|
||||
v-bind:key="item.uuid"
|
||||
class="py-1"
|
||||
>
|
||||
<v-card
|
||||
class="mx-auto"
|
||||
max-width="344"
|
||||
outlined
|
||||
>
|
||||
<v-list-item one-line>
|
||||
|
||||
<v-list-item-content class="pb-1 pt-2">
|
||||
<v-list-item-title class="subtitle-1 mb-1">{{item.name}}</v-list-item-title>
|
||||
<v-list-item-subtitle v-show="settings.displayDensity.size == 2">{{item.url}}</v-list-item-subtitle>
|
||||
</v-list-item-content>
|
||||
|
||||
<v-menu bottom left>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
:style="{backgroundColor: (getIconColor(item.type)) }"
|
||||
small
|
||||
fab
|
||||
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.type, 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="
|
||||
editDialog.show = true;
|
||||
editDialog.uuid = item.uuid;
|
||||
editDialog.data.type = item.type;
|
||||
editDialog.data.name = item.name;
|
||||
editDialog.data.url = item.url;
|
||||
"
|
||||
>
|
||||
<v-list-item-title>Edit</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="shareDialog.show = true; shareDialog.data.url = item.url; shareDialog.data.uuid = item.uuid; sendAppMessage('web-to-script-request-nearby-users', '')"
|
||||
>
|
||||
<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; removeDialog.uuid = item.uuid;"
|
||||
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>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
|
||||
</v-list-group>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
</v-data-iterator>
|
||||
</v-container>
|
||||
</v-content>
|
||||
|
||||
<v-dialog
|
||||
v-model="removeDialog.show"
|
||||
max-width="290"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Remove Item</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Are you sure you want to delete this item from your inventory?
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="px-3"
|
||||
@click="removeDialog.show = false"
|
||||
>
|
||||
No
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="red"
|
||||
class="px-3"
|
||||
@click="removeDialog.show = false; removeItem(removeDialog.uuid);"
|
||||
>
|
||||
Yes
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog
|
||||
v-model="editDialog.show"
|
||||
max-width="380"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Edit Item</v-card-title>
|
||||
|
||||
<v-form
|
||||
ref="editForm"
|
||||
v-model="editDialog.valid"
|
||||
:lazy-validation="false"
|
||||
>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="Type"
|
||||
v-model="editDialog.data.type"
|
||||
:rules="[v => !!v || 'Type is required.']"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="Name"
|
||||
v-model="editDialog.data.name"
|
||||
:rules="[v => !!v || 'Name is required.']"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="URL"
|
||||
v-model="editDialog.data.url"
|
||||
:rules="[v => !!v || 'URL is required.']"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="red"
|
||||
class="px-3"
|
||||
@click="editDialog.show = false"
|
||||
>
|
||||
Cancel
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="px-3"
|
||||
:disabled="!editDialog.valid"
|
||||
@click="editDialog.show = false; editItem(editDialog.uuid);"
|
||||
>
|
||||
Done
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
|
||||
</v-form>
|
||||
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog
|
||||
v-model="createFolderDialog.show"
|
||||
max-width="380"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Create Folder</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Enter the name of the folder.
|
||||
</v-card-text>
|
||||
|
||||
<v-form
|
||||
ref="createFolderForm"
|
||||
v-model="createFolderDialog.valid"
|
||||
:lazy-validation="false"
|
||||
>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="Name"
|
||||
v-model="createFolderDialog.data.name"
|
||||
:rules="[v => !!v || 'Name is required.']"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="red"
|
||||
class="px-3"
|
||||
@click="addDialog.show = false"
|
||||
>
|
||||
Cancel
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="px-3"
|
||||
:disabled="!createFolderDialog.valid"
|
||||
@click="createFolderDialog.show = false; createFolder(createFolderDialog.data.name)"
|
||||
>
|
||||
Create
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog
|
||||
v-model="addDialog.show"
|
||||
max-width="380"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Add Item</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Enter the name of the item.
|
||||
</v-card-text>
|
||||
|
||||
<v-form
|
||||
ref="addForm"
|
||||
v-model="addDialog.valid"
|
||||
:lazy-validation="false"
|
||||
>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="Name"
|
||||
v-model="addDialog.data.name"
|
||||
:rules="[v => !!v || 'Name is required.']"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-card-text>
|
||||
Enter the URL of the item.
|
||||
</v-card-text>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="URL"
|
||||
v-model="addDialog.data.url"
|
||||
:rules="[v => !!v || 'URL is required.']"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="red"
|
||||
class="px-3"
|
||||
@click="addDialog.show = false"
|
||||
>
|
||||
Cancel
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="px-3"
|
||||
:disabled="!addDialog.valid"
|
||||
@click="addDialog.show = false; addItem(addDialog.data.name, addDialog.data.url)"
|
||||
>
|
||||
Add
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog
|
||||
v-model="receiveDialog.show"
|
||||
max-width="380"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Receiving Item</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
{{receiveDialog.data.user}} is sending you an item.
|
||||
</v-card-text>
|
||||
|
||||
<v-form
|
||||
ref="receiveForm"
|
||||
v-model="receiveDialog.valid"
|
||||
:lazy-validation="false"
|
||||
>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="Type"
|
||||
:rules="[v => !!v || 'Type is required.']"
|
||||
v-model="receiveDialog.data.type"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="Name"
|
||||
:rules="[v => !!v || 'Name is required.']"
|
||||
v-model="receiveDialog.data.name"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="URL"
|
||||
:rules="[v => !!v || 'URL is required.']"
|
||||
v-model="receiveDialog.data.url"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="red"
|
||||
class="px-3"
|
||||
@click="receiveDialog.show = false"
|
||||
>
|
||||
Reject
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="px-3"
|
||||
:disabled="!receiveDialog.valid"
|
||||
@click="receiveDialog.show = false; acceptItem();"
|
||||
>
|
||||
Accept
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-dialog
|
||||
v-model="shareDialog.show"
|
||||
max-width="380"
|
||||
persistent
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title class="headline">Share Item</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
Select a user to send this item to.
|
||||
</v-card-text>
|
||||
|
||||
<v-form
|
||||
ref="shareForm"
|
||||
v-model="shareDialog.valid"
|
||||
:lazy-validation="false"
|
||||
class="px-2"
|
||||
>
|
||||
|
||||
<!-- <v-list>
|
||||
<v-list-item-group v-model="shareDialog.data.recipient" color="primary">
|
||||
<v-list-item
|
||||
v-for="user in nearbyUsers"
|
||||
v-bind:key="user.uuid"
|
||||
>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title v-text="user.name"></v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
</v-list-item-group>
|
||||
</v-list> -->
|
||||
|
||||
<v-select
|
||||
v-model="shareDialog.data.recipient"
|
||||
:items="nearbyUsers"
|
||||
item-text="name"
|
||||
item-value="uuid"
|
||||
:rules="[v => !!v || 'A recipient is required']"
|
||||
label="Nearby Users"
|
||||
required
|
||||
></v-select>
|
||||
|
||||
<v-text-field
|
||||
class="px-2"
|
||||
label="URL"
|
||||
:rules="[v => !!v || 'URL is required.']"
|
||||
v-model="shareDialog.data.url"
|
||||
required
|
||||
></v-text-field>
|
||||
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="red"
|
||||
class="px-3"
|
||||
@click="shareDialog.show = false"
|
||||
>
|
||||
Cancel
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="px-3"
|
||||
:disabled="!shareDialog.valid"
|
||||
@click="shareDialog.show = false; shareItem(shareDialog.data.uuid, shareDialog.data.url);"
|
||||
>
|
||||
Send
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-app>
|
||||
</div>
|
||||
</body>
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue