Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue frontend for Project area (and other stuff) #949

Open
wants to merge 170 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
ea7c45b
Tweak tags a bit, and remove channels and recommended versions, prepa…
Katrix Oct 14, 2019
16f40cc
Version API stuff, plus some tag stuff
Katrix Oct 14, 2019
8f19fd7
Goodbye tags, static info is much better
Katrix Nov 14, 2019
12ef376
Dummy out more stuff
Katrix Nov 15, 2019
13154f2
Split up ApiV2Controller
Katrix Nov 15, 2019
b8aff84
Some work on project PATCH
Katrix Nov 21, 2019
49628fe
Make caching an action
Katrix Nov 23, 2019
b1e6ef6
Version impl
Katrix Nov 23, 2019
05d27ee
Prepare for merging in master
Katrix Nov 23, 2019
fc2f764
Merge branch 'staging' into feature/tags
Katrix Nov 23, 2019
d43425b
Fix back evolution if legacy_channel is NULL
Katrix Nov 23, 2019
5a268a4
Add platforms to version table
Katrix Nov 23, 2019
4f78875
Add the new controllers to the swagger domain namespaces
Katrix Nov 23, 2019
9893775
Tons of small fixes
Katrix Nov 24, 2019
3938442
Misc cleanup. Use squeal-category instead of rolling our own
Katrix Nov 26, 2019
6317ff1
Add stability and release type query params
Katrix Dec 11, 2019
fcee512
Squeal update + misc fixes
Katrix Dec 11, 2019
b0c5cd5
Add page queries
Katrix Dec 12, 2019
8f50027
More deletions
Katrix Dec 12, 2019
e828272
Start frontend stuff
Katrix Dec 12, 2019
ca597f9
Merge branch 'staging' into feature/tags
Katrix Jan 30, 2020
5d4fdc4
Remove unintended commited config file
Katrix Dec 14, 2019
1384e16
Project home now renders using the Vue frontend
Katrix Jan 14, 2020
d72a200
Moved some files around
felixoi Jan 14, 2020
74225a9
Markdown-it
felixoi Jan 14, 2020
a8e3c36
It's time for a router
felixoi Jan 16, 2020
3e4373c
Settings and permissions
felixoi Jan 16, 2020
abf9d46
Untwirl the frontend
Katrix Jan 20, 2020
2383527
Add wildcard route for projects
Katrix Jan 21, 2020
f13c6f7
Tons of work on projects stuff
Katrix Jan 21, 2020
c4d250d
Project settings rendering properly
Katrix Jan 22, 2020
d5e64f9
Start work on version page
Katrix Jan 26, 2020
e99600a
Most core functionality is now in place
Katrix Jan 29, 2020
4d09442
Fix compile errors from stuff missed in the rebase
Katrix Feb 2, 2020
8fc3464
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Feb 22, 2020
1b81708
Fix tests
Katrix Feb 23, 2020
1bc3d90
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Mar 16, 2020
4ee1a59
Fix merge oversight
Katrix Mar 21, 2020
cdf2186
Improve caches (#954)
Katrix Mar 22, 2020
0fc0da8
Implement basic editor (#951)
Katrix Mar 25, 2020
261f53c
Added vue-fontawesome (#960)
felixoi Mar 27, 2020
dbaae85
Page list (#952)
Katrix Mar 27, 2020
241e296
Implement the project header (#959)
Katrix Mar 27, 2020
0106e48
Functional version list (#962)
Katrix Mar 27, 2020
939d6f9
Show project members correctly (#961)
Katrix Mar 27, 2020
5e511dc
Bring download buttons back (with a guest apperance from changelog) (…
Katrix Apr 2, 2020
103b27c
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Apr 10, 2020
382a8cc
Start work on settings page
Katrix Apr 10, 2020
209bc71
Improve star and watch buttons a tiny bit (#968)
Katrix Apr 12, 2020
0119458
Merge Home and project pages
Katrix Apr 13, 2020
20c46e8
Extract sponsor list to it's own file
Katrix Apr 13, 2020
1ba868e
Add deploy key handling
Katrix Apr 16, 2020
21cefe8
No need to show this here
Katrix Apr 16, 2020
1b4b10c
Implement icon updates
Katrix Apr 16, 2020
88d594c
Visibility done
Katrix Apr 16, 2020
936623e
Random sponsor -> computed
felixoi Apr 16, 2020
509188b
Merge Home and Project vue entry (#969)
Katrix Apr 16, 2020
a278044
Add hard deleting
Katrix Apr 16, 2020
d9d86b6
Merge remote-tracking branch 'origin/refactor/vue-user-frontend' into…
Katrix Apr 16, 2020
4b40c86
Delete fixes, and exact query fix
Katrix Apr 16, 2020
d92838e
Add Vuex
Katrix Apr 16, 2020
7a9b1d4
Fix setting settings when it's not the first page loaded
Katrix Apr 16, 2020
7f301dd
Implement minimal loading bar
Katrix Apr 16, 2020
0325fee
Add clientside config object
Katrix Apr 16, 2020
9bdbccf
Remove debug code
Katrix Apr 16, 2020
257b802
Fix CI
Katrix Apr 16, 2020
6ed9652
Maybe this does the trick?
felixoi Apr 16, 2020
907bfd5
Merge pull request #971 from SpongePowered/refactor/vue/vuex
Katrix Apr 16, 2020
6b1274a
Merge remote-tracking branch 'origin/refactor/vue-user-frontend' into…
Katrix Apr 16, 2020
cd2b9a8
Bit more daring
Katrix Apr 16, 2020
3b262aa
May have fucked up here..
felixoi Apr 16, 2020
aee200b
Merge pull request #972 from SpongePowered/vue/refactor/loading-bar
Katrix Apr 16, 2020
25fc5eb
Merge remote-tracking branch 'origin/refactor/vue-user-frontend' into…
Katrix Apr 16, 2020
ae6fa10
Fixed lodash tree shaking
felixoi Apr 16, 2020
212418b
Merge pull request #973 from SpongePowered/refactor/vue/config
Katrix Apr 16, 2020
3ffac8d
Import lodash function in project store
Katrix Apr 16, 2020
20ef52a
Merge branch 'refactor/vue-user-frontend' into refactor/vue/settings
Katrix Apr 16, 2020
09779b9
Some more fixes and updates to project settings
Katrix Apr 16, 2020
339be02
Make version pages functional
Katrix Apr 16, 2020
7b2a0bc
Use vendor css file instead of manual copies
felixoi Apr 17, 2020
4bd35cd
Project members done
Katrix Apr 18, 2020
9e6e895
Extract webpack parts of scalajs-bundler into it's own plugin
Katrix Apr 19, 2020
eb6db35
Forgot this
Katrix Apr 19, 2020
d9f2727
Fix compile
Katrix Apr 19, 2020
7b20e99
Fix build
felixoi Apr 19, 2020
5f67d76
Merge branch 'refactor/vue-user-frontend' into refactor/vue/settings
Katrix Apr 19, 2020
9499b58
Well..
felixoi Apr 19, 2020
f4f1e55
Sort packages and remove unused vars
felixoi Apr 19, 2020
162465d
Explicitly set os for travis
felixoi Apr 19, 2020
9280341
Fix tests
Katrix Apr 20, 2020
65ce515
Some delete improvements
Katrix Apr 20, 2020
0e65f8e
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Apr 20, 2020
b7561d2
Make merge easier
Katrix Apr 20, 2020
156cc4b
Merge branch 'refactor/vue-user-frontend' into refactor/vue/settings
Katrix Apr 20, 2020
2446551
Fix compilation
Katrix Apr 20, 2020
913cd2b
Fix update empty and delete redirect
Katrix Apr 20, 2020
5e13d16
Slightly less boilerplate
Katrix Apr 20, 2020
78e2c6c
Only show accepted admin users
Katrix Apr 20, 2020
93a9542
Merge pull request #976 from SpongePowered/refactor/vue/settings
Katrix Apr 20, 2020
b0dea62
Merge branch 'refactor/vue-user-frontend' into refactor/vue/functiona…
Katrix Apr 20, 2020
74a7191
Merge pull request #980 from SpongePowered/refactor/vue/functional-ve…
Katrix Apr 20, 2020
c29d211
Merge branch 'refactor/vue-user-frontend' into refactor/vue/webpack-p…
Katrix Apr 20, 2020
5589812
Fix ignore location
Katrix Apr 20, 2020
9b4cc55
Merge pull request #975 from SpongePowered/refactor/vue/webpack-plugin
Katrix Apr 20, 2020
87db36b
Merge remote-tracking branch 'origin/staging' into refactor/vue-user-…
Katrix Apr 22, 2020
500e1b4
Disallow / in page name (#984)
Katrix Apr 23, 2020
7eac389
Project Discussion Vue (#981)
felixoi Apr 23, 2020
759d192
Edit versions (#987)
Katrix Apr 23, 2020
7dbe7dd
Remove a bunch of old and unused code (#988)
Katrix Apr 23, 2020
1698c91
Userpage, header, footer in Vue (#989)
Katrix Apr 24, 2020
f104c23
Project Creation Vue (#990)
felixoi May 5, 2020
fbae5b3
ESLint and Prettier (#994)
felixoi May 8, 2020
f60b7a1
Disabled module transformation (#995)
felixoi Jun 20, 2020
479d6f0
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Jul 12, 2020
5c9b284
Updated dependencies (#999)
felixoi Jul 12, 2020
d6e6780
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Aug 2, 2020
933f271
Some misc Vue fixes and improvements (#1007)
Katrix Aug 2, 2020
f0da8f1
Better sluging of project names (#1006)
Katrix Aug 2, 2020
668a838
Add new version creation Fixes #618 (#1011)
Katrix Aug 4, 2020
a8eabd7
Some more misc fixes (#1010)
Katrix Aug 4, 2020
82103ec
Add setting section to set discourse post and topic id Fixes#718 (#1012)
Katrix Aug 6, 2020
b8e88f6
Move the project endpoints from /projects/:pluginId to /projects/:own…
Katrix Oct 11, 2020
611db49
Special case plugin upload size instead of keeping a high global size…
Katrix Oct 11, 2020
805d89e
Disallow organization members where needed, and patch permission esca…
Katrix Oct 11, 2020
4f43435
Update dependencies (#1013)
Katrix Oct 11, 2020
417cba3
Combine user and key perms correctly
Katrix Oct 11, 2020
adb6c6e
Add build info to health report page (#1018)
Katrix Oct 11, 2020
883a2c2
Fix a bunch of warnings from Slick and it's outdated syntax (#1017)
Katrix Oct 11, 2020
1f3fa39
Fix discourse auth params (#1019)
Katrix Oct 22, 2020
0f48195
Use Api-Key in the header for sync sso (#1022)
Katrix Oct 25, 2020
8728939
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Oct 25, 2020
2d263af
Fix webpack filters
Katrix Oct 25, 2020
bc4b5fc
Pretty print config load failures
Katrix Oct 25, 2020
7237a26
Check user perms in scope if no API key is present (#1023)
Katrix Oct 30, 2020
dcd40ec
Minor JS fixes (#1024)
Katrix Oct 30, 2020
e0b5563
New pages are completely lowercase (#1026)
Katrix Oct 30, 2020
e3587ca
Fix new page modal not showing (#1028)
Katrix Nov 2, 2020
9e0730e
Enable webpack build monitoring (#1027)
Katrix Nov 2, 2020
1a8a40f
Data defined loaders and platforms (#1025)
Katrix Nov 20, 2020
ed4457c
Bunch of small fixes for Vue stuff (#1031)
Katrix Nov 27, 2020
0fca85b
OpenAPI fixes (#1036)
Katrix Nov 28, 2020
17e2c32
Fix mediawiki link location (#1029)
Katrix May 31, 2022
9a32154
Clean up the DB queries a bit (#1033)
Katrix May 31, 2022
56b2d51
Some more misc fixes (#1035)
Katrix May 31, 2022
a856749
Merge branch 'staging' into refactor/vue-user-frontend
Katrix May 31, 2022
e42efc6
Fix misc compile bugs, and update tons of stuff
Katrix May 31, 2022
7e7407d
Update to Webpack 5
Katrix Jun 1, 2022
4f76aae
ESLint works again
Katrix Jun 1, 2022
1f6b354
Misc vue bug fixes (#1060)
Katrix Jun 1, 2022
0b6f7dd
Scope changes and other misc fixes
Katrix Jun 1, 2022
73cb53e
Fix tests
Katrix Jun 1, 2022
b31c9f9
Create the scope to test against before processing the request also f…
Katrix Jun 1, 2022
e859a9d
Fix Sponge info file location
Katrix Jun 1, 2022
456b972
Don't use exact when getting projects by namespace
Katrix Jun 1, 2022
00499f5
Merge branch 'staging' into refactor/vue-user-frontend
Katrix Oct 17, 2023
fb08d44
Merge branch 'refactor/vue/dont-use-exact' into refactor/vue-user-fro…
Katrix Oct 17, 2023
b3355c5
Merge branch 'refactor/vue/new-sponge-plugins-location' into refactor…
Katrix Oct 17, 2023
cfb512f
Merge branch 'refactor/vue/scope-updates2' into refactor/vue-user-fro…
Katrix Oct 17, 2023
b973426
Fix platform query not working correctly
Katrix Oct 17, 2023
f5f5758
Fix visibility filter
Katrix Oct 17, 2023
269db99
Page and other frontend fixes
Katrix Oct 17, 2023
fbf202a
Update Scala and sbt in hopes that it makes them compile in the CI
Katrix Oct 17, 2023
014bd6f
Update some more stuff in the hopes that CI will work
Katrix Oct 17, 2023
4c155d5
Update CI workflows
Katrix Oct 17, 2023
1ea8cd6
Specify lock file location for Yarn
Katrix Oct 17, 2023
156281b
Forgot to set client-dir
Katrix Oct 17, 2023
b460730
Update java versions strings
Katrix Oct 17, 2023
cc1e617
Try compiling only with Java 8
Katrix Oct 17, 2023
905f356
Fix config.json5 template
Katrix Oct 17, 2023
5a9460a
Re-enable newer Java versions, update pure config, and try again
Katrix Oct 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
62 changes: 38 additions & 24 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ jobs:

strategy:
matrix:
java: [1.8, 1.11]
java: [8, 11, 17]

env:
PGPORT: 5432
DB_USERNAME: postgres
DB_PASSWORD: postgres
DB_DATABASE: postgres
client-dir: ./oreClient

services:
postgres:
Expand All @@ -31,38 +32,21 @@ jobs:
- 5432:5432

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 16.16.0
cache: 'yarn'
cache-dependency-path: ${{env.client-dir}}/yarn.lock

- name: Set up JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}

- name: Cache sbt Ivy cache
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**.sbt', 'project/**/*.scala') }}
restore-keys: ${{ runner.os }}-sbt-ivy-cache

- name: Cache sbt Coursier cache
uses: actions/cache@v1
with:
path: ~/.cache/coursier
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**.sbt', 'project/**/*.scala') }}
restore-keys: ${{ runner.os }}-sbt-coursier-cache

- name: Cache sbt
uses: actions/cache@v1
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-${{ hashFiles('**.sbt', 'project/**/*.scala', 'project/build.properties') }}
restore-keys: ${{ runner.os }}-sbt
cache: sbt

- name: Initialize postgres extensions
env:
Expand All @@ -75,6 +59,36 @@ jobs:
run: |
cp ore/conf/application.conf.template ore/conf/application.conf
cp jobs/src/main/resources/application.conf.template jobs/src/main/resources/application.conf
cp oreClient/src/main/assets/config.json5.template oreClient/src/main/assets/config.json5

- name: Run compile
run: sbt "oreAll/compile;ore/test;ore/assets"

lintClient:
runs-on: ubuntu-latest

strategy:
matrix:
node: [14, 16]

env:
client-dir: ./oreClient

name: Client Linting (Node ${{ matrix.node }})
steps:
- uses: actions/checkout@v4

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: ${{env.client-dir}}/yarn.lock

- name: Install dependencies
run: yarn install
working-directory: ${{env.client-dir}}

- name: Run linting
run: yarn run lint
working-directory: ${{env.client-dir}}
74 changes: 37 additions & 37 deletions .github/workflows/scalafmt.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
name: Scalafmt Check

on:
push:
paths:
- '**.scala'
- '**.sc'
- '**.sbt'
pull_request:
paths:
- '**.scala'
- '**.sc'
- '**.sbt'

jobs:
check:

runs-on: ubuntu-latest

env:
VERSION: 2.4.2

steps:
- uses: actions/checkout@v2

#- name: Cache Scalafmt native image
# id: cache
# uses: actions/cache@v1
# with:
# path: scalafmt-native
# key: ${{ runner.os }}-scalafmt-native-image-${{ hashFiles('scalafmt-native') }}

#- name: Download Scalafmt-native
# if: steps.cache.outputs.cache-hit != 'true'
# run: curl https://raw.githubusercontent.com/scalameta/scalafmt/master/bin/install-scalafmt-native.sh | bash -s -- $VERSION $GITHUB_WORKSPACE/scalafmt-native

- name: Check formatted
name: Scalafmt Check
on:
push:
paths:
- '**.scala'
- '**.sc'
- '**.sbt'
pull_request:
paths:
- '**.scala'
- '**.sc'
- '**.sbt'
jobs:
check:
runs-on: ubuntu-latest
env:
VERSION: 2.4.2
steps:
- uses: actions/checkout@v4
#- name: Cache Scalafmt native image
# id: cache
# uses: actions/cache@v1
# with:
# path: scalafmt-native
# key: ${{ runner.os }}-scalafmt-native-image-${{ hashFiles('scalafmt-native') }}
#- name: Download Scalafmt-native
# if: steps.cache.outputs.cache-hit != 'true'
# run: curl https://raw.githubusercontent.com/scalameta/scalafmt/master/bin/install-scalafmt-native.sh | bash -s -- $VERSION $GITHUB_WORKSPACE/scalafmt-native
- name: Check formatted
run: ./scalafmt --check --non-interactive
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ local.properties
node_modules

# Ore
oreClient/src/main/assets/config.json5
oreClient/dist
jobs/src/main/resources/application.conf
ore/conf/application.conf
/project/project/target
Expand All @@ -191,6 +193,7 @@ RUNNING_PID
gradle
.gradle
build
user.sbt

# Hydra
project/hydra.sbt
Expand Down
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ In a typical development environment, most of the defaults are fine. Here are a
For `ore`:
* You can disable authentication by setting `application.fakeUser` to `true`.

You also need to create a copy of `oreClient/src/main/resources/assets/config.json5.template` named `config.json5`. Try to mirror the values you used in the `application.conf` file here.

## Running

Running Ore is relatively simple.
Expand Down Expand Up @@ -61,3 +63,39 @@ For `jobs`:
more stack size to sbt in the way you're starting sbt. `-Xss4m` should be enough. If you're using IntelliJ, you can set
this in the VM arguments field. If you're invoking sbt directly, the most common ways to set this is either through
the `SBT_OPTS` environment variable, or with a file named `.jvmopts` with each flag on a new line.

### Running with Webpack dev server
Play can be a bit slow to reload the application sometimes. Therefor it can be nice to instead use webpack's hot module
replacement. To do so, there are a few extra steps you need to go through.

1. Comment out the line with `webpackMonitoredDirectories` in `build.sbt` (not needed, just for sanity with reloading)
2. Add this to your `application.conf` under the filters section
```
cors {
allowedOrigins = ["http://localhost:8080"]
}
```
3. If you want to see a logged in view, set `alwaysTryLogin` to `true` in `config.json5`
4. Start Ore like normal
5. Use `yarn run start` to start the webpack dev server
6. Navigate to `http://localhost:8080`

#### Disable webpack monitoring
By default, Ore will monitor the frontend for changes and rebuilt it whenever it sees any. If you're running Ore with
the webpack server, this can be more of a hinderance. If you wish to disable it, add this to a new file
called `user.sbt` in the root folder.
```scala
lazy val setNoMonitoredFiles: State => State = { s: State =>
val projectID = "oreClient"
val value = Nil
if (Project.extract(s).get(LocalProject(projectID) / Assets / webpackMonitoredDirectories) == value)
s
else
s"""set (LocalProject("$projectID") / Assets / webpackMonitoredDirectories) := $value""" :: s
}

Global / onLoad := {
val old = (Global / onLoad).value
setNoMonitoredFiles compose old
}
```
Loading