Merge pull request #62 from transfem-org/develop

fix: background overlaying
This commit is contained in:
Amelia Yukii 2023-10-07 20:49:34 +02:00 committed by GitHub
commit 89d1da5bcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 186 additions and 54 deletions

96
.github/workflows/package.yml vendored Normal file
View file

@ -0,0 +1,96 @@
name: Publish prebuild
on:
push:
branches:
- stable
release:
types: [published]
workflow_dispatch:
jobs:
build_binaries:
name: Build & ship binaries
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
python-version: [3.11.x]
if: github.repository == 'transfem-org/Sharkey'
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4.1.0
with:
lfs: true
submodules: 'recursive'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup Python
uses: actions/setup-python@v4.7.1
with:
python-version: ${{ matrix.python-version }}
- name: Cache APT Packages
uses: awalsh128/cache-apt-pkgs-action@v1.3.0
with:
packages: "build-essential binfmt-support qemu-user-static ffmpeg tini curl libjemalloc-dev libjemalloc2 uuid-dev libx11-dev libxkbfile-dev execstack libgconf-2-4 libsecret-1-dev"
- name: Cache node modules
uses: actions/cache@v3
with:
path: ~/.npm
key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }}
restore-keys: v1-npm-deps-
- uses: MOZGIII/install-ldid-action@v1
with:
tag: v2.1.5-procursus2
- name: Build
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm install
npm install -g pkg
npm install -g rollup
npm install -g @rollup/plugin-node-resolve
pnpm run build
cd packages/backend
mkdir dist
rollup ./built/boot/entry.js --file ./dist/bundle.js --format cjs -p @rollup/plugin-node-resolve
pkg --debug --public ./dist/bundle.js --targets latest-linuxstatic-x64,latest-linuxstatic-arm64,latest-macos-x64,latest-macos-arm64,latest-win-x64
ls
- name: Upload linux x64
uses: actions/upload-artifact@v3.1.3
with:
name: sharkey-linux-x64
path: packages/backend/bundle-linuxstatic-x64
- name: Upload linux arm64
uses: actions/upload-artifact@v3.1.3
with:
name: sharkey-linux-arm64
path: packages/backend/bundle-linuxstatic-arm64
- name: Upload mac arm64
uses: actions/upload-artifact@v3.1.3
with:
name: sharkey-macos-arm64
path: packages/backend/bundle-macos-arm64
- name: Upload mac x64
uses: actions/upload-artifact@v3.1.3
with:
name: sharkey-macos-arm64
path: packages/backend/bundle-macos-x64
- name: Upload Windows
uses: actions/upload-artifact@v3.1.3
with:
name: sharkey-win-x64.exe
path: packages/backend/bundle-win-x64.exe

View file

@ -13,7 +13,7 @@ jobs:
github.event.client_payload.slash_command.sha != '' && github.event.client_payload.slash_command.sha != '' &&
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha) contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
steps: steps:
- uses: actions/github-script@v6.3.3 - uses: actions/github-script@v6.4.1
id: check-id id: check-id
env: env:
number: ${{ github.event.client_payload.pull_request.number }} number: ${{ github.event.client_payload.pull_request.number }}
@ -37,7 +37,7 @@ jobs:
return check[0].id; return check[0].id;
- uses: actions/github-script@v6.3.3 - uses: actions/github-script@v6.4.1
env: env:
check_id: ${{ steps.check-id.outputs.result }} check_id: ${{ steps.check-id.outputs.result }}
details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }} details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }}
@ -72,7 +72,7 @@ jobs:
timeout: 15m timeout: 15m
# Update check run called "integration-fork" # Update check run called "integration-fork"
- uses: actions/github-script@v6.3.3 - uses: actions/github-script@v6.4.1
id: update-check-run id: update-check-run
if: ${{ always() }} if: ${{ always() }}
env: env:

View file

@ -10,7 +10,7 @@ jobs:
destroy-preview-environment: destroy-preview-environment:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v6.3.3 - uses: actions/github-script@v6.4.1
id: check-conclusion id: check-conclusion
env: env:
number: ${{ github.event.number }} number: ${{ github.event.number }}

View file

@ -108,12 +108,12 @@ jobs:
wait-on: 'http://localhost:61812' wait-on: 'http://localhost:61812'
headed: true headed: true
browser: ${{ matrix.browser }} browser: ${{ matrix.browser }}
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
if: failure() if: failure()
with: with:
name: ${{ matrix.browser }}-cypress-screenshots name: ${{ matrix.browser }}-cypress-screenshots
path: cypress/screenshots path: cypress/screenshots
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v3
if: always() if: always()
with: with:
name: ${{ matrix.browser }}-cypress-videos name: ${{ matrix.browser }}-cypress-videos

25
.github/workflows/welcome.yml vendored Normal file
View file

@ -0,0 +1,25 @@
name: Welcome
on:
pull_request:
types: [opened]
issues:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |
👋 @{{ author }}
Thanks for opening your first issue here! If you are reporting a bug, please make sure to include steps on how to reproduce it! :D
pr-message: |
👋 @{{ author }}
Thanks for opening this pull request! We will review it as soon as we can :3
Please check out our contributing guidelines in the meantime.
# FIRST_PR_MERGED: |
# 🎉 @{{ author }}
# Congrats on getting your first pull request merged! We are proud of you :3 ❤️

View file

@ -61,7 +61,8 @@ services:
# volumes: # volumes:
# - ./meili_data:/meili_data # - ./meili_data:/meili_data
networks: networks:
shonk: shonk:
web: web:
external: true external: true

View file

@ -164,6 +164,8 @@ flagAsBot: "Botとして設定"
flagAsBotDescription: "このアカウントがプログラムによって運用される場合は、このフラグをオンにします。オンにすると、反応の連鎖を防ぐためのフラグとして他の開発者に役立ったり、Sharkeyのシステム上での扱いがBotに合ったものになります。" flagAsBotDescription: "このアカウントがプログラムによって運用される場合は、このフラグをオンにします。オンにすると、反応の連鎖を防ぐためのフラグとして他の開発者に役立ったり、Sharkeyのシステム上での扱いがBotに合ったものになります。"
flagAsCat: "にゃああああああああああああああ!!!!!!!!!!!!" flagAsCat: "にゃああああああああああああああ!!!!!!!!!!!!"
flagAsCatDescription: "にゃにゃにゃ??" flagAsCatDescription: "にゃにゃにゃ??"
flagSpeakAsCat: "猫語で話す"
flagSpeakAsCatDescription: "有効にすると、あなたの投稿の 「な」を「にゃ」にします。"
flagShowTimelineReplies: "タイムラインにノートへの返信を表示する" flagShowTimelineReplies: "タイムラインにノートへの返信を表示する"
flagShowTimelineRepliesDescription: "オンにすると、タイムラインにユーザーのノート以外にもそのユーザーの他のノートへの返信を表示します。" flagShowTimelineRepliesDescription: "オンにすると、タイムラインにユーザーのノート以外にもそのユーザーの他のノートへの返信を表示します。"
autoAcceptFollowed: "フォロー中ユーザーからのフォロリクを自動承認" autoAcceptFollowed: "フォロー中ユーザーからのフォロリクを自動承認"

View file

@ -163,6 +163,8 @@ flagAsBot: "Botにするで"
flagAsBotDescription: "もしこのアカウントをプログラム使うて運用するんやったら、このフラグをオンにしてや。オンにすれば、反応がバーッて連鎖せんように開発者が使うたり、Sharkeyのシステム上での扱いがBotに合ったもんになるからな。" flagAsBotDescription: "もしこのアカウントをプログラム使うて運用するんやったら、このフラグをオンにしてや。オンにすれば、反応がバーッて連鎖せんように開発者が使うたり、Sharkeyのシステム上での扱いがBotに合ったもんになるからな。"
flagAsCat: "Catやで" flagAsCat: "Catやで"
flagAsCatDescription: "ワレ、猫ちゃんならこのフラグをつけてみ?" flagAsCatDescription: "ワレ、猫ちゃんならこのフラグをつけてみ?"
flagSpeakAsCat: "猫語で話すで"
flagSpeakAsCatDescription: "有効にすると、あなたの投稿の 「な」を「にゃ」にするでー。"
flagShowTimelineReplies: "タイムラインにノートへの返信を表示するで" flagShowTimelineReplies: "タイムラインにノートへの返信を表示するで"
flagShowTimelineRepliesDescription: "オンにしたら、タイムラインにユーザーのノートの他にもそのユーザーの他のノートへの返信を表示するで。" flagShowTimelineRepliesDescription: "オンにしたら、タイムラインにユーザーのノートの他にもそのユーザーの他のノートへの返信を表示するで。"
autoAcceptFollowed: "フォローしとるユーザーからのフォローリクエストを勝手に許可しとく" autoAcceptFollowed: "フォローしとるユーザーからのフォローリクエストを勝手に許可しとく"

View file

@ -27,60 +27,63 @@ const logger = new Logger('core', 'cyan');
const clusterLogger = logger.createSubLogger('cluster', 'orange', false); const clusterLogger = logger.createSubLogger('cluster', 'orange', false);
const ev = new Xev(); const ev = new Xev();
//#region Events // We wrap this in a main function, that gets called,
// because not all platforms support top level await :/
// Listen new workers async function main() {
cluster.on('fork', worker => { //#region Events
clusterLogger.debug(`Process forked: [${worker.id}]`); // Listen new workers
}); cluster.on('fork', worker => {
clusterLogger.debug(`Process forked: [${worker.id}]`);
});
// Listen online workers // Listen online workers
cluster.on('online', worker => { cluster.on('online', worker => {
clusterLogger.debug(`Process is now online: [${worker.id}]`); clusterLogger.debug(`Process is now online: [${worker.id}]`);
}); });
// Listen for dying workers // Listen for dying workers
cluster.on('exit', worker => { cluster.on('exit', worker => {
// Replace the dead worker, // Replace the dead worker,
// we're not sentimental // we're not sentimental
clusterLogger.error(chalk.red(`[${worker.id}] died :(`)); clusterLogger.error(chalk.red(`[${worker.id}] died :(`));
cluster.fork(); cluster.fork();
}); });
// Display detail of unhandled promise rejection // Display detail of unhandled promise rejection
if (!envOption.quiet) { if (!envOption.quiet) {
process.on('unhandledRejection', console.dir); process.on('unhandledRejection', console.dir);
} }
// Display detail of uncaught exception // Display detail of uncaught exception
process.on('uncaughtException', err => { process.on('uncaughtException', err => {
try { try {
logger.error(err); logger.error(err);
console.trace(err); console.trace(err);
} catch { } } catch { }
}); });
// Dying away... // Dying away...
process.on('exit', code => { process.on('exit', code => {
logger.info(`The process is going to exit with code ${code}`); logger.info(`The process is going to exit with code ${code}`);
}); });
//#endregion
//#endregion if (cluster.isPrimary || envOption.disableClustering) {
await masterMain();
if (cluster.isPrimary) {
ev.mount();
}
}
if (cluster.isWorker || envOption.disableClustering) {
await workerMain();
}
if (cluster.isPrimary || envOption.disableClustering) { // ユニットテスト時にMisskeyが子プロセスで起動された時のため
await masterMain(); // それ以外のときは process.send は使えないので弾く
if (process.send) {
if (cluster.isPrimary) { process.send('ok');
ev.mount();
} }
} }
if (cluster.isWorker || envOption.disableClustering) { main();
await workerMain();
}
// ユニットテスト時にMisskeyが子プロセスで起動された時のため
// それ以外のときは process.send は使えないので弾く
if (process.send) {
process.send('ok');
}

View file

@ -355,8 +355,8 @@ onUnmounted(() => {
pointer-events: none; pointer-events: none;
filter: blur(8px) opacity(0.6); filter: blur(8px) opacity(0.6);
// Funny CSS schenanigans to make background escape container // Funny CSS schenanigans to make background escape container
top: -100%;
left: -100%; left: -100%;
top: -100%;
right: -100%; right: -100%;
background-attachment: fixed; background-attachment: fixed;
} }

View file

@ -185,6 +185,7 @@ defineExpose({
width: 500px; width: 500px;
height: 100vh; height: 100vh;
background: var(--accent); background: var(--accent);
z-index: 1;
> .banner { > .banner {
position: absolute; position: absolute;
@ -213,6 +214,8 @@ defineExpose({
> .header { > .header {
background: var(--panel); background: var(--panel);
position: relative;
z-index: 1;
> .wide { > .wide {
line-height: 50px; line-height: 50px;