-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary Added a minimize/restore function to hide/show the entire panel. ##module\settings.js * Added the setting showTickerPanel ##module\ticker-panel.js * in getData(options), added the option panelVisible * in activateListeners($html), added a new listener for `[data-action=ticker-visibility]` ##styles\style.css * Added the new minimize/restore buttons to the same styles as the add-ticker button for visual consistency ##templates\ticker-panel.hbs * Wrapped all list containers in an if statement that checks if panelVisible * Added minimize/restore buttons to new button panel * Moved `Add Ticker` button to new button panel
- Loading branch information
1 parent
c51d199
commit 6fc9502
Showing
4 changed files
with
103 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,89 @@ | ||
<section | ||
class="ticker-panel {{#if @root.options.editable}}editable{{/if}} {{verticalEdge}}" | ||
style="--offset: {{offset}}"> | ||
{{#if GMTickers.[0]}} | ||
<div class="list-container"> | ||
<a class="ticker-label" data-target="gm-ticker-list" data-action="collapse">GM</a> | ||
<div id="gm-ticker-list" class="ticker-list gm-ticker-list"> | ||
{{#each GMTickers as |gmticker|}} | ||
<div class="ticker-entry gm-ticker-entry" data-id="{{gmticker.id}}"> | ||
<div class="ticker" style="--areas: {{gmticker.max}}; --filled: {{gmticker.value}}; --ticker-color: {{gmticker.color}}"> | ||
{{#each gmticker.spokes}} | ||
<div class="spoke" style="--index: {{ this }}"></div> | ||
{{/each}} | ||
{{#if @root.options.panelVisible}} | ||
{{#if GMTickers.[0]}} | ||
<div class="list-container"> | ||
<a class="ticker-label" data-target="gm-ticker-list" data-action="collapse">GM</a> | ||
<div id="gm-ticker-list" class="ticker-list gm-ticker-list"> | ||
{{#each GMTickers as |gmticker|}} | ||
<div class="ticker-entry gm-ticker-entry" data-id="{{gmticker.id}}"> | ||
<div class="ticker" style="--areas: {{gmticker.max}}; --filled: {{gmticker.value}}; --ticker-color: {{gmticker.color}}"> | ||
{{#each gmticker.spokes}} | ||
<div class="spoke" style="--index: {{ this }}"></div> | ||
{{/each}} | ||
</div> | ||
<div class="name-section"> | ||
{{#if @root.options.isGM}} | ||
<div class="controls"> | ||
<a data-action="delete-ticker"><i class="fas fa-trash"></i></a> | ||
<a data-action="edit-ticker"><i class="fas fa-edit"></i></a> | ||
</div> | ||
{{/if}} | ||
<div class="name">{{#if gmticker.private}}<i class="fas fa-eye-slash"></i>{{/if}} {{gmticker.name}}</div> | ||
</div> | ||
</div> | ||
<div class="name-section"> | ||
{{#if @root.options.isGM}} | ||
<div class="controls"> | ||
<a data-action="delete-ticker"><i class="fas fa-trash"></i></a> | ||
<a data-action="edit-ticker"><i class="fas fa-edit"></i></a> | ||
</div> | ||
{{/if}} | ||
<div class="name">{{#if gmticker.private}}<i class="fas fa-eye-slash"></i>{{/if}} {{gmticker.name}}</div> | ||
</div> | ||
</div> | ||
{{/each}} | ||
{{/each}} | ||
</div> | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{#if SharedTickers.[0]}} | ||
<div class="list-container"> | ||
<a class="ticker-label" data-target="shared-ticker-list" data-action="collapse">Shared</a> | ||
<div id="shared-ticker-list" class="ticker-list shared-ticker-list {{#if SharedCollapsed}}hidden{{/if}}"> | ||
{{#each SharedTickers as |sharedticker|}} | ||
<div class="ticker-entry shared-ticker-entry" data-id="{{sharedticker.id}}"> | ||
<div class="ticker" style="--areas: {{sharedticker.max}}; --filled: {{sharedticker.value}}; --ticker-color: {{sharedticker.color}}"> | ||
{{#each sharedticker.spokes}} | ||
<div class="spoke" style="--index: {{ this }}"></div> | ||
{{/each}} | ||
</div> | ||
<div class="name-section"> | ||
{{#if sharedticker.editable}} | ||
<div class="controls"> | ||
<a data-action="delete-ticker"><i class="fas fa-trash"></i></a> | ||
<a data-action="edit-ticker"><i class="fas fa-edit"></i></a> | ||
</div> | ||
{{/if}} | ||
<div class="name">{{sharedticker.name}}</div> | ||
{{/if}} | ||
{{#if SharedTickers.[0]}} | ||
<div class="list-container"> | ||
<a class="ticker-label" data-target="shared-ticker-list" data-action="collapse">Shared</a> | ||
<div id="shared-ticker-list" class="ticker-list shared-ticker-list {{#if SharedCollapsed}}hidden{{/if}}"> | ||
{{#each SharedTickers as |sharedticker|}} | ||
<div class="ticker-entry shared-ticker-entry" data-id="{{sharedticker.id}}"> | ||
<div class="ticker" style="--areas: {{sharedticker.max}}; --filled: {{sharedticker.value}}; --ticker-color: {{sharedticker.color}}"> | ||
{{#each sharedticker.spokes}} | ||
<div class="spoke" style="--index: {{ this }}"></div> | ||
{{/each}} | ||
</div> | ||
<div class="name-section"> | ||
{{#if sharedticker.editable}} | ||
<div class="controls"> | ||
<a data-action="delete-ticker"><i class="fas fa-trash"></i></a> | ||
<a data-action="edit-ticker"><i class="fas fa-edit"></i></a> | ||
</div> | ||
{{/if}} | ||
<div class="name">{{sharedticker.name}}</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/each}} | ||
{{/each}} | ||
</div> | ||
</div> | ||
</div> | ||
{{/if}} | ||
{{#each UserTickers as |user|}} | ||
<div class="list-container {{#if (not user.visCount)}}hidden{{/if}}"> | ||
<a class="ticker-label" data-target="{{user.id}}" data-action="collapse">{{user.name}}</a> | ||
<div class="ticker-list {{#if user.collapsed}}hidden{{/if}}" data-id="{{user.id}}"> | ||
{{#each user.tickers as |ticker|}} | ||
<div class="ticker-entry user-ticker-entry {{#if (not ticker.viewable)}}hidden{{/if}}" data-id="{{ticker.id}}"> | ||
<div class="ticker" style="--areas: {{ticker.max}}; --filled: {{ticker.value}}; --ticker-color: {{ticker.color}}"> | ||
{{#each ticker.spokes}} | ||
<div class="spoke" style="--index: {{ this }}"></div> | ||
{{/each}} | ||
</div> | ||
<div class="name-section"> | ||
{{#if (or ticker.ownedByUser @root.options.isGM)}} | ||
<div class="controls"> | ||
<a data-action="delete-ticker"><i class="fas fa-trash"></i></a> | ||
<a data-action="edit-ticker"><i class="fas fa-edit"></i></a> | ||
</div> | ||
{{/if}} | ||
<div class="name">{{#if ticker.private}}<i class="fas fa-eye-slash"></i>{{/if}}{{ticker.name}}</div> | ||
{{/if}} | ||
{{#each UserTickers as |user|}} | ||
<div class="list-container {{#if (not user.visCount)}}hidden{{/if}}"> | ||
<a class="ticker-label" data-target="{{user.id}}" data-action="collapse">{{user.name}}</a> | ||
<div class="ticker-list {{#if user.collapsed}}hidden{{/if}}" data-id="{{user.id}}"> | ||
{{#each user.tickers as |ticker|}} | ||
<div class="ticker-entry user-ticker-entry {{#if (not ticker.viewable)}}hidden{{/if}}" data-id="{{ticker.id}}"> | ||
<div class="ticker" style="--areas: {{ticker.max}}; --filled: {{ticker.value}}; --ticker-color: {{ticker.color}}"> | ||
{{#each ticker.spokes}} | ||
<div class="spoke" style="--index: {{ this }}"></div> | ||
{{/each}} | ||
</div> | ||
<div class="name-section"> | ||
{{#if (or ticker.ownedByUser @root.options.isGM)}} | ||
<div class="controls"> | ||
<a data-action="delete-ticker"><i class="fas fa-trash"></i></a> | ||
<a data-action="edit-ticker"><i class="fas fa-edit"></i></a> | ||
</div> | ||
{{/if}} | ||
<div class="name">{{#if ticker.private}}<i class="fas fa-eye-slash"></i>{{/if}}{{ticker.name}}</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{/each}} | ||
{{/each}} | ||
</div> | ||
</div> | ||
</div> | ||
{{/each}} | ||
<a data-action="add-ticker"><i class="fas fa-plus"></i> {{localize "SimpleTickers.AddTicker"}}</a> | ||
{{/each}} | ||
{{/if}} | ||
<div class="st-button-panel"> | ||
{{#if @root.options.panelVisible}} | ||
<a data-action="add-ticker"><i class="fas fa-plus"></i><span class="label-text"> {{localize "SimpleTickers.AddTicker"}}</span></a> | ||
<a data-action="ticker-visibility" class="hide-text-label" title="Hide Tickers"><i class="fa-regular fa-square-minus"></i> Hide</a> | ||
{{else}} | ||
<a data-action="ticker-visibility" class="hide-text-label" title="Restore Tickers"><i class="fa-regular fa-window-restore"></i></a> | ||
{{/if}} | ||
</div> | ||
</section> |