Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
- fixed path root on new views
- better plurals
- layout tweaks
  • Loading branch information
shukriadams committed Dec 29, 2022
1 parent eae7346 commit d8c2e2c
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dotenv": "9.0.2",
"ping": "0.4.1",
"@slack/bolt": "3.4.0",
"timebelt": "https://github.com/shukriadams/timebelt.git#0.1.16",
"timebelt": "https://github.com/shukriadams/timebelt.git#0.1.17",
"winston-wrapper": "https://github.com/shukriadams/winston-wrapper.git#0.1.0",
"madscience-fsUtils": "https://github.com/shukriadams/node-fsUtils.git#0.0.12",
"madscience-httputils": "https://github.com/shukriadams/node-httpUtils.git#0.0.8",
Expand Down
1 change: 1 addition & 0 deletions src/public/css/overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ x-columns {
background-color: var(--color-ebonyClay);
position: relative;
z-index: 1; /* menu in headers can float over body content */
overflow: hidden;
}

.layout-header a {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module.exports = express => {
totalDownTime : timebelt.minutesToPeriodString(totalDownTime),
watcherRuntime : startDate ? timebelt.timespanString(new Date(), startDate, ' days', ' hours', ' minutes', ' seconds') : null,
page : arrayHelper.toPage(files, page, settings.pageSize),
baseurl : `/watcher/${watcher.__safeId}?`,
baseurl : `${settings.rootpath}watcher/${watcher.__safeId}?`,
rootpath: settings.rootpath
}))

Expand Down
2 changes: 1 addition & 1 deletion src/views/helpers/pluralizer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = Handlebars => {
Handlebars.registerHelper('pluralizer', (count, word)=>{
return `${word}${count > 1 ? 's': ''}`
return `${word}${count === 1 ? '': 's'}`
})
}
2 changes: 1 addition & 1 deletion src/views/pages/invalidDashboard.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#extend "layout"}}
{{#content "body"}}
<div class="dashboard-message">
<strong>"{{title}}"</strong> isn't a valid dashboard. Would you like to try <a href="/dashboard/{{dashboard.__safeId}}">{{dashboard.name}}</a> instead?
<strong>"{{title}}"</strong> isn't a valid dashboard. Would you like to try <a href="{{../rootpath}}dashboard/{{dashboard.__safeId}}">{{dashboard.name}}</a> instead?
</div>
{{/content}}
{{/extend}}
2 changes: 1 addition & 1 deletion src/views/pages/watcher.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{#if dashboardsWithWatcher}}
<div class="quiet">On dashboards</div>
{{#each dashboardsWithWatcher}}
<a href="/dashboard/{{__safeId}}">{{name}}</a>
<a href="{{../rootpath}}dashboard/{{__safeId}}">{{name}}</a>
{{/each}}
{{/if}}
</x-card>
Expand Down
1 change: 1 addition & 0 deletions src/views/partials/layout.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<div class="layout-footer">
{{{block "footer"}}}
</div>

<script src="{{rootpath}}content/js/bootstrip.js"></script>
<script src="{{rootpath}}content/js/base.js"></script>

Expand Down

0 comments on commit d8c2e2c

Please sign in to comment.