Mercurial > libervia-web
annotate libervia/web/pages/photos/album/page_meta.py @ 1584:eab815e48795
browser (chat): message edition + extra menu:
- handle extra menu
- implement `quote` action
- last message correction
- show popup with last editions history when "editer" pencil icon is hovered
- up arrow let quickly edit last message
- implement input modes, `normal` being the default, `edit` or `quote` are new ones.
- [ESC] erase input and returns to `normal` mode
- fix size and set focus on message input when page is loaded
- fix identity retrieval on new messages
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 28 Nov 2023 17:59:11 +0100 |
parents | eb00d593801d |
children |
rev | line source |
---|---|
1216 | 1 #!/usr/bin/env python3 |
1239 | 2 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
1518
eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
Goffi <goffi@goffi.org>
parents:
1509
diff
changeset
|
4 from libervia.backend.core.i18n import D_ |
eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
Goffi <goffi@goffi.org>
parents:
1509
diff
changeset
|
5 from libervia.backend.core.log import getLogger |
eb00d593801d
refactoring: rename `libervia` to `libervia.web` + update imports following backend changes
Goffi <goffi@goffi.org>
parents:
1509
diff
changeset
|
6 from libervia.web.server.constants import Const as C |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 |
1145
29eb15062416
pages: set __name__ for imported pages
Goffi <goffi@goffi.org>
parents:
1124
diff
changeset
|
8 log = getLogger(__name__) |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
9 |
1216 | 10 name = "photos_album" |
1418 | 11 label = D_("Photos Album") |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 access = C.PAGES_ACCESS_PROFILE |
1216 | 13 template = "photo/album.html" |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
15 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 def parse_url(self, request): |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
17 self.get_path_args(request, ["service", "*path"], min_args=1, service="jid", path="") |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
18 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 |
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 def prepare_render(self, request): |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
21 data = self.get_r_data(request) |
1326
089742e065e3
pages (files/list, photos/album): updated thumbnails size limits
Goffi <goffi@goffi.org>
parents:
1239
diff
changeset
|
22 data["thumb_limit"] = 800 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
23 data["retrieve_comments"] = True |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
24 files_page = self.get_page_by_name("files_list") |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 return files_page.prepare_render(self, request) |
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 |
1113
cdd389ef97bc
server: code style reformatting using black
Goffi <goffi@goffi.org>
parents:
1085
diff
changeset
|
27 |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 def on_data_post(self, request): |
1509
106bae41f5c8
massive refactoring from camelCase -> snake_case. See backend commit log for more details
Goffi <goffi@goffi.org>
parents:
1418
diff
changeset
|
29 blog_page = self.get_page_by_name("blog_view") |
1070
46622cb54e6c
pages (photos): new photos/album page to use photo album view when displaying files, and display comments is available.
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 return blog_page.on_data_post(self, request) |