mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 00:47:00 +01:00
feat(core,fuse,gui,cli): album management
New requests CreateAlbum, RenameAlbum, DeleteAlbum, AddToAlbum and RemoveFromAlbum, backed by proton-drive-rs 0.6.6. The Albums view gains a New Album button and a card menu with Rename and Delete; photos gain Add to Album (menu and selection bar) and Remove from Album inside an album. CLI: pdfs new-album, rename-album, delete-album, add-to-album, remove-from-album. Also fixes the album view state: the timeline filters are hidden on the album grid, the header counts albums, Back keeps the grid and its scroll position, and the timeline is only reloaded when an album replaced it.
This commit is contained in:
1 parent
29e5769dec
commit
43d1afe705
8 files changed
+738
-18
No files matched your search
@@ -475,6 +475,8 @@ fn build_window(app: &adw::Application) {
|
||||
view_switch: gallery_widgets.view_switch.clone(),
|
||||
albums_loading: Cell::new(false),
|
||||
album: RefCell::new(None),
|
||||
timeline_stale: Cell::new(false),
|
||||
album_list: RefCell::new(Vec::new()),
|
||||
back: gallery_widgets.back.clone(),
|
||||
filters: gallery_widgets.filters.clone(),
|
||||
kind: Cell::new(None),
|
||||
@@ -506,6 +508,7 @@ fn build_window(app: &adw::Application) {
|
||||
select_bar: gallery_widgets.select_bar.clone(),
|
||||
select_label: gallery_widgets.select_label.clone(),
|
||||
select_trash: gallery_widgets.select_trash.clone(),
|
||||
select_album: gallery_widgets.select_album.clone(),
|
||||
},
|
||||
shared: SharedState {
|
||||
content: shared_widgets.content.clone(),
|
||||
@@ -1143,6 +1146,12 @@ fn install_window_actions(ui: &Rc<Ui>, window: &adw::ApplicationWindow) {
|
||||
show_import.connect_activate(move |_, _| ui_import.stack.set_visible_child_name("takeout"));
|
||||
window.add_action(&show_import);
|
||||
|
||||
// The Albums view's New Album button.
|
||||
let new_album = gio::SimpleAction::new("new-album", None);
|
||||
let ui_album = ui.clone();
|
||||
new_album.connect_activate(move |_, _| prompt_new_album(&ui_album, Vec::new()));
|
||||
window.add_action(&new_album);
|
||||
|
||||
let shortcuts = gio::SimpleAction::new("shortcuts", None);
|
||||
let win = window.clone();
|
||||
shortcuts.connect_activate(move |_, _| show_shortcuts(&win));
|
||||
|
||||
Reference in new issue
Block a user