Some selection-related fixes. There are still bugs.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3947 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-08-03 23:39:23 +00:00
parent 787e439524
commit 1973030774
4 changed files with 9 additions and 6 deletions

View File

@ -110,7 +110,7 @@
</md-card-actions>
</md-card>
<md-button v-if="selected" class="md-raised md-primary" style="margin: 1em" @click="selected = null">
<md-button v-if="selected?.length" class="md-raised md-primary" style="margin: 1em" @click="selected = null">
<md-icon>home</md-icon> Home
</md-button>

View File

@ -13,11 +13,14 @@ Vue.component('tf-user', {
},
methods: {
show_user: function() {
window.parent.postMessage({action: 'setHash', hash: this.id}, '*');
window.parent.postMessage({
action: 'setHash',
hash: tf.g_data.whoami + ':' + this.id,
}, '*');
},
},
template: `<md-chip :class="following ? 'md-accent' : ''">
<a :href="'#' + id" style="color: #fff">{{users[id] && users[id].name ? users[id].name : id}}</a>
<a :href="'#' + whoami + ':' + id" style="color: #fff">{{users[id] && users[id].name ? users[id].name : id}}</a>
<md-tooltip v-if="users[id] && users[id].name">{{id}}</md-tooltip>
</md-chip>`,
});

View File

@ -2,8 +2,8 @@ import * as tfrpc from '/static/tfrpc.js';
import * as tfshared from './tf-shared.js';
export var g_data = {
whoami: undefined,
selected: undefined,
whoami: null,
selected: null,
identities: [],
connections: [],
messages: [],