mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-05-18 12:05:53 +00:00
fix(qr): lock QR code modules to black-on-white across all themes
AntD's <a-qrcode> defaults the module color to the active theme's text token. Under the dark and ultra-dark themes that text is a light gray, so the QR rendered low-contrast on the white canvas background and phones could not lock onto it. Pinned color="#000000" and bg-color="#ffffff" on every <a-qrcode> usage (share links in QrPanel, 2FA enrollment in TwoFactorModal, sub/json/clash codes on SubPage) so the contrast stays high regardless of panel theme.
This commit is contained in:
parent
2551a673c3
commit
26accfd8f7
3 changed files with 5 additions and 5 deletions
|
|
@ -47,7 +47,7 @@ function download() {
|
||||||
</div>
|
</div>
|
||||||
<div v-if="showQr" class="qr-panel-canvas">
|
<div v-if="showQr" class="qr-panel-canvas">
|
||||||
<a-qrcode class="qr-code" :value="value" :size="size" type="svg" :bordered="false"
|
<a-qrcode class="qr-code" :value="value" :size="size" type="svg" :bordered="false"
|
||||||
:title="t('copy')" @click="copy" />
|
color="#000000" bg-color="#ffffff" :title="t('copy')" @click="copy" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ async function copyToken() {
|
||||||
<p>{{ t('pages.settings.security.twoFactorModalFirstStep') }}</p>
|
<p>{{ t('pages.settings.security.twoFactorModalFirstStep') }}</p>
|
||||||
<div class="qr-wrap">
|
<div class="qr-wrap">
|
||||||
<a-qrcode class="qr-code" :value="qrValue" :size="180" type="svg" :bordered="false"
|
<a-qrcode class="qr-code" :value="qrValue" :size="180" type="svg" :bordered="false"
|
||||||
error-level="L" :title="t('copy')" @click="copyToken" />
|
color="#000000" bg-color="#ffffff" error-level="L" :title="t('copy')" @click="copyToken" />
|
||||||
<span class="qr-token">{{ token }}</span>
|
<span class="qr-token">{{ token }}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-divider />
|
<a-divider />
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ const themeClass = computed(() => ({
|
||||||
<div class="qr-box">
|
<div class="qr-box">
|
||||||
<a-tag color="purple" class="qr-tag">{{ t('pages.settings.subSettings') }}</a-tag>
|
<a-tag color="purple" class="qr-tag">{{ t('pages.settings.subSettings') }}</a-tag>
|
||||||
<a-qrcode class="qr-code" :value="subUrl" :size="QR_SIZE" type="svg" :bordered="false"
|
<a-qrcode class="qr-code" :value="subUrl" :size="QR_SIZE" type="svg" :bordered="false"
|
||||||
:title="t('copy')" @click="copy(subUrl)" />
|
color="#000000" bg-color="#ffffff" :title="t('copy')" @click="copy(subUrl)" />
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="subJsonUrl" :xs="24" :sm="12" class="qr-col">
|
<a-col v-if="subJsonUrl" :xs="24" :sm="12" class="qr-col">
|
||||||
|
|
@ -213,14 +213,14 @@ const themeClass = computed(() => ({
|
||||||
{{ t('pages.settings.subSettings') }} JSON
|
{{ t('pages.settings.subSettings') }} JSON
|
||||||
</a-tag>
|
</a-tag>
|
||||||
<a-qrcode class="qr-code" :value="subJsonUrl" :size="QR_SIZE" type="svg" :bordered="false"
|
<a-qrcode class="qr-code" :value="subJsonUrl" :size="QR_SIZE" type="svg" :bordered="false"
|
||||||
:title="t('copy')" @click="copy(subJsonUrl)" />
|
color="#000000" bg-color="#ffffff" :title="t('copy')" @click="copy(subJsonUrl)" />
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col v-if="subClashUrl" :xs="24" :sm="12" class="qr-col">
|
<a-col v-if="subClashUrl" :xs="24" :sm="12" class="qr-col">
|
||||||
<div class="qr-box">
|
<div class="qr-box">
|
||||||
<a-tag color="purple" class="qr-tag">Clash / Mihomo</a-tag>
|
<a-tag color="purple" class="qr-tag">Clash / Mihomo</a-tag>
|
||||||
<a-qrcode class="qr-code" :value="subClashUrl" :size="QR_SIZE" type="svg" :bordered="false"
|
<a-qrcode class="qr-code" :value="subClashUrl" :size="QR_SIZE" type="svg" :bordered="false"
|
||||||
:title="t('copy')" @click="copy(subClashUrl)" />
|
color="#000000" bg-color="#ffffff" :title="t('copy')" @click="copy(subClashUrl)" />
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue