2020-06-24 20:54:36 +00:00
|
|
|
<template>
|
|
|
|
<div id="settings_tab" class="main_tabcontent fixed_footer">
|
2020-07-16 22:11:28 +00:00
|
|
|
<h2 class="page_heading">{{ $t('settings.title') }}</h2>
|
2020-06-24 20:54:36 +00:00
|
|
|
|
|
|
|
<div id="logged_in_info" ref="loggedInInfo">
|
|
|
|
<img id="settings_picture" src="" alt="Profile Picture" ref="userpicture" class="circle" />
|
2020-07-17 19:20:08 +00:00
|
|
|
<p>{{ $t('settings.login.loggedIn') }} <strong id="settings_username" ref="username"></strong></p>
|
2020-07-18 10:59:39 +00:00
|
|
|
<button id="settings_btn_logout" @click="logout">{{ $t('settings.login.logout') }}</button>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-if="accounts.length" id="family_account" v-model="accountNum" @change="changeAccount">
|
|
|
|
<option v-for="(account, i) in accounts" :value="i.toString()">{{ account.BLOG_NAME }}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-17 19:20:08 +00:00
|
|
|
<i class="material-icons">person</i>{{ $t('settings.login.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
<div class="inline-flex">
|
|
|
|
<input autocomplete="off" type="password" id="login_input_arl" ref="loginInput" placeholder="ARL" />
|
|
|
|
<button id="settings_btn_copyArl" @click="copyARLtoClipboard">
|
|
|
|
<i class="material-icons">assignment</i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<a href="https://notabug.org/RemixDevs/DeezloaderRemix/wiki/Login+via+userToken" target="_blank">
|
2020-07-16 22:11:28 +00:00
|
|
|
{{ $t('settings.login.arl.question') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</a>
|
2020-07-16 22:11:28 +00:00
|
|
|
<button id="settings_btn_updateArl" @click="login" style="width:100%;">
|
|
|
|
{{ $t('settings.login.arl.update') }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
|
|
|
<i class="material-icons">language</i>{{ $t('settings.languages') }}
|
|
|
|
</h3>
|
|
|
|
<span
|
|
|
|
v-for="locale in locales"
|
|
|
|
:key="locale"
|
|
|
|
style="width: 50px; height: 50px; cursor:pointer; border: 1px solid var(--foreground); flex: 1 50px; display: flex; justify-content: center; align-items: center;"
|
|
|
|
:data-locale="locale"
|
|
|
|
@click="$i18n.locale = locale"
|
|
|
|
>
|
|
|
|
{{ locale.toUpperCase() }}
|
|
|
|
</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-17 19:20:08 +00:00
|
|
|
<i class="material-icons">web</i>{{ $t('settings.appearance.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="changeSlimDownloads" />
|
2020-07-17 19:20:08 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.appearance.slimDownloadTab') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-17 19:20:08 +00:00
|
|
|
<i class="material-icons">folder</i>{{ $t('settings.downloadPath.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
<input type="text" v-model="settings.downloadLocation" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-18 10:59:39 +00:00
|
|
|
<i class="material-icons">font_download</i>{{ $t('settings.templates.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
|
2020-07-18 16:06:07 +00:00
|
|
|
<p>{{ $t('settings.templates.tracknameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.tracknameTemplate" />
|
|
|
|
|
2020-07-18 10:59:39 +00:00
|
|
|
<p>{{ $t('settings.templates.albumTracknameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.albumTracknameTemplate" />
|
|
|
|
|
2020-07-18 10:59:39 +00:00
|
|
|
<p>{{ $t('settings.templates.playlistTracknameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.playlistTracknameTemplate" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-18 10:59:39 +00:00
|
|
|
<i class="material-icons">create_new_folder</i>{{ $t('settings.folders.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
<div class="settings-container">
|
|
|
|
<div class="settings-container__third">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createPlaylistFolder" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.folders.createPlaylistFolder') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<div class="input_group" v-if="settings.createPlaylistFolder">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.folders.playlistNameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.playlistNameTemplate" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="settings-container__third">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createArtistFolder" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.folders.createArtistFolder') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="input_group" v-if="settings.createArtistFolder">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.folders.artistNameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.artistNameTemplate" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="settings-container__third">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createAlbumFolder" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.folders.createAlbumFolder') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="input_group" v-if="settings.createAlbumFolder">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.folders.albumNameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.albumNameTemplate" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createCDFolder" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.folders.createCDFolder') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createStructurePlaylist" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.folders.createStructurePlaylist') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createSingleFolder" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.folders.createSingleFolder') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-18 10:59:39 +00:00
|
|
|
<i class="material-icons">title</i>{{ $t('settings.trackTitles.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="settings-container">
|
|
|
|
<div class="settings-container__third settings-container__third--only-checkbox">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.padTracks" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.trackTitles.padTracks') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="settings-container__third">
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.trackTitles.paddingSize') }}</p>
|
2020-07-17 19:20:08 +00:00
|
|
|
<input max="10" type="number" v-model="settings.paddingSize" />
|
2020-06-24 20:54:36 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="settings-container__third">
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.trackTitles.illegalCharacterReplacer') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.illegalCharacterReplacer" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-18 10:59:39 +00:00
|
|
|
<i class="material-icons">get_app</i>{{ $t('settings.downloads.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.downloads.queueConcurrency') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="number" v-model.number="settings.queueConcurrency" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.downloads.maxBitrate.title') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-model="settings.maxBitrate">
|
2020-07-18 10:59:39 +00:00
|
|
|
<option value="9">{{ $t('settings.downloads.maxBitrate.9') }}</option>
|
|
|
|
<option value="3">{{ $t('settings.downloads.maxBitrate.3') }}</option>
|
|
|
|
<option value="1">{{ $t('settings.downloads.maxBitrate.1') }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.downloads.overwriteFile.title') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-model="settings.overwriteFile">
|
2020-07-18 10:59:39 +00:00
|
|
|
<option value="y">{{ $t('settings.downloads.overwriteFile.y') }}</option>
|
|
|
|
<option value="n">{{ $t('settings.downloads.overwriteFile.n') }}</option>
|
|
|
|
<option value="t">{{ $t('settings.downloads.overwriteFile.t') }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-container">
|
|
|
|
<div class="settings-container__third settings-container__third--only-checkbox">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.fallbackBitrate" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.fallbackBitrate') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.fallbackSearch" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.fallbackSearch') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="settings-container__third settings-container__third--only-checkbox">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.logErrors" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.logErrors') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.logSearched" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.logSearched') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<div class="settings-container__third settings-container__third--only-checkbox">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.syncedLyrics" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.syncedLyrics') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.createM3U8File" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.createM3U8File') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group" v-if="settings.createM3U8File">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.downloads.playlistFilenameTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.playlistFilenameTemplate" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.saveDownloadQueue" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.downloads.saveDownloadQueue') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-18 10:59:39 +00:00
|
|
|
<i class="material-icons">album</i>{{ $t('settings.covers.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.saveArtwork" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.covers.saveArtwork') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="input_group" v-if="settings.saveArtwork">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.covers.coverImageTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.coverImageTemplate" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.saveArtworkArtist" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.covers.saveArtworkArtist') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="input_group" v-if="settings.saveArtworkArtist">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.covers.artistImageTemplate') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.artistImageTemplate" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.covers.localArtworkSize') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="number" min="100" max="1800" step="100" v-model.number="settings.localArtworkSize" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.covers.embeddedArtworkSize') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="number" min="100" max="1800" step="100" v-model.number="settings.embeddedArtworkSize" />
|
|
|
|
</div>
|
|
|
|
|
2020-07-18 16:22:45 +00:00
|
|
|
<div class="input_group">
|
|
|
|
<p class="input_group_text">{{ $t('settings.covers.localArtworkFormat.title') }}</p>
|
|
|
|
<select v-model="settings.localArtworkFormat">
|
|
|
|
<option value="jpg">{{ $t('settings.covers.localArtworkFormat.jpg') }}</option>
|
|
|
|
<option value="png">{{ $t('settings.covers.localArtworkFormat.png') }}</option>
|
|
|
|
<option value="jpg,png">{{ $t('settings.covers.localArtworkFormat.both') }}</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
2020-06-24 20:54:36 +00:00
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.covers.jpegImageQuality') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="number" min="1" max="100" v-model.number="settings.jpegImageQuality" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
2020-07-18 10:59:39 +00:00
|
|
|
<i class="material-icons" style="width: 1em; height: 1em;">bookmarks</i>{{ $t('settings.tags.head') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="settings-container">
|
|
|
|
<div class="settings-container__half">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.title" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.title') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.artist" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.artist') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.album" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.album') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.cover" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.cover') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.trackNumber" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.trackNumber') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.trackTotal" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.trackTotal') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.discNumber" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.discNumber') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.discTotal" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.discTotal') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.albumArtist" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.albumArtist') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.genre" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.genre') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.year" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.year') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.date" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.date') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-container__half">
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.explicit" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.explicit') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.isrc" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.isrc') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.length" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.length') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.barcode" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.barcode') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.bpm" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.bpm') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.replayGain" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.replayGain') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.label" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.label') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.lyrics" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.lyrics') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.copyright" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.copyright') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.composer" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.composer') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.involvedPeople" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.tags.involvedPeople') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
2020-07-18 16:06:07 +00:00
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
|
|
|
<i class="material-icons">list</i>{{ $t('settings.other.title') }}
|
|
|
|
</h3>
|
2020-06-24 20:54:36 +00:00
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.savePlaylistAsCompilation" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.other.savePlaylistAsCompilation') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.useNullSeparator" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.other.useNullSeparator') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.tags.saveID3v1" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.other.saveID3v1') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 16:22:45 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.multiArtistSeparator.title') }}</p>
|
|
|
|
<select v-model="settings.tags.multiArtistSeparator">
|
|
|
|
<option value="nothing">{{ $t('settings.other.multiArtistSeparator.nothing') }}</option>
|
|
|
|
<option value="default">{{ $t('settings.other.multiArtistSeparator.default') }}</option>
|
|
|
|
<option value="andFeat">{{ $t('settings.other.multiArtistSeparator.andFeat') }}</option>
|
|
|
|
<option value=" & ">{{ $t('settings.other.multiArtistSeparator.using', [' & ']) }}</option>
|
|
|
|
<option value=",">{{ $t('settings.other.multiArtistSeparator.using', [',']) }}</option>
|
|
|
|
<option value=", ">{{ $t('settings.other.multiArtistSeparator.using', [', ']) }}</option>
|
|
|
|
<option value="/">{{ $t('settings.other.multiArtistSeparator.using', ['/']) }}</option>
|
|
|
|
<option value=" / ">{{ $t('settings.other.multiArtistSeparator.using', [' / ']) }}</option>
|
|
|
|
<option value=";">{{ $t('settings.other.multiArtistSeparator.using', [';']) }}</option>
|
|
|
|
<option value="; ">{{ $t('settings.other.multiArtistSeparator.using', ['; ']) }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
2020-07-18 16:22:45 +00:00
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.singleAlbumArtist" />
|
|
|
|
<span class="checkbox_text">{{ $t('settings.other.singleAlbumArtist') }}</span>
|
|
|
|
</label>
|
|
|
|
|
2020-06-24 20:54:36 +00:00
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.albumVariousArtists" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.other.albumVariousArtists') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.removeAlbumVersion" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.other.removeAlbumVersion') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<label class="with_checkbox">
|
|
|
|
<input type="checkbox" v-model="settings.removeDuplicateArtists" />
|
2020-07-18 10:59:39 +00:00
|
|
|
<span class="checkbox_text">{{ $t('settings.other.removeDuplicateArtists') }}</span>
|
2020-06-24 20:54:36 +00:00
|
|
|
</label>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.dateFormat.title') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-model="settings.dateFormat">
|
2020-07-18 16:06:07 +00:00
|
|
|
<option value="Y-M-D">{{
|
|
|
|
`${$t('settings.other.dateFormat.year')}-${$t('settings.other.dateFormat.month')}-${$t(
|
|
|
|
'settings.other.dateFormat.day'
|
|
|
|
)}`
|
|
|
|
}}</option>
|
|
|
|
<option value="Y-D-M">{{
|
|
|
|
`${$t('settings.other.dateFormat.year')}-${$t('settings.other.dateFormat.day')}-${$t(
|
|
|
|
'settings.other.dateFormat.month'
|
|
|
|
)}`
|
|
|
|
}}</option>
|
|
|
|
<option value="D-M-Y">{{
|
|
|
|
`${$t('settings.other.dateFormat.day')}-${$t('settings.other.dateFormat.month')}-${$t(
|
|
|
|
'settings.other.dateFormat.year'
|
|
|
|
)}`
|
|
|
|
}}</option>
|
|
|
|
<option value="M-D-Y">{{
|
|
|
|
`${$t('settings.other.dateFormat.month')}-${$t('settings.other.dateFormat.day')}-${$t(
|
|
|
|
'settings.other.dateFormat.year'
|
|
|
|
)}`
|
|
|
|
}}</option>
|
2020-07-18 10:59:39 +00:00
|
|
|
<option value="Y">{{ $t('settings.other.dateFormat.year') }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.featuredToTitle.title') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-model="settings.featuredToTitle">
|
2020-07-18 10:59:39 +00:00
|
|
|
<option value="0">{{ $t('settings.other.featuredToTitle.0') }}</option>
|
|
|
|
<option value="1">{{ $t('settings.other.featuredToTitle.1') }}</option>
|
|
|
|
<option value="3">{{ $t('settings.other.featuredToTitle.3') }}</option>
|
|
|
|
<option value="2">{{ $t('settings.other.featuredToTitle.2') }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.titleCasing') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-model="settings.titleCasing">
|
2020-07-18 10:59:39 +00:00
|
|
|
<option value="nothing">{{ $t('settings.other.casing.nothing') }}</option>
|
|
|
|
<option value="lower">{{ $t('settings.other.casing.lower') }}</option>
|
|
|
|
<option value="upper">{{ $t('settings.other.casing.upper') }}</option>
|
|
|
|
<option value="start">{{ $t('settings.other.casing.start') }}</option>
|
|
|
|
<option value="sentence">{{ $t('settings.other.casing.sentence') }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.artistCasing') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<select v-model="settings.artistCasing">
|
2020-07-18 10:59:39 +00:00
|
|
|
<option value="nothing">{{ $t('settings.other.casing.nothing') }}</option>
|
|
|
|
<option value="lower">{{ $t('settings.other.casing.lower') }}</option>
|
|
|
|
<option value="upper">{{ $t('settings.other.casing.upper') }}</option>
|
|
|
|
<option value="start">{{ $t('settings.other.casing.start') }}</option>
|
|
|
|
<option value="sentence">{{ $t('settings.other.casing.sentence') }}</option>
|
2020-06-24 20:54:36 +00:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.previewVolume') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input
|
|
|
|
type="range"
|
|
|
|
@change="updateMaxVolume"
|
|
|
|
min="0"
|
|
|
|
max="100"
|
|
|
|
step="1"
|
|
|
|
class="slider"
|
|
|
|
v-model.number="previewVolume.preview_max_volume"
|
|
|
|
/>
|
|
|
|
<span>{{ previewVolume.preview_max_volume }}%</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.other.executeCommand.title') }}</p>
|
|
|
|
<p class="secondary-text">{{ $t('settings.other.executeCommand.description') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="settings.executeCommand" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="settings-group">
|
|
|
|
<h3 class="settings-group__header settings-group__header--with-icon">
|
|
|
|
<svg id="spotify_icon" enable-background="new 0 0 24 24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<path
|
|
|
|
d="m12 24c6.624 0 12-5.376 12-12s-5.376-12-12-12-12 5.376-12 12 5.376 12 12 12zm4.872-6.344v.001c-.807 0-3.356-2.828-10.52-1.36-.189.049-.436.126-.576.126-.915 0-1.09-1.369-.106-1.578 3.963-.875 8.013-.798 11.467 1.268.824.526.474 1.543-.265 1.543zm1.303-3.173c-.113-.03-.08.069-.597-.203-3.025-1.79-7.533-2.512-11.545-1.423-.232.063-.358.126-.576.126-1.071 0-1.355-1.611-.188-1.94 4.716-1.325 9.775-.552 13.297 1.543.392.232.547.533.547.953-.005.522-.411.944-.938.944zm-13.627-7.485c4.523-1.324 11.368-.906 15.624 1.578 1.091.629.662 2.22-.498 2.22l-.001-.001c-.252 0-.407-.063-.625-.189-3.443-2.056-9.604-2.549-13.59-1.436-.175.048-.393.125-.625.125-.639 0-1.127-.499-1.127-1.142 0-.657.407-1.029.842-1.155z"
|
|
|
|
/>
|
|
|
|
</svg>
|
2020-07-18 10:59:39 +00:00
|
|
|
{{ $t('settings.spotify.title') }}
|
2020-06-24 20:54:36 +00:00
|
|
|
</h3>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.spotify.clientID') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="spotifyFeatures.clientId" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.spotify.clientSecret') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="password" v-model="spotifyFeatures.clientSecret" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input_group">
|
2020-07-18 10:59:39 +00:00
|
|
|
<p class="input_group_text">{{ $t('settings.spotify.username') }}</p>
|
2020-06-24 20:54:36 +00:00
|
|
|
<input type="text" v-model="spotifyUser" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<footer>
|
2020-07-18 10:59:39 +00:00
|
|
|
<button @click="resetSettings">{{ $t('settings.reset') }}</button>
|
|
|
|
<button @click="saveSettings">{{ $t('settings.save') }}</button>
|
2020-06-24 20:54:36 +00:00
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-07-16 22:11:28 +00:00
|
|
|
import { toast } from '@/utils/toasts'
|
|
|
|
import { socket } from '@/utils/socket'
|
|
|
|
import EventBus from '@/utils/EventBus'
|
2020-06-24 20:54:36 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'the-settings-tab',
|
|
|
|
data: () => ({
|
2020-07-16 22:11:28 +00:00
|
|
|
locales: [],
|
2020-06-24 20:54:36 +00:00
|
|
|
settings: { tags: {} },
|
|
|
|
lastSettings: {},
|
|
|
|
spotifyFeatures: {},
|
|
|
|
lastCredentials: {},
|
|
|
|
defaultSettings: {},
|
|
|
|
lastUser: '',
|
|
|
|
spotifyUser: '',
|
|
|
|
slimDownloads: false,
|
|
|
|
previewVolume: window.vol,
|
|
|
|
accountNum: 0,
|
|
|
|
accounts: []
|
|
|
|
}),
|
|
|
|
computed: {
|
|
|
|
changeSlimDownloads: {
|
|
|
|
get() {
|
|
|
|
return this.slimDownloads
|
|
|
|
},
|
|
|
|
set(wantSlimDownloads) {
|
|
|
|
this.slimDownloads = wantSlimDownloads
|
|
|
|
document.getElementById('download_list').classList.toggle('slim', wantSlimDownloads)
|
|
|
|
localStorage.setItem('slimDownloads', wantSlimDownloads)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
revertSettings() {
|
|
|
|
this.settings = { ...this.lastSettings }
|
|
|
|
},
|
|
|
|
revertCredentials() {
|
|
|
|
this.spotifyCredentials = { ...this.lastCredentials }
|
|
|
|
this.spotifyUser = (' ' + this.lastUser).slice(1)
|
|
|
|
},
|
|
|
|
copyARLtoClipboard() {
|
|
|
|
let copyText = this.$refs.loginInput
|
|
|
|
|
|
|
|
copyText.setAttribute('type', 'text')
|
|
|
|
copyText.select()
|
|
|
|
copyText.setSelectionRange(0, 99999)
|
|
|
|
document.execCommand('copy')
|
|
|
|
copyText.setAttribute('type', 'password')
|
|
|
|
|
2020-07-18 10:59:39 +00:00
|
|
|
toast(this.$t('settings.toasts.ARLcopied'), 'assignment')
|
2020-06-24 20:54:36 +00:00
|
|
|
},
|
|
|
|
updateMaxVolume() {
|
|
|
|
localStorage.setItem('previewVolume', this.previewVolume.preview_max_volume)
|
|
|
|
},
|
|
|
|
saveSettings() {
|
|
|
|
this.lastSettings = { ...this.settings }
|
|
|
|
this.lastCredentials = { ...this.spotifyFeatures }
|
|
|
|
let changed = false
|
|
|
|
if (this.lastUser != this.spotifyUser) {
|
|
|
|
// force cloning without linking
|
|
|
|
this.lastUser = (' ' + this.spotifyUser).slice(1)
|
|
|
|
localStorage.setItem('spotifyUser', this.lastUser)
|
|
|
|
changed = true
|
|
|
|
}
|
|
|
|
|
|
|
|
socket.emit('saveSettings', this.lastSettings, this.lastCredentials, changed ? this.lastUser : false)
|
|
|
|
},
|
|
|
|
loadSettings(settings, spotifyCredentials, defaults = null) {
|
|
|
|
if (defaults) {
|
|
|
|
this.defaultSettings = { ...defaults }
|
|
|
|
}
|
|
|
|
|
|
|
|
this.lastSettings = { ...settings }
|
|
|
|
this.lastCredentials = { ...spotifyCredentials }
|
|
|
|
this.settings = settings
|
|
|
|
this.spotifyFeatures = spotifyCredentials
|
|
|
|
},
|
|
|
|
login() {
|
|
|
|
let arl = this.$refs.loginInput.value.trim()
|
|
|
|
if (arl != '' && arl != localStorage.getItem('arl')) {
|
|
|
|
socket.emit('login', arl, true, this.accountNum)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
changeAccount() {
|
|
|
|
socket.emit('changeAccount', this.accountNum)
|
|
|
|
},
|
|
|
|
accountChanged(user, accountNum) {
|
|
|
|
this.$refs.username.innerText = user.name
|
|
|
|
this.$refs.userpicture.src = `https://e-cdns-images.dzcdn.net/images/user/${user.picture}/125x125-000000-80-0-0.jpg`
|
|
|
|
this.accountNum = accountNum
|
|
|
|
localStorage.setItem('accountNum', this.accountNum)
|
|
|
|
},
|
|
|
|
initAccounts(accounts) {
|
|
|
|
this.accounts = accounts
|
|
|
|
},
|
|
|
|
logout() {
|
|
|
|
socket.emit('logout')
|
|
|
|
},
|
|
|
|
initSettings(settings, credentials, defaults) {
|
|
|
|
this.loadSettings(settings, credentials, defaults)
|
2020-07-18 10:59:39 +00:00
|
|
|
toast(this.$t('settings.toasts.init'), 'settings')
|
2020-06-24 20:54:36 +00:00
|
|
|
},
|
|
|
|
updateSettings(settings, credentials) {
|
|
|
|
this.loadSettings(settings, credentials)
|
2020-07-18 10:59:39 +00:00
|
|
|
toast(this.$t('settings.toasts.update'), 'settings')
|
2020-06-24 20:54:36 +00:00
|
|
|
},
|
|
|
|
resetSettings() {
|
|
|
|
this.settings = { ...this.defaultSettings }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted() {
|
2020-07-16 22:11:28 +00:00
|
|
|
this.locales = this.$i18n.availableLocales
|
|
|
|
|
2020-06-24 20:54:36 +00:00
|
|
|
EventBus.$on('settingsTab:revertSettings', this.revertSettings)
|
|
|
|
EventBus.$on('settingsTab:revertCredentials', this.revertCredentials)
|
|
|
|
|
|
|
|
this.$refs.loggedInInfo.classList.add('hide')
|
|
|
|
|
|
|
|
if (localStorage.getItem('arl')) {
|
|
|
|
this.$refs.loginInput.value = localStorage.getItem('arl').trim()
|
|
|
|
}
|
|
|
|
if (localStorage.getItem('accountNum')) {
|
|
|
|
this.accountNum = localStorage.getItem('accountNum')
|
|
|
|
}
|
|
|
|
|
|
|
|
let spotifyUser = localStorage.getItem('spotifyUser')
|
|
|
|
|
|
|
|
if (spotifyUser) {
|
|
|
|
this.lastUser = spotifyUser
|
|
|
|
this.spotifyUser = spotifyUser
|
|
|
|
socket.emit('update_userSpotifyPlaylists', spotifyUser)
|
|
|
|
}
|
|
|
|
|
|
|
|
this.changeSlimDownloads = 'true' === localStorage.getItem('slimDownloads')
|
|
|
|
|
|
|
|
let volume = parseInt(localStorage.getItem('previewVolume'))
|
|
|
|
if (isNaN(volume)) {
|
|
|
|
volume = 80
|
|
|
|
localStorage.setItem('previewVolume', volume)
|
|
|
|
}
|
|
|
|
window.vol.preview_max_volume = volume
|
|
|
|
|
|
|
|
socket.on('init_settings', this.initSettings)
|
|
|
|
socket.on('updateSettings', this.updateSettings)
|
|
|
|
socket.on('accountChanged', this.accountChanged)
|
|
|
|
socket.on('familyAccounts', this.initAccounts)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
2020-07-18 10:59:39 +00:00
|
|
|
</style>
|