Show disconnected servers

This commit is contained in:
samcm 2017-07-17 02:30:57 +10:00
parent e936f8e58e
commit 53cb7cd88b
3 changed files with 34 additions and 3 deletions

View File

@ -6,7 +6,8 @@
<link rel="shortcut icon" href="ptweb/favicon.ico" type="image/x-icon">
<link rel="icon" href="ptweb/favicon.ico" type="image/x-icon">
<title>PlexTogether</title>
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons' rel="stylesheet" type="text/css">
<link href='https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' rel="stylesheet" type="text/css">
</head>
<body>
<div id="app"></div>

View File

@ -66,7 +66,7 @@
<h4> Browse </h4>
<v-layout row wrap>
<v-flex xs12 lg4 md6 xl3 v-for="server in plex.servers" :key="server.machineIdentifier" class="pa-2">
<v-card class="white--text" v-on:click="setServer(server)" horizontal height="10em" style="cursor: pointer; z-index: 0; background: rgba(0,0,0,0.4)">
<v-card class="white--text" v-on:click="setServer(server)" horizontal height="10em" style="cursor: pointer; z-index: 0; background: rgba(0,0,0,0.4);">
<v-container fluid grid-list-lg>
<v-layout row>
<v-flex xs4>
@ -81,6 +81,30 @@
<div class="headline">{{server.name}}</div>
<div style="opacity:0.8"> v{{server.productVersion}}</div>
<div>Owned by {{ ownerOfServer(server) }}</div>
<div v-if="!isConnectable(server)" class="red--text">Unable to connect</div>
</div>
</v-flex>
</v-layout>
</v-container>
</v-card>
</v-flex>
<v-flex xs12 lg4 md6 xl3 v-for="device in plex.all_devices" v-if="!isConnectable(device) && device.provides.indexOf('server') != -1" :key="device.machineIdentifier" class="pa-2">
<v-card class="white--text" horizontal height="10em" style="cursor: pointer; z-index: 0; background: rgba(0,0,0,0.4);">
<v-container fluid grid-list-lg>
<v-layout row>
<v-flex xs4>
<v-card-media
src="ptweb/plexlogo.png"
height="110px"
contain
></v-card-media>
</v-flex>
<v-flex xs8>
<div>
<div class="headline">{{device.name}}</div>
<div style="opacity:0.8"> v{{device.productVersion}}</div>
<div>Owned by {{ ownerOfServer(device) }}</div>
<div v-if="!isConnectable(device)" class="red--text">Unable to connect</div>
</div>
</v-flex>
</v-layout>
@ -133,6 +157,12 @@
setServer (server) {
this.browsingServer = server
},
isConnectable (server){
if (this.plex.getServerById(server.clientIdentifier)){
return true
}
return false
},
reset () {
console.log('resetting')
this.browsingServer = false

View File

@ -61,7 +61,7 @@ if (process.env.NODE_ENV == 'development') {
const state = {
count: 0,
appTitle: 'PlexTogether',
appVersion: '1.2.3',
appVersion: '1.2.4',
background: null,
shownChat: false,
plex: null,