add i18n to lastfm button
This commit is contained in:
parent
6774926b6a
commit
2108dd5975
2 changed files with 7 additions and 4 deletions
|
@ -3296,12 +3296,12 @@ const app = new Vue({
|
|||
const element = document.getElementById('lfmConnect');
|
||||
// new key : f9986d12aab5a0fe66193c559435ede3
|
||||
window.open('https://www.last.fm/api/auth?api_key=f9986d12aab5a0fe66193c559435ede3&cb=cider://auth/lastfm');
|
||||
element.innerText = 'Connecting...';
|
||||
element.innerText = app.getLz('term.connecting') + '...';
|
||||
|
||||
/* Just a timeout for the button */
|
||||
setTimeout(() => {
|
||||
if (element.innerText === 'Connecting...') {
|
||||
element.innerText = 'Connect';
|
||||
if (element.innerText === app.getLz('term.connecting') +'...') {
|
||||
element.innerText = app.getLz('term.connect');
|
||||
console.warn('[LastFM] Attempted connection timed out.');
|
||||
}
|
||||
}, 20000);
|
||||
|
@ -3309,7 +3309,7 @@ const app = new Vue({
|
|||
ipcRenderer.on('LastfmAuthenticated', function(_event, lfmAuthKey) {
|
||||
app.cfg.lastfm.auth_token = lfmAuthKey;
|
||||
app.cfg.lastfm.enabled = true;
|
||||
element.innerHTML = `Disconnect\n<p style="font-size: 8px"><i>(Authed: ${lfmAuthKey})</i></p>`;
|
||||
element.innerHTML = `${app.getLz('term.disconnect')}\n<p style="font-size: 8px"><i>(${app.getLz('term.authed')}: ${lfmAuthKey})</i></p>`;
|
||||
element.onclick = app.LastFMDeauthorize;
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue