Merge branch 'develop' into swn
This commit is contained in:
commit
0563fa6f56
11 changed files with 357 additions and 323 deletions
|
|
@ -90,7 +90,26 @@ export const menuDef = {
|
|||
title: 'antennas',
|
||||
icon: 'fas fa-satellite',
|
||||
show: computed(() => $i != null),
|
||||
to: '/my/antennas',
|
||||
active: computed(() => router.currentRoute.value.path.startsWith('/timeline/antenna/') || router.currentRoute.value.path === '/my/antennas' || router.currentRoute.value.path.startsWith('/my/antennas/')),
|
||||
action: (ev) => {
|
||||
const items = ref([{
|
||||
type: 'pending'
|
||||
}]);
|
||||
os.api('antennas/list').then(antennas => {
|
||||
const _items = [...antennas.map(antenna => ({
|
||||
type: 'link',
|
||||
text: antenna.name,
|
||||
to: `/timeline/antenna/${antenna.id}`
|
||||
})), null, {
|
||||
type: 'link',
|
||||
to: '/my/antennas',
|
||||
text: i18n.locale.manageAntennas,
|
||||
icon: 'fas fa-cog',
|
||||
}];
|
||||
items.value = _items;
|
||||
});
|
||||
os.popupMenu(items, ev.currentTarget || ev.target);
|
||||
},
|
||||
},
|
||||
mentions: {
|
||||
title: 'mentions',
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@
|
|||
<span v-if="!tab.iconOnly" class="title">{{ tab.title }}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="buttons right">
|
||||
<template v-if="info.actions && !narrow">
|
||||
<button v-for="action in info.actions" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" @touchstart="preventDrag" v-tooltip="action.text"><i :class="action.icon"></i></button>
|
||||
</template>
|
||||
<button v-if="shouldShowMenu" class="_button button" @click.stop="showMenu" @touchstart="preventDrag" v-tooltip="$ts.menu"><i class="fas fa-ellipsis-h"></i></button>
|
||||
<button v-if="closeButton" class="_button button" @click.stop="$emit('close')" @touchstart="preventDrag" v-tooltip="$ts.close"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</template>
|
||||
<div class="buttons right">
|
||||
<template v-if="info && info.actions && !narrow">
|
||||
<button v-for="action in info.actions" class="_button button" :class="{ highlighted: action.highlighted }" @click.stop="action.handler" @touchstart="preventDrag" v-tooltip="action.text"><i :class="action.icon"></i></button>
|
||||
</template>
|
||||
<button v-if="shouldShowMenu" class="_button button" @click.stop="showMenu" @touchstart="preventDrag" v-tooltip="$ts.menu"><i class="fas fa-ellipsis-h"></i></button>
|
||||
<button v-if="closeButton" class="_button button" @click.stop="$emit('close')" @touchstart="preventDrag" v-tooltip="$ts.close"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -83,6 +83,7 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
shouldShowMenu() {
|
||||
if (this.info == null) return false;
|
||||
if (this.info.actions != null && this.narrow) return true;
|
||||
if (this.info.menu != null) return true;
|
||||
if (this.info.share != null) return true;
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ export default defineComponent({
|
|||
|
||||
> .item {
|
||||
padding-left: 0;
|
||||
padding: 10px 0;
|
||||
padding: 18px 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: $ui-font-size * 1.1;
|
||||
|
|
@ -280,14 +280,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
> .text {
|
||||
display: inline-block;
|
||||
font-size: 0.5em;
|
||||
line-height: initial;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
max-width: 100%;
|
||||
opacity: 0.7;
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover, &.active {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue