mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
UX: Move folders next to Library in navigation & fix folder icon
This commit is contained in:
@@ -200,20 +200,6 @@
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
||||
<v-list-tile :to="{ name: 'folders' }" class="nav-folders" @click.stop="">
|
||||
<v-list-tile-action :title="$gettext('Folders')">
|
||||
<v-icon>folder</v-icon>
|
||||
</v-list-tile-action>
|
||||
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>
|
||||
<translate key="Folders">Folders</translate>
|
||||
<span v-show="config.count.folders > 0"
|
||||
class="nav-count">{{ config.count.folders }}</span>
|
||||
</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
||||
<v-list-tile :to="{ name: 'calendar' }" class="nav-calendar" @click.stop="">
|
||||
<v-list-tile-action :title="$gettext('Calendar')">
|
||||
<v-icon>date_range</v-icon>
|
||||
@@ -291,6 +277,20 @@
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
||||
<v-list-tile v-show="$config.feature('folders')" :to="{ name: 'folders' }" class="nav-folders" @click.stop="">
|
||||
<v-list-tile-action :title="$gettext('Folders')">
|
||||
<v-icon>folder</v-icon>
|
||||
</v-list-tile-action>
|
||||
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>
|
||||
<translate key="Folders">Folders</translate>
|
||||
<span v-show="config.count.folders > 0"
|
||||
class="nav-count">{{ config.count.folders }}</span>
|
||||
</v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</v-list-tile>
|
||||
|
||||
<v-list-tile v-if="isMini && $config.feature('library')" to="/library" class="nav-library" @click.stop="">
|
||||
<v-list-tile-action :title="$gettext('Library')">
|
||||
<v-icon>camera_roll</v-icon>
|
||||
|
||||
@@ -39,6 +39,8 @@ var albumIconSvg = []byte(`<svg id="f394fb39-4024-46e8-9a68-3f5e53f52bfd" data-n
|
||||
d="M229.57,181.89l-4,24.19M47.29,182.88l14.81,14M157.86,59.23,62,196.69a.09.09,0,0,0,.07.15l163.41,9.37a.09.09,0,0,0,.09-.13L158,59.25A.1.1,0,0,0,157.86,59.23ZM138.12,45.94,47.18,182.69a.13.13,0,0,0,.11.19l182.18-.8a.12.12,0,0,0,.1-.19L138.33,45.94A.12.12,0,0,0,138.12,45.94Zm.11-.16L158,59.1"/>
|
||||
</svg>`)
|
||||
|
||||
var folderIconSvg = []byte(`<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"/></svg>`)
|
||||
|
||||
var labelIconSvg = []byte(`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
|
||||
<path d="M0 0h24v24H0z" fill="none"/><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"/></svg>`)
|
||||
|
||||
@@ -79,7 +81,7 @@ func GetSvg(router *gin.RouterGroup) {
|
||||
})
|
||||
|
||||
router.GET("/svg/folder", func(c *gin.Context) {
|
||||
c.Data(http.StatusOK, "image/svg+xml", albumIconSvg)
|
||||
c.Data(http.StatusOK, "image/svg+xml", folderIconSvg)
|
||||
})
|
||||
|
||||
router.GET("/svg/broken", func(c *gin.Context) {
|
||||
|
||||
@@ -38,6 +38,7 @@ type FeatureSettings struct {
|
||||
Private bool `json:"private" yaml:"Private"`
|
||||
Review bool `json:"review" yaml:"Review"`
|
||||
Files bool `json:"files" yaml:"Files"`
|
||||
Folders bool `json:"folders" yaml:"Folders"`
|
||||
Moments bool `json:"moments" yaml:"Moments"`
|
||||
Estimates bool `json:"estimates" yaml:"Estimates"`
|
||||
Labels bool `json:"labels" yaml:"Labels"`
|
||||
@@ -116,6 +117,7 @@ func NewSettings() *Settings {
|
||||
Review: true,
|
||||
Private: true,
|
||||
Files: true,
|
||||
Folders: true,
|
||||
Moments: true,
|
||||
Estimates: true,
|
||||
Labels: true,
|
||||
|
||||
Reference in New Issue
Block a user