Skip to content

Commit

Permalink
Upgrade Vue and Buefy UI lib.
Browse files Browse the repository at this point in the history
- Vue 2.6 introduces "v-slot" which Buefy 0.9.7 uses.
- Refactor all `<b-table>` and `<b-column>` instances to work with the
  new `v-slot` snytax.
- Refactor `<b-column>` <td> and class attributes to work wit hthe new
  syntax.
- Fix Buefy scss setup to work with the update.
- Fix sidebar responsive view to work with the update.
  • Loading branch information
knadh committed May 23, 2021
1 parent c593be5 commit dea4d18
Show file tree
Hide file tree
Showing 9 changed files with 401 additions and 441 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"axios": "^0.21.1",
"buefy": "^0.8.20",
"buefy": "^0.9.7",
"c3": "^0.7.18",
"codeflask": "^1.4.1",
"core-js": "^3.6.5",
Expand Down
44 changes: 0 additions & 44 deletions frontend/src/assets/buefy.scss

This file was deleted.

9 changes: 5 additions & 4 deletions frontend/src/assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ $modal-background-background-color: rgba(0, 0, 0, .30);
$speed-slow: 25ms !default;
$speed-slower: 50ms !default;

/* Import full Bulma and Buefy to override styles. */
// @import "~bulma";
@import "./buefy";
/* Import full Bulma and Buefy */
@import "~bulma";
@import "~buefy/src/scss/buefy";

/* Custom style overrides */
html, body {
height: 100%;
}
Expand Down Expand Up @@ -752,6 +753,7 @@ section.campaign {

/* Hide sidebar menu captions on mobile */
.b-sidebar .sidebar-content.is-mini-mobile {
max-width: 90px;
.menu-list {
li {
margin-bottom: 30px;
Expand All @@ -773,7 +775,6 @@ section.campaign {

td .tags {
display: block;
text-align: right;

.tag:not(:last-child) {
margin-right: 0;
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,8 @@ export default class Utils {
duration: duration || 2000,
});
};

// Takes a props.row from a Buefy b-column <td> template and
// returns a `data-id` attribute which Buefy then applies to the td.
tdID = (row) => ({ 'data-id': row.id.toString() });
}
Loading

0 comments on commit dea4d18

Please sign in to comment.