Change light theme secondary color and #1087 -- Reorganize player layout

This commit is contained in:
Buster Neece 2019-03-20 18:46:27 -05:00
parent ee49556de9
commit 3ec3f69714
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
11 changed files with 56 additions and 74 deletions

View File

@ -15,7 +15,7 @@ return [
'light' => __('Light').' ('.__('Default').')',
'dark' => __('Dark'),
],
'default' => $settings['themes']['default'],
'default' => \App\Customization::DEFAULT_THEME,
]
],

View File

@ -247,13 +247,7 @@ class Customization
*/
public function getPublicTheme(): string
{
$public_theme = $this->settings_repo->getSetting(Entity\Settings::PUBLIC_THEME, null);
if ($public_theme && in_array($public_theme, $this->app_settings['themes']['available'], true)) {
return $public_theme;
}
return self::DEFAULT_THEME;
return $this->settings_repo->getSetting(Entity\Settings::PUBLIC_THEME, self::DEFAULT_THEME);
}
/**

View File

@ -9,7 +9,7 @@ $this->layout('main', ['title' => __('My Account'), 'manual' => true]);
<div class="card mb-4">
<div class="card-body">
<div class="media">
<a class="align-self-center d-flex" href="http://www.gravatar.com/" target="_blank">
<a class="align-self-center" href="http://www.gravatar.com/" target="_blank">
<img src="<?=$user->getAvatar(64) ?>" alt="">
</a>
<div class="media-body">
@ -79,7 +79,7 @@ $this->layout('main', ['title' => __('My Account'), 'manual' => true]);
</a>
<?php else: ?>
<a class="btn btn-outline-primary" href="<?=$router->named('profile:2fa:enable') ?>">
<i class="material-icons" aria-hidden="true">lock_open</i>
<i class="material-icons" aria-hidden="true">lock</i>
<?=__('Enable Two-Factor') ?>
</a>
<?php endif; ?>

View File

@ -19,20 +19,4 @@ $assets
'stream_url' => $stream_url,
'autoplay' => $autoplay
]) ?>
<div class="flex-row radio-controls-embedded" id="radio-player-controls">
<div class="flex-shrink-0">
<a href="javascript:;" class="text-secondary jp-mute" title="<?=__('Mute') ?>">
<i class="material-icons" aria-hidden="true">volume_mute</i>
</a>
</div>
<div class="flex-fill">
<input type="range" title="<?=__('Volume') ?>" class="custom-range jp-volume-range" style="height: 10px;" id="jp-volume-range" min="0" max="100" step="1">
</div>
<div class="flex-shrink-0">
<a href="javascript:;" class="text-secondary jp-volume-full" title="<?=__('Full Volume') ?>">
<i class="material-icons" aria-hidden="true">volume_up</i>
</a>
</div>
</div>
</div>

View File

@ -18,16 +18,6 @@ $assets
<div class="public-page">
<div class="card">
<div class="card-body">
<div class="radio-controls-standalone" id="radio-player-controls">
<a href="javascript:;" class="text-secondary jp-mute" title="<?=__('Mute') ?>">
<i class="material-icons" aria-hidden="true">volume_mute</i>
</a>
<input type="range" title="<?=__('Volume') ?>" class="d-inline-block custom-range jp-volume-range" style="" id="jp-volume-range" min="0" max="100" step="1">
<a href="javascript:;" class="text-secondary jp-volume-full" title="<?=__('Full Volume') ?>">
<i class="material-icons" aria-hidden="true">volume_up</i>
</a>
</div>
<h2 class="card-title"><?=$this->e($station->getName()) ?></h2>
<div class="stations nowplaying">
@ -36,15 +26,15 @@ $assets
</div>
<div class="card-actions">
<a class="btn btn-sm btn-outline-primary" href="#modal-history" data-toggle="modal" data-target="#modal-history">
<a class="btn btn-sm btn-outline-secondary" href="#modal-history" data-toggle="modal" data-target="#modal-history">
<i class="material-icons" aria-hidden="true">history</i> <?=__('Song History') ?>
</a>
<?php if ($station->getEnableRequests()): ?>
<a class="btn btn-sm btn-outline-primary" href="#modal-request" data-toggle="modal" data-target="#modal-request">
<a class="btn btn-sm btn-outline-secondary" href="#modal-request" data-toggle="modal" data-target="#modal-request">
<i class="material-icons" aria-hidden="true">help_outline</i> <?=__('Request Song') ?>
</a>
<?php endif; ?>
<a class="btn btn-sm btn-outline-primary" href="<?=$router->named('public:playlist', ['station' => $station->getShortName(), 'format' => 'pls']) ?>">
<a class="btn btn-sm btn-outline-secondary" href="<?=$router->named('public:playlist', ['station' => $station->getShortName(), 'format' => 'pls']) ?>">
<i class="material-icons" aria-hidden="true">file_download</i> <?=__('Playlist') ?>
</a>
</div>

View File

@ -2,34 +2,53 @@
/** @var \Azura\Assets $assets */
$assets->addInlineJs($this->fetch('frontend/public/player_component.js'), 95);
?>
<div class="media media-left" id="station-nowplaying">
<div class="pull-left pr-2 pt-3">
<a class="btn-audio" role="button" title="<?=__('Play/Pause') ?>" href="#" data-url="<?=$this->e($stream_url) ?>" <?php if ($autoplay): ?>data-autoplay="true"<?php endif; ?>>
<i class="material-icons lg">play_circle_filled</i>
</a>
</div>
<?php if (!$customization->hideAlbumArt()): ?>
<div class="pull-left pr-2" v-if="np.now_playing.song.art">
<a v-bind:href="np.now_playing.song.art" data-fancybox target="_blank"><img v-bind:src="np.now_playing.song.art" alt="<?=__('Album Cover') ?>" style="width: 50px; height: auto; border-radius: 5px;"></a>
</div>
<?php endif; ?>
<div class="media-body">
<div v-if="np.now_playing.song.title != ''">
<h4 class="media-heading might-overflow nowplaying-title">
{{ np.now_playing.song.title }}
</h4>
<div class="nowplaying-artist might-overflow">
{{ np.now_playing.song.artist }}
<div id="station-nowplaying">
<div class="media align-items-center">
<?php if (!$customization->hideAlbumArt()): ?>
<div class="pr-2" v-if="np.now_playing.song.art">
<a v-bind:href="np.now_playing.song.art" data-fancybox target="_blank"><img v-bind:src="np.now_playing.song.art" alt="<?=__('Album Cover') ?>" style="width: 50px; height: auto; border-radius: 5px;"></a>
</div>
<?php endif; ?>
<div class="media-body">
<div v-if="np.now_playing.song.title != ''">
<h4 class="media-heading might-overflow nowplaying-title">
{{ np.now_playing.song.title }}
</h4>
<div class="nowplaying-artist might-overflow">
{{ np.now_playing.song.artist }}
</div>
</div>
<div v-else>
<h4 class="media-heading might-overflow nowplaying-title">
{{ np.now_playing.song.text }}
</h4>
</div>
</div>
<div v-else>
<h4 class="media-heading might-overflow nowplaying-title">
{{ np.now_playing.song.text }}
</h4>
</div>
<div class="d-flex flex-row align-items-center mt-2 pt-1 border-top border-black-divider">
<div class="">
<a class="btn-audio" role="button" title="<?=__('Play/Pause') ?>" href="#" data-url="<?=$this->e($stream_url) ?>" <?php if ($autoplay): ?>data-autoplay="true"<?php endif; ?>>
<i class="material-icons lg" style="line-height: 1">play_circle_filled</i>
</a>
</div>
<div class="flex-fill ml-1 nowplaying-progress" v-if="time_display">
{{ time_display }}
</div>
<div class="nowplaying-progress" v-if="time_display">
{{ time_display }}
<div class="flex-shrink-0">
<a href="javascript:;" class="text-secondary jp-mute" title="<?=__('Mute') ?>">
<i class="material-icons" style="line-height: 1;" aria-hidden="true">volume_mute</i>
</a>
</div>
<div class="flex-fill" style="max-width: 30%;">
<input type="range" title="<?=__('Volume') ?>" class="custom-range jp-volume-range" style="height: 10px;" id="jp-volume-range" min="0" max="100" step="1">
</div>
<div class="flex-shrink-0">
<a href="javascript:;" class="text-secondary jp-volume-full" title="<?=__('Full Volume') ?>">
<i class="material-icons" style="line-height: 1;" aria-hidden="true">volume_up</i>
</a>
</div>
</div>
</div>

View File

@ -36,7 +36,7 @@
"dist/lib/vue/vue.js": "dist/lib/vue/vue-5424a463b5.js",
"dist/lib/vue/vue.min.js": "dist/lib/vue/vue-f15aee8488.min.js",
"dist/lib/zxcvbn/zxcvbn.js": "dist/lib/zxcvbn/zxcvbn-9cf6916dc0.js",
"dist/light.css": "dist/light-1d16f139b5.css",
"dist/light.css": "dist/light-00208138c3.css",
"dist/material.js": "dist/material-ad7c414bdf.js",
"dist/radio.js": "dist/radio-38e68b45d3.js",
"dist/webcaster.js": "dist/webcaster-9c100185e9.js",

2
web/static/dist/light-00208138c3.css vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6543,11 +6543,6 @@
"extend-shallow": "^3.0.2"
}
},
"popper.js": {
"version": "1.14.6",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.6.tgz",
"integrity": "sha512-AGwHGQBKumlk/MDfrSOf0JHhJCImdDMcGNoqKmKkU+68GFazv3CQ6q9r7Ja1sKDZmYWTckY/uLyEznheTDycnA=="
},
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",

View File

@ -8,9 +8,9 @@ $primary: (
) !default;
$secondary: (
color: $material-color-amber-900,
dark: $material-color-amber-900,
light: $material-color-amber-700
color: $material-color-grey-600,
dark: $material-color-grey-800,
light: $material-color-grey-400
) !default;
$danger: (