Commit Graph

9813 Commits

Author SHA1 Message Date
momijizukamori 2661202d5c
Update colorpicker to something more modern (#3122)
* Update colorpicker to something more modern

* Replace terrible old colorpicker with Coloris (https://coloris.js.org/)
* Add CSS for dark theme for Coloris to Gradation CSS
* Nuke files for old colorpicker

Fixes #3035

---------

Co-authored-by: Cocoa <momijizukamori@gmail.com>
2023-06-18 17:33:33 -04:00
Jen 6c8a26e6de
more cleanup (#3128)
* Use of uninitialized value in addition (+) at dw/cgi-bin/LJ/DB.pm line 470.

* tidyall
2023-06-18 12:22:33 -07:00
Jen 052135fc05
fix failing t/media-security.t (#3127)
A line I added in #3100 was failing in testing because there was no
web request object defined in that context. This was the error:

Can't call method "headers_in" on an undefined value at
dw/cgi-bin/DW/Media/Base.pm line 140.

This adds an undefined value check to make sure everything proceeds smoothly.
2023-06-18 12:15:19 -07:00
Jen 75c10b004e
stop suspending yourself, stop suspending yourself (#3125)
@rahaeli says this is the line of code that prevents an admin from
reversing their own suspension if they accidentally suspend
themselves. (Which with the amount of spam accounts we've been dealing
with lately, is not that hard to do.)

It prevents any console command from being executed by a user who
doesn't have a statusvis of V.

There are a LOT of other statusvis codes! Looking at the available
helper methods, `is_inactive` seems like the right one to use. It
encompasses the S (suspended), D (deleted), and X (expunged) codes.
But it still needs to be overridden.

So: don't allow a deleted/suspended/purged user to run a console
command... unless the user has the suspend priv.

Fixes #3111.
2023-06-18 12:14:45 -07:00
Jen 8faece21cd
add me.com and fastmail.com to the list of common email domains (#3126)
Users with email addresses at these common domains complained
about having to confirm they had not misspelled a similar domain.
Add these two to the list so that they are no longer flagged as
possible misspellings.

Fixes #2906. Fixes #3118.
2023-06-18 12:12:40 -07:00
Carly Ho 9bbaa36f3a update suggested interests to less outdated ones 2023-06-17 16:41:43 -04:00
momijizukamori a19583af53
Add spam domain auto-suspend list (#3105)
* Basic hook for detecting spam domains in fields

* Clean up spamcheck hook

* Add spamblocklist as an include and then load from that

* suggested changes for hook (untested)

---------

Co-authored-by: Cocoa <momijizukamori@gmail.com>
Co-authored-by: Kareila <kareila@dreamwidth.org>
2023-06-16 21:07:10 -07:00
Carly Ho 22109571a0
Add Bilibili and Rumble to embeds whitelist and fix CriticalCommons embeds (#3115)
* Add bilibili to embeds

* Add rumble to embeds

* add nekocap to embeds

* update criticalcommons embed code

* Fiddle with nekocap embed

* Remove queries at end

* Remove nekocap for now

* Update tests

* update test count
2023-06-16 21:01:07 -07:00
Carly Ho 1f9a45335e
Add kofi userheads; update FFN userheads (#3119)
* Add kofi userhead stuff

* Issue with hyphen?

* Adjust module casing in case that helps

* Also update fanfiction.net userhead while i'm at it

* Add ffnet user icon to repository
2023-06-16 20:43:17 -07:00
Carly Ho d02ce7509b
Add ArtStation and FurAffinity usernames (#3117)
Co-authored-by: momijizukamori <momijizukamori+bugzilla@gmail.com>
2023-06-16 10:38:12 -04:00
Carly Ho 8fbc52bc46
Add substack username handling (#3113)
* Add username link handling for substack

---------

Co-authored-by: momijizukamori <momijizukamori+bugzilla@gmail.com>
2023-06-16 10:35:04 -04:00
Carly Ho e341d8c957 Add www prefix 2023-06-16 10:30:58 -04:00
Carly Ho 790c5cae08 just kidding. different url formulation 2023-06-16 10:30:58 -04:00
Carly Ho d8bdf3d119 Add itch username handling 2023-06-16 10:30:58 -04:00
Carly Ho e6e12d4876 Updated username in credits from rising to krja 2023-06-16 10:29:00 -04:00
Cocoa e7286e74db Only iterate over array elements, not the entire array object's properties 2023-06-15 18:53:45 -04:00
momijizukamori 96f8c0076d
Hack old drafts functionality into new Create Entries page (#3102)
* Add draft functionality to new entry page

* Add handling for taglist to draft code

---------

Co-authored-by: Cocoa <momijizukamori@gmail.com>
2023-06-15 12:42:20 -04:00
YOUR_NAME 10afc7bac7 Add call to print_meta_tags() for venture layout 2023-06-13 22:21:06 -04:00
Cocoa 7612b99d04 Strip links from the userbio for accounts that aren't validated yet 2023-06-13 12:33:20 -04:00
momijizukamori b3ed62ba43
Merge pull request #3103 from kareila/cleanup-2023q2
Cleanup 2023q2
2023-06-12 15:45:44 -04:00
Kareila a408b974d3 update unsuspend console command to use set_unsuspended user method 2023-06-11 22:02:34 +00:00
Kareila ceff4547c8 tidyall 2023-06-11 21:41:12 +00:00
Kareila 5e446bd2f8 new ga4_analytics key for %SITE_PAGESTAT_CONFIG 2023-06-11 21:39:24 +00:00
Kareila a536110e45 the usual undefined variables 2023-06-11 21:36:12 +00:00
Kareila 73b5708868 move redundant code into _process_get_args and silence warnings
I started to just silence the undefined variable warnings, realized
the same code lines were repeated in another part of the page, and
decided it would be better to move the duplicated code into a
shared subroutine.
2023-06-11 21:35:51 +00:00
Cocoa 5eae5ff6e9 Remove unused site_param_keys variable 2023-06-11 16:01:54 -05:00
Cocoa 315a10d365 Clean up Perl -> JS dumping 2023-06-11 16:01:54 -05:00
momijizukamori 3e5210f834
Fix some weirdness caused by Firefox reselecting on reload (#3101)
Co-authored-by: Cocoa <momijizukamori@gmail.com>
2023-06-11 15:37:05 -04:00
Jen 1c461ee7c2
also don't allow gifts of premium time for paid accounts (#3074)
Denise brought up the fact that buying premium time for
someone else's paid account, while a nice gesture, shouldn't
be allowed because it forces the account's existing paid time
to be upgraded to a shorter amount of premium paid time.
Users can buy premium time for their own paid accounts, but
not other people's.
2023-06-11 12:19:43 -07:00
alierak 604945dfbd
use a unique temp file and clear / remove it between runs (#3099) 2023-06-11 12:18:43 -07:00
Jen a1feac699a
add admin view to /file/list (#3100)
* add admin view to /file/list

* tidy
2023-06-11 12:18:10 -07:00
dependabot[bot] a9a8fcdfaf Bump yaml from 2.1.3 to 2.2.2 in /api
Bumps [yaml](https://github.com/eemeli/yaml) from 2.1.3 to 2.2.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.1.3...v2.2.2)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-10 08:05:27 -05:00
momijizukamori a441bf67b4
RTE hacks (#3096)
* Shoving the old RTE in the new entry page

---------

Co-authored-by: Cocoa <momijizukamori@gmail.com>
2023-05-30 18:46:02 -04:00
momijizukamori be2408de12
Merge pull request #3095 from momijizukamori/ga-script
Add new GA4 google analytics script into pages
2023-05-29 14:07:27 -04:00
Cocoa ac42bdfb61 Add new GA4 google analytics script into pages 2023-05-29 17:56:20 +00:00
momijizukamori aeaf54bf90
Merge pull request #3094 from kareila/ga4-setting
[#2954] new GoogleAnalytics4 user setting
2023-05-29 12:51:05 -04:00
Kareila 0dc01c9684 new GoogleAnalytics4 user setting
This is the bare minimum of code needed to allow users to tell us
their IDs for use with the new version of Google Analytics.
It doesn't do anything with that information yet.

* new module cgi-bin/DW/Setting/GoogleAnalytics4.pm, which is more or less
  a clone of cgi-bin/DW/Setting/GoogleAnalytics.pm with tweaks

* both settings modules are retained to allow for a transition period;
  the labels on /manage/settings are "Google Analytics ID" and
  "Google Analytics ID (v4)"

* new userprop ga4_analytics

* new user method ga4_analytics

I couldn't find a format guideline for the ID values. The setting module
enforces a format of "G-" followed by at least 10 alphanumeric characters,
saved as uppercase. If that turns out to be wrong, we can tweak it later.
2023-05-29 02:48:14 +00:00
momijizukamori 298c488621
Merge pull request #3089 from momijizukamori/inbox-tweaks-canary
New inbox polish
2023-04-23 18:19:35 -04:00
Cocoa 8f4076d07d New inbox polish
- Add 'No Messages' display text for empty inboxes
- Refactor header/footer code for easier updates
- Add code to mark messages read on normal click on action links
- Add trash icon to delete buttons
- Add left padding to messages on small media queries
2023-04-23 22:10:23 +00:00
momijizukamori 90cd4e6d0c
Merge pull request #3087 from momijizukamori/inbox-tweaks-canary
Fix for annoying button flash on initial inbox load
2023-04-17 19:15:01 -04:00
Cocoa 4bb882c728 Fix for annoying button flash on initial inbox load 2023-04-17 23:11:14 +00:00
momijizukamori 095cadacdb
Merge pull request #3079 from momijizukamori/inbox-tweaks-canary
Refactor of inbox code to fix button overwhelm.
2023-04-17 11:48:34 -04:00
Mark Smith 1d935915d2 Add exception list for captcha 2023-04-05 22:51:43 -07:00
Cocoa 3975c86a84 Updates to refactored inbox
- Correct which buttons show when
- Retain collapsed messages on actions
- Update message count in folder menu when making changes to messages
- Fix current page link color in pagination
2023-03-28 20:38:24 +00:00
Cocoa 61fbca9934 Merge branch 'main' into inbox-tweaks-canary 2023-03-28 19:13:00 +00:00
momijizukamori 36f5fa7c53
Merge pull request #3071 from momijizukamori/674-header-navlinks
Add basic support for navlinks in headers in core2
2023-03-05 15:08:28 -05:00
Cocoa 9edfa12121 Add basic support for navlinks in headers in core2 2023-03-05 19:57:40 +00:00
Michael 4374b5b002 Restored close-bracket in config-local.pl.example (#3068) 2023-02-13 14:03:43 -06:00
Jen e1a6869015
try again with warning users off buying regular paid time for premium accounts (#3022)
* revert the reversion

* tweaks pt 1

* better error checking on arguments to DW::Pay functions.
  they don't behave nicely when given bogus inputs,
  causing the widget to quietly bomb out from under us.

* also check additional logic in allow_account_conversion
  for permitting paid time to be applied to a premium account.

* note that the 0.7 is expressed as a constant elsewhere.
  possibly this whole code block should be redefined as
  a hook since it assumes dw-nonfree business logic.

* tweaks pt 2

This isn't pretty, but it prevents the scenario where widget
errors disappear into a BML block that was being ignored.
That's why we were seeing the problem with purchase attempts
disappearing instead of telling us what went wrong.

One day, someone will rewrite LJ::Widget not to use BML.
2023-01-04 15:44:58 -08:00
Jen 7df3589f23
[#2921] fix table header background color on Foundation pages (#3026)
I found where the table header link colors were specified
and dropped in a rule for a background color so that the
links would be legible again.

It was very obvious on the admin/statushistory page, but
this should affect any Foundation pages with similarly
defined table header elements.

I don't know if this is the best solution, but it seems
like an improvement. I did check legibility in all the
different site schemes.
2023-01-04 15:43:03 -08:00