1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Removed contribute banner

This commit is contained in:
Jon Ziebell 2022-12-07 18:46:04 -05:00
parent e10c35f340
commit 6e67e83a7b
4 changed files with 1 additions and 71 deletions

View File

@ -85,9 +85,7 @@ beestat.setting = function(argument_1, opt_value, opt_callback) {
'date_format': 'M/D/YYYY',
'units.currency': 'usd',
'hide_contribute_banner': false
'units.currency': 'usd'
};
// Figure out what we're trying to do.

View File

@ -1,61 +0,0 @@
/**
* Contribute banner for video announcement.
*/
beestat.component.card.contribute_banner = function() {
beestat.component.card.apply(this, arguments);
};
beestat.extend(beestat.component.card.contribute_banner, beestat.component.card);
beestat.component.card.contribute_banner.prototype.decorate_contents_ = function(parent) {
parent.style('background', beestat.style.color.purple.base);
const container = document.createElement('div');
Object.assign(container.style, {
'display': 'flex',
'align-items': 'center',
'grid-gap': `${beestat.style.size.gutter}px`
});
const left = document.createElement('div');
Object.assign(left.style, {
'font-size': beestat.style.font_size.large
});
left.innerText = 'Important message from the creator of beestat!';
container.appendChild(left);
parent.appendChild(container);
const center = document.createElement('div');
Object.assign(center.style, {
'text-align': 'right',
'flex-grow': 1,
'flex-shrink': 0
});
const tile_group = new beestat.component.tile_group();
const watch_tile = new beestat.component.tile()
.set_icon('play')
.set_text('Watch Now')
.set_background_color(beestat.style.color.red.dark)
.set_background_hover_color(beestat.style.color.red.light);
watch_tile.addEventListener('click', function() {
(new beestat.component.modal.contribute_video()).render();
});
tile_group.add_tile(watch_tile);
const dismiss_tile = new beestat.component.tile()
.set_icon('close')
.set_shadow(false)
.set_text_color(beestat.style.color.purple.dark)
.set_text_hover_color(beestat.style.color.purple.light);
dismiss_tile.addEventListener('click', function() {
beestat.setting('hide_contribute_banner', true);
beestat.current_layer.render();
});
tile_group.add_tile(dismiss_tile);
tile_group.render($(center));
container.appendChild(center);
};

View File

@ -203,10 +203,4 @@ beestat.component.header.prototype.decorate_ = function(parent) {
.add_call('user', 'log_out')
.send();
}));
if (beestat.setting('hide_contribute_banner') === false) {
const contribute_banner = new beestat.component.card.contribute_banner();
contribute_banner.style({'margin-bottom': `${beestat.style.size.gutter}px`});
contribute_banner.render(parent);
}
};

View File

@ -93,7 +93,6 @@ if($setting->get('environment') === 'dev' || $setting->get('environment') === 'd
echo '<script src="/js/component/card/contribute_status.js"></script>' . PHP_EOL;
echo '<script src="/js/component/card/merchandise.js"></script>' . PHP_EOL;
echo '<script src="/js/component/card/visualize_video.js"></script>' . PHP_EOL;
echo '<script src="/js/component/card/contribute_banner.js"></script>' . PHP_EOL;
echo '<script src="/js/component/chart.js"></script>' . PHP_EOL;
echo '<script src="/js/component/chart/runtime_thermostat_summary.js"></script>' . PHP_EOL;
echo '<script src="/js/component/chart/temperature_profiles.js"></script>' . PHP_EOL;