Skip to content

Commit fe724c4

Browse files
committed
feat(riot-mui): upgrade tag history components
1 parent 68d1999 commit fe724c4

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

src/components/catalog/catalog-element.riot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
7777
onClick() {
7878
const state = this.state;
7979
if (!state.repo) {
80-
router.taglist(state.image);
80+
router.goTaglist(state.image);
8181
} else {
8282
this.update({
8383
expanded: !this.state.expanded,

src/components/tag-history/tag-history.riot

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,17 @@ You should have received a copy of the GNU Affero General Public License
1515
along with this program. If not, see <http://www.gnu.org/licenses/>.
1616
-->
1717
<tag-history>
18-
<material-card ref="tag-history-tag" class="tag-history header">
18+
<material-card>
1919
<div class="material-card-title-action">
20-
<material-button waves-center="true" rounded="true" waves-color="#ddd" onClick="{ toTaglist }">
20+
<material-button
21+
color="rgba(0,0,0,0)"
22+
text-color="#777"
23+
waves-center="true"
24+
rounded="true"
25+
waves-color="#ddd"
26+
href="{ toTaglist() }"
27+
icon
28+
>
2129
<i class="material-icons">arrow_back</i>
2230
</material-button>
2331
<h2>History of { props.image }:{ props.tag } <i class="material-icons">history</i></h2>
@@ -34,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
3442
onTabChanged="{ onTabChanged }"
3543
></material-tabs>
3644

37-
<material-card each="{ element in state.elements }" class="tag-history-element">
45+
<material-card each="{ element in state.elements }">
3846
<tag-history-element
3947
each="{ entry in element }"
4048
if="{ entry.value && entry.value.length > 0}"
@@ -128,7 +136,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
128136
});
129137
},
130138
toTaglist() {
131-
router.taglist(this.props.image);
139+
return router.taglist(this.props.image);
132140
},
133141
};
134142
const eltIdx = function (e) {

src/scripts/router.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export default {
6262
return baseUrl({ page: null });
6363
},
6464
taglist(image) {
65+
return `${baseUrl({ page: null })}#!/taglist/${image}`;
66+
},
67+
goTaglist(image) {
6568
router.push(`${baseUrl({ page: null })}#!/taglist/${image}`);
6669
},
6770
getTagListImage() {

src/style.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -392,21 +392,6 @@ taglist .image-size {
392392
width: 7em;
393393
}
394394

395-
catalog material-card,
396-
tag-history material-card {
397-
min-height: auto;
398-
}
399-
400-
tag-history-button button {
401-
background: none;
402-
border: none;
403-
}
404-
405-
material-card material-button {
406-
max-height: 30px;
407-
max-width: 30px;
408-
}
409-
410395
material-button:hover material-waves {
411396
background: none;
412397
}

0 commit comments

Comments
 (0)