style(ui): apply biome recos
This commit is contained in:
@@ -796,8 +796,7 @@ const contextMenus = {
|
||||
const dialogHeader = shareDialog.querySelector('.share-dialog-header');
|
||||
if (dialogHeader) {
|
||||
const headerSpan = dialogHeader.querySelector('span');
|
||||
const titleText =
|
||||
itemType === 'file' ? i18n.t('dialogs.share_file') : i18n.t('dialogs.share_folder');
|
||||
const titleText = itemType === 'file' ? i18n.t('dialogs.share_file') : i18n.t('dialogs.share_folder');
|
||||
if (headerSpan) {
|
||||
headerSpan.textContent = titleText;
|
||||
} else {
|
||||
@@ -995,10 +994,7 @@ const contextMenus = {
|
||||
ui.setSharedVisualState(item.id, item.type, true);
|
||||
|
||||
// Show success message
|
||||
ui.showNotification(
|
||||
i18n.t('notifications.link_created'),
|
||||
i18n.t('notifications.share_success')
|
||||
);
|
||||
ui.showNotification(i18n.t('notifications.link_created'), i18n.t('notifications.share_success'));
|
||||
} catch (error) {
|
||||
console.error('Error creating shared link:', error);
|
||||
ui.showNotification('Error', error.message || 'Could not create shared link');
|
||||
@@ -1172,10 +1168,7 @@ const contextMenus = {
|
||||
}
|
||||
|
||||
await resp.json();
|
||||
ui.showNotification(
|
||||
i18n.t('music.added'),
|
||||
`${files.length} ${files.length === 1 ? 'track' : 'tracks'} ${i18n.t('music.added_to_playlist')}`
|
||||
);
|
||||
ui.showNotification(i18n.t('music.added'), `${files.length} ${files.length === 1 ? 'track' : 'tracks'} ${i18n.t('music.added_to_playlist')}`);
|
||||
|
||||
this.closePlaylistDialog();
|
||||
|
||||
|
||||
@@ -994,10 +994,7 @@ const fileOps = {
|
||||
console.log('Response status:', response.status);
|
||||
|
||||
if (response.ok) {
|
||||
ui.showNotification(
|
||||
i18n.t('notifications.file_renamed'),
|
||||
i18n.t('notifications.file_renamed_to', { name: newName })
|
||||
);
|
||||
ui.showNotification(i18n.t('notifications.file_renamed'), i18n.t('notifications.file_renamed_to', { name: newName }));
|
||||
return true;
|
||||
} else {
|
||||
const errorText = await response.text();
|
||||
|
||||
@@ -110,10 +110,7 @@ const favorites = {
|
||||
|
||||
// Notify user
|
||||
if (ui?.showNotification) {
|
||||
ui.showNotification(
|
||||
i18n.t('favorites.added_title'),
|
||||
`"${name}" ${i18n.t('favorites.added_msg')}`
|
||||
);
|
||||
ui.showNotification(i18n.t('favorites.added_title'), `"${name}" ${i18n.t('favorites.added_msg')}`);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -145,10 +142,7 @@ const favorites = {
|
||||
this._cache.delete(this._cacheKey(id, type));
|
||||
|
||||
if (ui?.showNotification) {
|
||||
ui.showNotification(
|
||||
i18n.t('favorites.removed_title'),
|
||||
`"${itemName}" ${i18n.t('favorites.removed_msg')}`
|
||||
);
|
||||
ui.showNotification(i18n.t('favorites.removed_title'), `"${itemName}" ${i18n.t('favorites.removed_msg')}`);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -183,7 +183,6 @@ const musicView = {
|
||||
const listEl = document.getElementById('music-playlist-list');
|
||||
if (!listEl) return;
|
||||
|
||||
|
||||
if (this.playlists.length === 0) {
|
||||
listEl.innerHTML = `
|
||||
<div class="music-empty">
|
||||
@@ -342,7 +341,6 @@ const musicView = {
|
||||
const trackListEl = document.getElementById('music-track-list');
|
||||
if (!trackListEl) return;
|
||||
|
||||
|
||||
if (this.currentTracks.length === 0) {
|
||||
trackListEl.innerHTML = `
|
||||
<div class="music-empty">
|
||||
@@ -477,7 +475,6 @@ const musicView = {
|
||||
},
|
||||
|
||||
async _showCreatePlaylistDialog() {
|
||||
|
||||
const name = await Modal.prompt({
|
||||
title: i18n.t('music.create_playlist'),
|
||||
label: i18n.t('music.playlist_name'),
|
||||
@@ -531,7 +528,6 @@ const musicView = {
|
||||
},
|
||||
|
||||
async _deletePlaylist() {
|
||||
|
||||
if (!this.currentPlaylist) return;
|
||||
|
||||
const confirmed = await new Promise((resolve) => {
|
||||
@@ -1686,7 +1682,6 @@ const musicPlayer = {
|
||||
const queueList = document.getElementById('player-queue-list');
|
||||
if (!queueList) return;
|
||||
|
||||
|
||||
if (this.queue.length === 0) {
|
||||
queueList.innerHTML = `
|
||||
<div class="player-queue-empty">
|
||||
|
||||
Reference in New Issue
Block a user