Added settings links and link for theme (#2860)

This commit is contained in:
Arc 2024-12-20 08:07:50 +00:00 committed by GitHub
parent 78437eaf94
commit 0c5b909c7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 50 additions and 1 deletions

View file

@ -70,6 +70,7 @@
/>
</template>
</q-input>
<q-select
v-else-if="['component', 'response_code','request_method'].includes(col.name)"
v-model="searchData[col.name]"
@ -82,6 +83,11 @@
<span v-else v-text="col.label"></span>
</q-th>
<q-th>
<q-btn flat round icon="settings" tag="a" href="/admin#audit"
><q-tooltip v-text="$t('admin_settings')"></q-tooltip
></q-btn>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">

View file

@ -286,6 +286,16 @@
</div>
</q-tab-panel>
<q-tab-panel name="theme">
<q-btn
v-if="g.user.admin"
class="absolute-top-right"
flat
round
icon="settings"
tag="a"
href="/admin#site_customisation"
><q-tooltip v-text="$t('admin_settings')"></q-tooltip
></q-btn>
<div class="row q-mb-md">
<div class="col-4"><span v-text="$t('language')"></span></div>
<div class="col-8">

View file

@ -49,6 +49,15 @@
v-text="$t('new_version') + ` (${updatableExtensions?.length})`"
></span>
</q-badge>
<q-btn
v-if="g.user.admin"
flat
round
icon="settings"
tag="a"
href="/admin#extensions"
><q-tooltip v-text="$t('admin_settings')"></q-tooltip
></q-btn>
</q-tabs>
</div>
</div>

File diff suppressed because one or more lines are too long

View file

@ -254,6 +254,7 @@ window.localisation.en = {
gradient_background: 'Gradient Background',
language: 'Language',
color_scheme: 'Color Scheme',
admin_settings: 'Admin Settings',
extension_cost: 'This release requires a payment of minimum {cost} sats.',
extension_paid_sats: 'You have already paid {paid_sats} sats.',
release_details_error: 'Cannot get the release details.',

View file

@ -214,5 +214,9 @@ window.app = Vue.createApp({
if (this.$q.localStorage.getItem('lnbits.border')) {
this.applyBorder()
}
const hash = window.location.hash.replace('#', '')
if (hash) {
this.tab = hash
}
}
})

View file

@ -122,6 +122,10 @@ window.app = Vue.createApp({
this.getSettings()
this.getAudit()
this.balance = +'{{ balance|safe }}'
const hash = window.location.hash.replace('#', '')
if (hash) {
this.tab = hash
}
},
computed: {
lnbitsVersion() {

View file

@ -131,6 +131,21 @@
<q-item-label> </q-item-label>
</q-item-section>
</q-item>
<q-item tag="a" href="/account#theme" clickable v-close-popup
><q-item-section>
<q-icon
:name="$q.dark.isActive ? 'dark_mode' : 'light_mode'"
/>
</q-item-section>
<q-item-section>
<q-item-label>
<span v-text="$t('theme')"></span>
</q-item-label>
</q-item-section>
<q-item-section>
<q-item-label> </q-item-label>
</q-item-section>
</q-item>
<q-separator></q-separator>
<q-item clickable v-close-popup @click="logout"
><q-item-section>