diff --git a/.forgejo/workflows/nicolium.yaml b/.forgejo/workflows/nicolium.yaml deleted file mode 100644 index c05da0425..000000000 --- a/.forgejo/workflows/nicolium.yaml +++ /dev/null @@ -1,88 +0,0 @@ -name: Nicolium CI - -on: - push: - branches: ["develop"] - pull_request: - branches: ["develop"] - -jobs: - build: - container: - image: "ghcr.io/catthehacker/ubuntu:runner-22.04" - runs-on: docker - name: Test and upload artifacts - strategy: - matrix: - node-version: [22.x] - - steps: - - name: Install system dependencies - run: | - sudo apt update - sudo apt install -y zip - - - name: Checkout code - uses: actions/checkout@v3 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install deps - working-directory: ./packages/nicolium - run: yarn install --ignore-scripts - - - name: Lint - working-directory: ./packages/nicolium - run: yarn lint - - - name: Build - env: - NODE_ENV: production - working-directory: ./packages/nicolium - run: yarn build - - - name: i18n - working-directory: ./packages/nicolium - run: | - yarn i18n - git diff - git diff --quiet || (echo "Locale files are out of date. Please run \`yarn i18n\`" && exit 1) - - - name: Include archive - working-directory: ./packages/nicolium/dist - run: zip -r ../nicolium.zip . - - - name: Build with landing page - env: - NODE_ENV: production - working-directory: ./packages/nicolium - run: | - WITH_LANDING_PAGE=true yarn build - cp dist/index.html dist/404.html - cp nicolium.zip dist/pl-fe.zip - - - name: Install pl-api deps - working-directory: ./packages/pl-api - run: yarn install --ignore-scripts - - - name: Build pl-api documentation - working-directory: ./packages/pl-api - run: npx typedoc - - - name: Copy pl-api documentation - working-directory: ./packages/pl-api - run: cp docs ../nicolium/dist/pl-api-docs -r - - - name: cloudflare lol - working-directory: . - run: yarn add wrangler -W - - - name: Deploy to Cloudflare - uses: https://github.com/cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy packages/nicolium/dist --project-name=plfe diff --git a/.github/workflows/nicolium.yaml b/.github/workflows/nicolium.yaml index 2b7867821..6cd8edf1c 100644 --- a/.github/workflows/nicolium.yaml +++ b/.github/workflows/nicolium.yaml @@ -32,11 +32,6 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'pnpm' - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Install deps working-directory: . run: pnpm install @@ -91,13 +86,14 @@ jobs: working-directory: ./packages/pl-api run: cp docs ../nicolium/dist/pl-api-docs -r - - name: Build documentation + - name: Create docs redirect working-directory: . - run: pip install mkdocs-material mkdocs-include-markdown-plugin && mkdocs build - - - name: Copy documentation - working-directory: . - run: cp site ./packages/nicolium/dist/docs -r + run: | + mkdir -p ./packages/nicolium/dist/docs + cat > ./packages/nicolium/dist/docs/index.html << 'EOF' + +
Redirecting to https://nicolium.app/docs…
+ EOF - name: Upload Github Pages artifact uses: actions/upload-pages-artifact@v3 diff --git a/docs/installing/iceshrimp.md b/docs/installing/iceshrimp.md index fd4a73663..16409f29f 100644 --- a/docs/installing/iceshrimp.md +++ b/docs/installing/iceshrimp.md @@ -12,6 +12,8 @@ While this is the only way to use some of Iceshrimp.NET-specific features with N ## Example Nginx configuration +(Assuming Nicolium files are located in `/var/www/nicolium`) + ```nginx map $http_upgrade $connection_upgrade { default upgrade; @@ -29,7 +31,7 @@ map "$http_accept,$http_content_type" $maybe_activitypub { server { server_name iceshrimp.example.com; - root /var/www/; + root /var/www/nicolium/; location ~ ^/(Components|openapi|scalar|swagger|css|_content|js|files|avatars|banners|api|inbox|oauth|admin|manifest.json|nodeinfo|.well-known|@(.+)$|[a-zA-Z0-9.]+.css$) { try_files /dev/null @shrimp; diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index d2a04fc6f..000000000 --- a/mkdocs.yml +++ /dev/null @@ -1,30 +0,0 @@ -site_name: Nicolium Documentation -site_url: https://pl.mkljczk.pl/docs/ -theme: - name: material - language: en - font: false - features: - - header.autohide - palette: - - scheme: slate - toggle: - icon: material/brightness-7 - name: Switch to light mode - - scheme: default - toggle: - icon: material/brightness-4 - name: Switch to dark mode -plugins: - - search: - lang: en - - include-markdown -markdown_extensions: - - admonition - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - - pymdownx.inlinehilite - - pymdownx.snippets - - pymdownx.superfences diff --git a/packages/nicolium/app.json b/packages/nicolium/app.json index 3f540e551..4b391a97a 100644 --- a/packages/nicolium/app.json +++ b/packages/nicolium/app.json @@ -1,9 +1,7 @@ { "name": "ncd-fe", "description": "Mastodon-compatible social media front-end.", - "keywords": [ - "fediverse" - ], + "keywords": ["fediverse"], "website": "https://codeberg.org/mkljczk/pl-fe", "stack": "container" -} \ No newline at end of file +} diff --git a/packages/nicolium/custom/locales/en.json b/packages/nicolium/custom/locales/en.json index e24fbce2a..ef4bb9844 100644 --- a/packages/nicolium/custom/locales/en.json +++ b/packages/nicolium/custom/locales/en.json @@ -72,4 +72,4 @@ "getting_started.upstream": "https://codeberg.org/mkljczk/pl-fe", "getting_started.upstreamName": "mkljczk/pl-fe", "getting_started.open_source_notice": "{code_name} is a fork of {upstream_link}. You can contribute or report issues at {code_link} (v{code_version})." -} \ No newline at end of file +} diff --git a/packages/nicolium/package.json b/packages/nicolium/package.json index 523b21e9e..b81ad4130 100644 --- a/packages/nicolium/package.json +++ b/packages/nicolium/package.json @@ -2,21 +2,21 @@ "name": "ncd-fe", "displayName": "NCD Beta", "version": "0.0.1", - "type": "module", "description": "NiceCrew beta frontend - fork of mkljczk/pl-fe", - "homepage": "https://beta.nicecrew.digital", - "repository": { - "type": "git", - "url": "https://gitea.nicecrew.digital/matty/ncd-fe" - }, "keywords": [ "fediverse", "pleroma" ], + "homepage": "https://beta.nicecrew.digital", "bugs": { "url": "https://gitea.nicecrew.digital/matty/ncd-fe/issues" }, "license": "AGPL-3.0-or-later", + "repository": { + "type": "git", + "url": "https://gitea.nicecrew.digital/matty/ncd-fe" + }, + "type": "module", "scripts": { "start": "npx vite serve", "dev": "${npm_execpath} run start", diff --git a/packages/nicolium/src/actions/admin.ts b/packages/nicolium/src/actions/admin.ts index 0cb1e8ab6..253e486c4 100644 --- a/packages/nicolium/src/actions/admin.ts +++ b/packages/nicolium/src/actions/admin.ts @@ -10,52 +10,8 @@ import { filterBadges, getTagDiff } from '@/utils/badges'; import type { AppDispatch, RootState } from '@/store'; import type { PleromaConfig } from 'pl-api'; -const ADMIN_CONFIG_FETCH_SUCCESS = 'ADMIN_CONFIG_FETCH_SUCCESS' as const; - -const ADMIN_CONFIG_UPDATE_REQUEST = 'ADMIN_CONFIG_UPDATE_REQUEST' as const; const ADMIN_CONFIG_UPDATE_SUCCESS = 'ADMIN_CONFIG_UPDATE_SUCCESS' as const; -const fetchConfig = () => (dispatch: AppDispatch, getState: () => RootState) => - getClient(getState) - .admin.config.getPleromaConfig() - .then((data) => { - dispatch