Updates on front end :D
Former-commit-id: 032b13b1f3a6216ae6bafde75f583038916b4f74 [formerly 80588a95ad5168ecab65e3d8cc8968bad9a20a6b] [formerly 94b306854bac60361ddf1b945a3edec7204d1327 [formerly 193adea6bb]]
Former-commit-id: 67b5219c1a6488c1a797bec42a0dec2036441a48 [formerly 28183c674806c3125a285a48905a01e1e835be7e]
Former-commit-id: d2169aab351eab252ea34e07bb943411aa8e9cb4
This commit is contained in:
1 parent
3eb9505ec4
commit
a7b50c2de1
19 files changed
+449
-343
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<button @click="change" aria-label="Switch View" title="Switch View" class="action">
|
||||
<i class="material-icons">{{ icon() }}</i>
|
||||
<span>Switch view</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import page from '../page'
|
||||
|
||||
var $ = window.info
|
||||
|
||||
export default {
|
||||
name: 'switch-button',
|
||||
methods: {
|
||||
change: function (event) {
|
||||
let url = window.location.pathname + '?display='
|
||||
|
||||
if ($.req.data.display === 'mosaic') {
|
||||
url += 'list'
|
||||
} else {
|
||||
url += 'mosaic'
|
||||
}
|
||||
|
||||
page.open(url)
|
||||
},
|
||||
icon: function () {
|
||||
if ($.req.data.display === 'mosaic') return 'view_list'
|
||||
return 'view_module'
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user