tl: allow choosing sort order (fix #371)

pull/465/head
Varun Patil 2023-03-08 16:34:17 -08:00
parent aa4bb7f60d
commit 03dce35da8
6 changed files with 44 additions and 2 deletions

View File

@ -11,7 +11,8 @@ You may need to clear browser cache to use location search.
- **Feature**: Allow bulk editing of EXIF attributes other than date/time - **Feature**: Allow bulk editing of EXIF attributes other than date/time
- **Feature**: Allow (optionally bulk) editing of collaborative tags - **Feature**: Allow (optionally bulk) editing of collaborative tags
- **Feature**: Show list of tags in sidebar - **Feature**: Show list of tags in sidebar
- **Feature**: Configurable album sorting order ([#377](https://github.com/pulsejet/memories/issues/377)) - **Feature**: Configurable folder/album sorting order ([#371](https://github.com/pulsejet/memories/issues/371))
- **Feature**: Configurable album list sorting order ([#377](https://github.com/pulsejet/memories/issues/377))
- **Feature**: Allow archiving photos throw folder view ([#350](https://github.com/pulsejet/memories/issues/350)) - **Feature**: Allow archiving photos throw folder view ([#350](https://github.com/pulsejet/memories/issues/350))
- **Feature**: Add search bar to face cluster merge dialog ([#177](https://github.com/pulsejet/memories/issues/177)) - **Feature**: Add search bar to face cluster merge dialog ([#177](https://github.com/pulsejet/memories/issues/177))
- Other fixes and features ([milestone](https://github.com/pulsejet/memories/milestone/9?closed=1)) - Other fixes and features ([milestone](https://github.com/pulsejet/memories/milestone/9?closed=1))

View File

@ -76,6 +76,8 @@ class PageController extends Controller
$pi('timelinePath', 'EMPTY'); $pi('timelinePath', 'EMPTY');
$pi('foldersPath', '/'); $pi('foldersPath', '/');
$pi('showHidden', false); $pi('showHidden', false);
$pi('sortFolderMonth', false);
$pi('sortAlbumMonth', 'true');
$pi('enableTopMemories', 'true'); $pi('enableTopMemories', 'true');
// Apps enabled // Apps enabled

View File

@ -76,6 +76,27 @@
> >
{{ t("memories", "Show hidden folders") }} {{ t("memories", "Show hidden folders") }}
</NcCheckboxRadioSwitch> </NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch
:checked.sync="config_sortFolderMonth"
@update:checked="updateSortFolderMonth"
type="switch"
>
{{ t("memories", "Treat folders as albums (sort order)") }}
</NcCheckboxRadioSwitch>
</NcAppSettingsSection>
<NcAppSettingsSection
id="albums-settings"
:title="t('memories', 'Albums')"
>
<NcCheckboxRadioSwitch
:checked.sync="config_sortAlbumMonth"
@update:checked="updateSortAlbumMonth"
type="switch"
>
{{ t("memories", "Enable timeline view (sort order)") }}
</NcCheckboxRadioSwitch>
</NcAppSettingsSection> </NcAppSettingsSection>
</NcAppSettingsDialog> </NcAppSettingsDialog>
@ -190,6 +211,14 @@ export default defineComponent({
async updateShowHidden() { async updateShowHidden() {
await this.updateSetting("showHidden"); await this.updateSetting("showHidden");
}, },
async updateSortFolderMonth() {
await this.updateSetting("sortFolderMonth");
},
async updateSortAlbumMonth() {
await this.updateSetting("sortAlbumMonth");
},
}, },
}); });
</script> </script>

View File

@ -271,7 +271,11 @@ export default defineComponent({
}, },
isMonthView(): boolean { isMonthView(): boolean {
return ( return (
this.$route.name === "albums" || this.$route.name === "album-share" (this.config_sortAlbumMonth &&
(this.$route.name === "albums" ||
this.$route.name === "album-share")) ||
(this.config_sortFolderMonth && this.$route.name === "folders") ||
this.$route.query.sort === "album"
); );
}, },
/** Get view name for dynamic top matter */ /** Get view name for dynamic top matter */

View File

@ -24,6 +24,10 @@ export default defineComponent({
config_showHidden: config_showHidden:
loadState("memories", "showHidden", <string>"false") === "true", loadState("memories", "showHidden", <string>"false") === "true",
config_sortFolderMonth:
loadState("memories", "sortFolderMonth", <string>"false") === "true",
config_sortAlbumMonth:
loadState("memories", "sortAlbumMonth", <string>"true") === "true",
config_enableTopMemories: config_enableTopMemories:
loadState("memories", "enableTopMemories", <string>"false") === "true", loadState("memories", "enableTopMemories", <string>"false") === "true",

View File

@ -17,6 +17,8 @@ declare module "vue" {
config_timelinePath: string; config_timelinePath: string;
config_foldersPath: string; config_foldersPath: string;
config_showHidden: boolean; config_showHidden: boolean;
config_sortFolderMonth: boolean;
config_sortAlbumMonth: boolean;
config_tagsEnabled: boolean; config_tagsEnabled: boolean;
config_recognizeEnabled: boolean; config_recognizeEnabled: boolean;
config_facerecognitionInstalled: boolean; config_facerecognitionInstalled: boolean;