feat: manage extensions navbar (#2121)
* feat: manage extensions navbar create now `Manage` spacer in sidebar. and add manage extensions to it closes #2088 * do not show when no exts * update cn and jp i18n strings * rename lnbits-admin-ui component to lnbits-manage, fix its behaviour * i18n: add Korean language --------- Co-authored-by: Pavol Rusnak <pavol@rusnak.io> Co-authored-by: psychoet <125599543+psychoet@users.noreply.github.com>
This commit is contained in:
co-authored by
Pavol Rusnak
psychoet
parent
3b0024bcf2
commit
9c85e1156c
@@ -111,7 +111,7 @@ Vue.component('lnbits-extension-list', {
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<q-list v-if="user" dense class="lnbits-drawer__q-list">
|
||||
<q-list v-if="user && userExtensions.length > 0" dense class="lnbits-drawer__q-list">
|
||||
<q-item-label header v-text="$t('extensions')"></q-item-label>
|
||||
<q-item v-for="extension in userExtensions" :key="extension.code"
|
||||
clickable
|
||||
@@ -132,14 +132,6 @@ Vue.component('lnbits-extension-list', {
|
||||
<q-icon name="chevron_right" color="grey-5" size="md"></q-icon>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item clickable tag="a" :href="['/extensions?usr=', user.id].join('')">
|
||||
<q-item-section side>
|
||||
<q-icon name="clear_all" color="grey-5" size="md"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label lines="1" class="text-caption" v-text="$t('extensions')"></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<div class="lt-md q-mt-xl q-mb-xl"></div>
|
||||
</q-list>
|
||||
`,
|
||||
@@ -177,8 +169,8 @@ Vue.component('lnbits-extension-list', {
|
||||
}
|
||||
})
|
||||
|
||||
Vue.component('lnbits-admin-ui', {
|
||||
props: ['showNode'],
|
||||
Vue.component('lnbits-manage', {
|
||||
props: ['showAdmin', 'showNode'],
|
||||
data: function () {
|
||||
return {
|
||||
extensions: [],
|
||||
@@ -186,22 +178,32 @@ Vue.component('lnbits-admin-ui', {
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<q-list v-if="user && user.admin" dense class="lnbits-drawer__q-list">
|
||||
<q-item-label header>Admin</q-item-label>
|
||||
<q-item clickable tag="a" :href="['/admin?usr=', user.id].join('')">
|
||||
<q-list v-if="user" dense class="lnbits-drawer__q-list">
|
||||
<q-item-label header v-text="$t('manage')"></q-item-label>
|
||||
<div v-if="user.admin">
|
||||
<q-item v-if='showAdmin' clickable tag="a" :href="['/admin?usr=', user.id].join('')">
|
||||
<q-item-section side>
|
||||
<q-icon name="admin_panel_settings" color="grey-5" size="md"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label lines="1" class="text-caption" v-text="$t('server')"></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if='showNode' clickable tag="a" :href="['/node?usr=', user.id].join('')">
|
||||
<q-item-section side>
|
||||
<q-icon name="developer_board" color="grey-5" size="md"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label lines="1" class="text-caption" v-text="$t('node')"></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</div>
|
||||
<q-item clickable tag="a" :href="['/extensions?usr=', user.id].join('')">
|
||||
<q-item-section side>
|
||||
<q-icon name="admin_panel_settings" color="grey-5" size="md"></q-icon>
|
||||
<q-icon name="extension" color="grey-5" size="md"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label lines="1" class="text-caption" v-text="$t('manage_server')"></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-if='showNode' clickable tag="a" :href="['/node?usr=', user.id].join('')">
|
||||
<q-item-section side>
|
||||
<q-icon name="developer_board" color="grey-5" size="md"></q-icon>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label lines="1" class="text-caption" v-text="$t('manage_node')"></q-item-label>
|
||||
<q-item-label lines="1" class="text-caption" v-text="$t('extensions')"></q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
|
||||
Reference in New Issue
Block a user