fix(window,login): grant set-title capability + shrink login logo 20%
- Add core:window:allow-set-title to capabilities/default.json. Tauri 2 rejects setTitle() from the frontend unless the capability is explicitly granted; without this the window-title feature silently fell back to "QBZ" in every case. - Login logo: 175px -> 140px (-20%) per feedback. - Drop the debug console logging on the title effect now that the wiring is confirmed working; keep the warn-on-failure. cc
This commit is contained in:
3 files changed
+9
-6
No files matched your search
@@ -28,6 +28,7 @@
|
||||
"core:window:allow-inner-size",
|
||||
"core:window:allow-inner-position",
|
||||
"core:window:allow-set-position",
|
||||
"core:window:allow-set-title",
|
||||
"core:webview:default",
|
||||
"core:webview:allow-create-webview-window",
|
||||
"core:webview:allow-webview-close",
|
||||
|
||||
@@ -485,8 +485,8 @@
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
width: 140px;
|
||||
height: 140px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
|
||||
@@ -3952,18 +3952,20 @@
|
||||
// Depends on the store preference version + currentTrack so it reacts to
|
||||
// both setting changes and track changes immediately.
|
||||
$effect(() => {
|
||||
// Track dependencies explicitly so the effect re-runs on preference change.
|
||||
void windowTitlePrefVersion;
|
||||
const enabled = getWindowTitleEnabled();
|
||||
const template = getWindowTitleTemplate();
|
||||
const track = currentTrack;
|
||||
const trackTitle = track?.title;
|
||||
const trackArtist = track?.artist;
|
||||
const trackAlbum = track?.album;
|
||||
|
||||
let nextTitle = 'QBZ';
|
||||
if (enabled && track) {
|
||||
const rendered = renderWindowTitle(template, {
|
||||
artist: track.artist,
|
||||
title: track.title,
|
||||
album: track.album,
|
||||
artist: trackArtist,
|
||||
title: trackTitle,
|
||||
album: trackAlbum,
|
||||
});
|
||||
if (rendered.length > 0) {
|
||||
nextTitle = rendered;
|
||||
|
||||
Reference in new issue
Block a user