mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
hide version with log
This commit is contained in:
parent
ca4ebeba15
commit
62fd78b82d
2 changed files with 57 additions and 30 deletions
|
|
@ -1242,10 +1242,16 @@ export class VibeTunnelApp extends LitElement {
|
||||||
></ssh-key-manager>
|
></ssh-key-manager>
|
||||||
|
|
||||||
<!-- Version and logs link in bottom right -->
|
<!-- Version and logs link in bottom right -->
|
||||||
|
${
|
||||||
|
this.showLogLink
|
||||||
|
? html`
|
||||||
<div class="fixed bottom-4 right-4 text-dark-text-muted text-xs font-mono z-20">
|
<div class="fixed bottom-4 right-4 text-dark-text-muted text-xs font-mono z-20">
|
||||||
${this.showLogLink ? html`<a href="/logs" class="hover:text-dark-text transition-colors">Logs</a>` : ''}
|
<a href="/logs" class="hover:text-dark-text transition-colors">Logs</a>
|
||||||
<span class="${this.showLogLink ? 'ml-2' : ''}">v${VERSION}</span>
|
<span class="ml-2">v${VERSION}</span>
|
||||||
</div>
|
</div>
|
||||||
|
`
|
||||||
|
: ''
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import { html, LitElement } from 'lit';
|
import { html, LitElement } from 'lit';
|
||||||
import { customElement, property, state } from 'lit/decorators.js';
|
import { customElement, property, state } from 'lit/decorators.js';
|
||||||
import { createLogger } from '../utils/logger.js';
|
import { createLogger } from '../utils/logger.js';
|
||||||
|
import { responsiveObserver } from '../utils/responsive-utils.js';
|
||||||
|
|
||||||
const logger = createLogger('app-settings');
|
const logger = createLogger('app-settings');
|
||||||
|
|
||||||
|
|
@ -24,10 +25,24 @@ export class AppSettings extends LitElement {
|
||||||
|
|
||||||
@property({ type: Boolean }) open = false;
|
@property({ type: Boolean }) open = false;
|
||||||
@state() private preferences: AppPreferences = DEFAULT_PREFERENCES;
|
@state() private preferences: AppPreferences = DEFAULT_PREFERENCES;
|
||||||
|
@state() private isMobile = false;
|
||||||
|
private unsubscribeResponsive?: () => void;
|
||||||
|
|
||||||
connectedCallback() {
|
connectedCallback() {
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
this.loadPreferences();
|
this.loadPreferences();
|
||||||
|
|
||||||
|
// Subscribe to responsive changes
|
||||||
|
this.unsubscribeResponsive = responsiveObserver.subscribe((state) => {
|
||||||
|
this.isMobile = state.isMobile;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
disconnectedCallback() {
|
||||||
|
super.disconnectedCallback();
|
||||||
|
if (this.unsubscribeResponsive) {
|
||||||
|
this.unsubscribeResponsive();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private loadPreferences() {
|
private loadPreferences() {
|
||||||
|
|
@ -109,7 +124,10 @@ export class AppSettings extends LitElement {
|
||||||
|
|
||||||
<!-- Content -->
|
<!-- Content -->
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<!-- Direct Keyboard Setting -->
|
<!-- Direct Keyboard Setting (Mobile Only) -->
|
||||||
|
${
|
||||||
|
this.isMobile
|
||||||
|
? html`
|
||||||
<div class="flex items-center justify-between py-3">
|
<div class="flex items-center justify-between py-3">
|
||||||
<div class="flex-1 pr-4">
|
<div class="flex-1 pr-4">
|
||||||
<label class="text-dark-text text-sm font-medium" for="direct-keyboard-toggle">
|
<label class="text-dark-text text-sm font-medium" for="direct-keyboard-toggle">
|
||||||
|
|
@ -135,9 +153,12 @@ export class AppSettings extends LitElement {
|
||||||
></span>
|
></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
`
|
||||||
|
: ''
|
||||||
|
}
|
||||||
|
|
||||||
<!-- Show Log Link Setting -->
|
<!-- Show Log Link Setting -->
|
||||||
<div class="flex items-center justify-between py-3 border-t border-dark-border">
|
<div class="flex items-center justify-between py-3 ${this.isMobile ? 'border-t border-dark-border' : ''}">
|
||||||
<div class="flex-1 pr-4">
|
<div class="flex-1 pr-4">
|
||||||
<label class="text-dark-text text-sm font-medium" for="show-log-link-toggle">
|
<label class="text-dark-text text-sm font-medium" for="show-log-link-toggle">
|
||||||
Show log link
|
Show log link
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue