588 Commits

Author SHA1 Message Date
FoxxMD
1ac7ad4724 Merge branch 'edge' 0.10.4 2022-01-03 16:35:01 -05:00
FoxxMD
0ae74fdce1 docs: Add missing config box screenshot 2022-01-03 13:42:35 -05:00
FoxxMD
845173822c docs(onboarding): Update moderator getting started to reflect new editor capabilities 2022-01-03 13:40:17 -05:00
FoxxMD
edb3036957 feat(editor): Resolve raw url from github blob url 2022-01-03 13:31:54 -05:00
FoxxMD
3790f0e061 feat(editor): Implement wiki page creation
If page is not created yet detect it and require more perms for re-authorization
2022-01-03 13:23:31 -05:00
FoxxMD
e3e4e4abff feat(editor): Resolve raw gist url from gist id 2022-01-03 11:50:23 -05:00
FoxxMD
fd9b83437b feat(editor): Use manager format to infer format for editor
* Provide wiki format in manager data to status api
* Remove additional View link and instead infer format for querystring from manager data
2022-01-03 11:17:04 -05:00
FoxxMD
05694f115c fix(editor): Fix how initial editor value is set
For some reason providing the data directly to a new model doesn't trigger validation and also had some other weird effects. Instead, using an empty string as initial value and then set model value to data afterwards -- which fixes everything b/c idk why.
2022-01-03 11:15:29 -05:00
FoxxMD
70ee157198 feat(config): Make manager aware of config format
* Default format to yaml
* Add detected config format as property to manager
* When neither format is valid use starting character to (naively) detect json or not
* Reduce config error noise by only show one format error based on likely type and print other to debug
2022-01-03 10:58:02 -05:00
FoxxMD
bbb4ec3c2d fix: Fix missing hyphen character on regex for parsing reddit entity name
Reddit users can have hyphens in their names. Slight tradeoff for allowing hyphens for subreddit names (they are non existent) to allow all valid reddit user names is worth it.

Found and corrected by @prometheus-22
2021-12-31 00:04:25 -05:00
FoxxMD
acb72551ec fix(bot): Add missing invite check in healthloop 2021-12-30 23:09:09 -05:00
FoxxMD
bf6affe592 feat(bot): Add basic programmatic moderator invitation acceptance
* Store subreddits to try to accept invites from in bot's default cache
* Handle invitation scenarios (none, modself missing, accepted) and starting manager after invitation
* Implement basic invitation acceptance list control in UI for bot operators
2021-12-30 22:52:37 -05:00
FoxxMD
8c2cb02a46 feat(bot): Add modself oauth permission
Used for accepting moderator invitations
2021-12-30 20:25:51 -05:00
FoxxMD
73e2af2100 feat(manager): Improve wiki page creation
* Only try page creation if response error is a 404
* Improve permission error descriptions
* Only create if it can also set page permissions to improve security
2021-12-30 19:08:47 -05:00
FoxxMD
ba4c4af5a7 Update invite view 2021-12-30 18:00:11 -05:00
FoxxMD
9ad21ee2dd feat(bot): Add ability to create non-existing wiki page and change visibility 2021-12-25 21:13:55 -05:00
FoxxMD
b32c4f213c docs(yaml): Finish adding yaml examples
#61
2021-12-25 16:42:44 -05:00
FoxxMD
7e01c8d1f8 docs(yaml): add yaml examples fo activities window
#61
2021-12-25 16:28:58 -05:00
FoxxMD
aee158ecc9 docs(yaml): add attribution and advanced concepts yaml examples
#61
2021-12-25 16:18:13 -05:00
FoxxMD
8cd2243c2d docs(yaml): add history and author yaml examples
#61
2021-12-25 16:07:46 -05:00
FoxxMD
4969789532 docs(yaml): add recentActivity yaml examples
#61
2021-12-25 15:53:54 -05:00
FoxxMD
1dcfdc14d1 docs(yaml): add regex yaml examples
#61
2021-12-25 15:23:34 -05:00
FoxxMD
f1c9b64f64 docs(yaml): Add more examples
#61
2021-12-23 21:35:18 -05:00
FoxxMD
2e5a61566b docs(yaml): create yaml versions of subreddit ready examples
#61
2021-12-23 12:34:50 -05:00
Matt Foxx
85761fa662 Merge pull request #65 from rysie/edge-submission-flair-fix
Flair action fix: import + assigning flair by flair_template_id
2021-12-23 09:33:34 -05:00
Marcin Macinski
0b1a6bd77b Flair action fix: import + assigning flair by flair_template_id 2021-12-23 12:34:08 +01:00
FoxxMD
1c9ed41e70 feat(ui): Implement basic wiki editing capabilities for editor
* Use stored scope to determine if user can save
* Only show save action if loaded from a subreddit
* Implement re-authorization flow through popup window and sockets to update status in editor
* Implement wiki location endpoint for server and wiki save endpoint for client
2021-12-21 16:30:57 -05:00
FoxxMD
2d67f9f57d refactor(ui): Migrate all editor usage to monaco-yaml base
* monaco-yaml can also do json validation since its just normal monaco
* simplifies config.ejs greatly not having to maintain two different monaco implementation, at the expense of a larger project
2021-12-21 14:22:26 -05:00
FoxxMD
975bcb6ad7 feat(ui): Enable additional scopes usage
* Store scopes in user auth object/sessions
* Implement requesting additional scopes through login route
2021-12-21 12:30:33 -05:00
FoxxMD
2a282a0d6f Merge branch 'edge' 0.10.3 2021-12-21 09:35:21 -05:00
FoxxMD
0d087521a7 feat(docs): Specify yaml can be validated in editor 2021-12-21 09:35:06 -05:00
FoxxMD
fb5fc961cc feat(docs): Add youtube credentials requirements for repost rule 2021-12-21 09:33:24 -05:00
FoxxMD
c04b305881 feat(docs): Add link-spamming regex config 2021-12-21 09:22:35 -05:00
FoxxMD
5c5e9a26aa refactor(ui): Unify editor look-and-feel
* Use named entry files for webpack so we can access them from config.ejs
* Move some of the validation logic to config.ejs so it can be used by json editor as well
* Use same controls for loading files/schemas/urls for both editors
* Add validation errors box for both editors
2021-12-20 23:30:41 -05:00
Matt Foxx
477d1a10ae Merge pull request #60 from rysie/edge
Support setting user flair by flair_template_id
2021-12-20 18:37:36 -05:00
Marcin Macinski
bbee92699c Support setting user flair by flair_template_id 2021-12-21 00:10:40 +01:00
FoxxMD
7f09043cdf fix(ui): Add missing yaml asset files
Need to unignore them...
2021-12-20 15:56:36 -05:00
FoxxMD
768a199c40 feat(ui): Add quick-n-dirty YAML editor
Using one-off project cm-yaml http://github.com/foxxmd/cm-yaml to run a static version of monaco-yaml inside CM
2021-12-20 15:42:37 -05:00
FoxxMD
6e4b0c7719 feat(regex): Add match sample to rule results so it can be used in content template 2021-12-20 12:33:40 -05:00
FoxxMD
89b21e6073 fix(repost): Use average of all algos to get high score
Ensures no anomalous scores dominate
2021-12-18 18:44:52 -05:00
FoxxMD
da611c5894 fix(repost): Fix max weighted score and formatting 2021-12-18 18:22:38 -05:00
FoxxMD
2c90a260c0 fix(stream): Remove processing clear behavior for polling to try to fix weird polling behavior 2021-12-18 18:08:00 -05:00
FoxxMD
f081598da6 feat(repost): Improve text matching and default values
* Use 3 different matching algorithms using the highest score out of the three
* Weight score based on length of the sentence
* Increase minimum number of words to 3
* Enforce min word count on external (youtube) comments
2021-12-18 17:42:43 -05:00
FoxxMD
55f45163a4 feat(repost): Fix some bugs and improve result data
* Wrong hash check
* Add closest match summary and percent for use in content
2021-12-18 14:54:01 -05:00
FoxxMD
e4dfa9dde3 refactor(docker): reduce image size with best practices
* use --no-cache so repository index isn't included in image
* use FROM instructions to build project with dev dependencies, then copy built project to new stage and install production-only libraries
* properly ignore docs and node_modules with dockerignore
2021-12-17 15:10:22 -05:00
FoxxMD
0e395792db refactor: Remove unusused ts-auto-guard package
Has @ts-morph as a dependency which is a huge package
2021-12-17 14:36:03 -05:00
FoxxMD
dcbeb784e8 refactor: Remove set-random-interval
* depended on and always downloaded an entire, older typescript version (even with production install) -- was not necessary for one function
* refactor project to use newer TS version (specify any type for catch blocks to fix compiler errors)
2021-12-17 14:25:48 -05:00
FoxxMD
aeaeb6ce27 refactor(docker): Remove monaco editor local dependency to reduce image size
Wasn't necessary to have it installed locally (can use CDN) and is not a part of the core experience
2021-12-17 14:00:54 -05:00
FoxxMD
d6a29c5914 fix(bot): Actually get all moderated subreddits
Previously was only getting first page of moderated subreddits (listing). Make sure to get all pages.
2021-12-17 13:24:09 -05:00
FoxxMD
c1224121d4 feat(subreddit): Implement user profile filtering for SubredditState
* Add convenience property for filtering subreddits by user profile prefix (u_)
* Do some smart property comparison to check if SubredditState name is regex or not -- use additional user prof check if it is so we don't clobber existing name regex

Closes #56
2021-12-17 13:01:47 -05:00