feat(riot-mui): now we can CTRL + click on catalog elements

This commit is contained in:
Joxit
2022-12-29 23:50:47 +01:00
parent 696aa39012
commit 228762c641
2 changed files with 7 additions and 8 deletions
+6 -4
View File
@@ -21,7 +21,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
if="{!props.filterResults || state.nImages > 0 || matchSearch(props.filterResults, state.image)}"
>
<material-card class="list highlight" expanded="{state.expanded}" onclick="{ onClick }">
<material-waves center="true" color="#ddd"></material-waves>
<a if="{ state.image }" href="{ router.taglist(state.image) }">
<material-waves center="true" color="#ddd"></material-waves>
</a>
<material-waves if="{ state.images }" center="true" color="#ddd"></material-waves>
<span>
<i class="material-icons">send</i>
{ state.image || state.repo }
@@ -76,9 +79,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
},
onClick() {
const state = this.state;
if (!state.repo) {
router.goTaglist(state.image);
} else {
if (state.repo) {
this.update({
expanded: !this.state.expanded,
expanding: true,
@@ -112,6 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
oReq.send();
},
matchSearch,
router,
};
</script>
<!-- End of tag -->
+1 -4
View File
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import { router, getCurrentRoute } from '@riotjs/route';
import { getCurrentRoute } from '@riotjs/route';
import { encodeURI, decodeURI } from './utils';
function getQueryParams() {
@@ -64,9 +64,6 @@ export default {
taglist(image) {
return `${baseUrl({ page: null })}#!/taglist/${image}`;
},
goTaglist(image) {
router.push(`${baseUrl({ page: null })}#!/taglist/${image}`);
},
getTagListImage() {
return getCurrentRoute().replace(/^.*(#!)?\/?taglist\//, '');
},