Commit graph

233 commits

Author SHA1 Message Date
fd6375613a Add album's author and date to the page. 2021-01-09 10:50:52 -08:00
20a3828dbf Move .tag_card to cards.css. 2021-01-08 14:16:59 -08:00
7f9c7085f0 Rename tag_object -> tag_card. 2021-01-08 13:57:27 -08:00
7373730f90 Add bookmark_card.html, move bookmark_card css to cards.css. 2021-01-08 13:41:49 -08:00
fabbbaf17f Rename photo_cards.css -> cards.css. All types welcome. 2021-01-08 13:40:34 -08:00
7527b3678f Fix reference to response.json_ok -> response.meta.json_ok. 2021-01-08 13:38:30 -08:00
ea5a02f8b6 Use update_dynamic_elements for user name, clipboard count. 2021-01-07 20:18:07 -08:00
02ed3dff92 Add function update_dynamic_elements. 2021-01-07 19:30:10 -08:00
47db917090 Improve text color declaration to inherit from html. 2021-01-07 19:24:17 -08:00
dd54eabd93 Add api endpoint /tag/tagname/add_synonym. 2021-01-05 14:02:08 -08:00
cc2199d59a Let sticky_bottom scroll for very small screens. 2021-01-05 01:25:50 -08:00
29774f2524 Add the clipboard checkbox on pageload, not in server response.
With the recent addition of search_embed iframes on other pages, we
had photo cards appearing but the photo_clipboard module was not
imported thus the checkboxes did nothing. I don't want to import
photo_clipboard onto every single page, I'd rather they click through
to the full search UI. Otherwise every single page will have the tray
and often not a good enough reason for it.
So, since the functionality of the checkbox is completely reliant on
the photo_clipboard.js module anyway, there's no reason not to have it
generated by that module.
2021-01-05 01:24:03 -08:00
7c62c064cb Rename photo_card_selector_checkbox photo_clipboard_selector_checkbox. 2021-01-04 23:31:41 -08:00
58a0a246c8 Add comment regarding sticky_bottom background and :before pseudo. 2021-01-02 23:53:14 -08:00
087238bfad Remove z-index from selected photo overlay. It's not necessary. 2021-01-02 23:52:46 -08:00
0c3ee6f2d2 Add search_embed for bringing search iframes to other pages. 2021-01-02 13:49:43 -08:00
732c054075 Replace height with min-height, fixes squashed bottom margin. 2021-01-02 11:35:46 -08:00
e303b934f7 Add UI for editing user's display name. 2021-01-01 19:46:31 -08:00
84a5e2b4e1 Significant updates to editor.js. 2021-01-01 19:46:06 -08:00
89195d3449 Add comment about response catching strictness levels. 2021-01-01 19:08:36 -08:00
8f9b4142a6 Improve UI performance of selecting / deselecting photo cards.
Move save_clipboard into a 0-timeout. Check checkboxes immediately
instead of relying on apply_check_all / update_pagestate to make a
redundant loop through everything.
2020-12-26 13:21:06 -08:00
0a31dad196 Rewrite these default callbacks as alertresponse. 2020-11-06 22:34:01 -08:00
bf9223bf67 Move response.completed into the meta. 2020-11-06 22:27:41 -08:00
68b27fced2 Add refresh_or_alert so errors aren't missed. 2020-11-06 21:42:28 -08:00
843e8d6743 Oops, put photos_holder rule in etiquette.css, not common. 2020-11-04 17:35:54 -08:00
7770f7640a Add class photos_holder which is centers photos in narrow mode.
In narrow mode, it's very possible to wind up with only 1 photo per row,
and it looks silly when they are left-justified. Centered looks a little
more natural to me in this case.
2020-11-04 17:11:48 -08:00
44952b4b05 Add some docstrings to the request code. 2020-11-03 00:03:48 -08:00
938f8239c7 Rearrange common.js and add headers. 2020-10-17 17:32:19 -07:00
7715e10b12 Trade padding for bigger font on remove_tag_button.
Primarily affects the "unlink" / "delete" buttons on /tags.
Without the padding we can get an extra pt of font size, and these
buttons are somewhat of a readability struggle.
2020-10-17 17:28:32 -07:00
adddba6c97 Simplify this bindable def by reversing the if/def nest.
Instead of defining the function with an internal if that will always
pick the same path, let's use that if to instead define a
straightforward function that just does what we want.
2020-10-13 10:53:56 -07:00
86c09aedc1 Add album_autocomplete.js, so "Add child" box can autocomplete.
This makes putting albums together a little easier, though datalist
performance still leaves a lot to be desired.
2020-10-03 18:37:08 -07:00
4e3e2fea12 Avoid creating emptystring promptclass. 2020-10-03 18:32:21 -07:00
5d802ba9f9 Let response status be 0 even if request didn't complete.
Since meta.status would be undefined for an incomplete request,
I would have to check response.completed && response.meta.status,
which is too much burden. Let's set the status immediately, and
if a callback wants to do further diving we'll use completed then.
2020-10-02 19:43:36 -07:00
d15d5f9856 Set tabbed_container data-active-tab-id on tab change. 2020-10-02 16:53:00 -07:00
ea60190e7d Revert most of failed experiment but keep the good parts.
- tag_autocomplete.tags and .synonyms are separate vars, not in tagset.
- tag_autocomplete.tags is now a Set object for faster resolve().
- get_all_tags moved to api.js.
- server provides "updated" timestamp with the all_tags list.
2020-09-29 16:54:00 -07:00
7e58c95f15 Mostly failed experiment: tag_autocomplete indexeddb.
The current system has bad performance when you've got 100,000+ tags.
I discovered that when the server returns 304, the browser gives the
ajax a 200 with the full response, and it's not clear to me if js can
know it got a 304. So, the tag set is being fully re-parsed from the
response on every page load. I was thinking that I should store that in
IndexedDB to avoid the parsing step, but... since the JSON.parse is
done by my common.get before it hits this function, it's meaningless.
Not to mention I still have to rebuild the datalist on every page since
of course that state isn't shared between tabs. Not worth the DB stuff.
We'll see what happens next.
2020-09-29 16:52:20 -07:00
41353b2eb4 Move current default css into theme_turquoise. Always pick a theme. 2020-09-25 16:27:47 -07:00
3fb198f994 Add explicit @media queries for wide mode, not just default to override.
Any properties that are different in wide/narrow mode should be defined
in the correct media query. I got tired of having wide mode be the
default and then narrow mode having to unset/initial all the attributes
that aren't relevant to narrow.
2020-09-18 21:12:28 -07:00
8da18ba502 Add --narrow, --wide to common.css, is_wide_mode to common.js. 2020-09-18 20:57:35 -07:00
9a29048ccf Split sticky_side functionality into _side, _bottom.
This makes the role of each css definition more clear, and could allow
for cases where the side is sticky in wide mode but not sticky in
narrow mode.
2020-09-18 20:37:40 -07:00
1af8342202 Catch json parse errors, setting json_ok = false. 2020-09-15 23:10:35 -07:00
35b5b5cd21 Some slate.css color tweaks. 2020-09-15 15:04:27 -07:00
2a379919e0 Use grid instead of flexbox for message_area for better gaps. 2020-09-15 15:03:40 -07:00
9102b37d5a Let slate.css use black text on buttons. 2020-09-14 20:25:51 -07:00
dd0ee7a72a Use more const. 2020-09-14 18:33:53 -07:00
733776ee88 Failed experiment: clientside updates of tag actions.
I'm committing this so I can reference it later if I decide to try
again, but for the time being I'm going to immediately revert it.
2020-09-14 17:21:13 -07:00
8659b55103 Use className instead of classList here. 2020-09-14 12:01:33 -07:00
c532b711b1 During init_all, launch individuals as setTimeouts.
I'm having some performance issues with button_with_confirm on /tags.
This won't magically make that faster but I'm trying to stop the main
thread from dragging at least.
2020-09-14 05:54:47 -07:00
2dc1603d5e Use className instead of classList for initialization. 2020-09-14 05:19:10 -07:00
cc34c4d189 Pull out init_* function innards to separate one-item functions. 2020-09-12 20:34:59 -07:00