Skip to content

Commit

Permalink
Merge pull request #55 from team-shahu/feat/loading-screen
Browse files Browse the repository at this point in the history
えもえもローディング画面
  • Loading branch information
chan-mai authored Dec 18, 2024
2 parents c5214a9 + 7729fa1 commit 649d4c5
Show file tree
Hide file tree
Showing 19 changed files with 488 additions and 230 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/deploy-test-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,13 @@ jobs:
- name: Check allowed users
id: check-allowed-users
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORG_ID: ${{ github.repository_owner_id }}
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
ALLOWED_USER: ${{ github.repository_owner_id }}
COMMENT_AUTHOR: ${{ github.event.comment.user.id }}
run: |
MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \
-o /dev/null -w '%{http_code}\n' -s)
if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then
echo "is-allowed-user=true" > $GITHUB_OUTPUT
if ["$COMMENT_AUTHOR" = "$ALLOWED_USER"]; then
echo "is-allowed-user=true" >> $GITHUB_OUTPUT
else
echo "is-allowed-user=false" > $GITHUB_OUTPUT
echo "is-allowed-user=false" >> $GITHUB_OUTPUT
fi
- name: Get PR ref
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
- 予約投稿機能 https://github.com/team-shahu/misskey/pull/46 https://github.com/team-shahu/misskey/pull/49 https://github.com/team-shahu/misskey/pull/51
- フォロー/フォロリクの履歴 https://github.com/team-shahu/misskey/pull/49 https://github.com/team-shahu/misskey/pull/50 https://github.com/team-shahu/misskey/pull/49 https://github.com/team-shahu/misskey/pull/53
- ドライブから削除したファイルをオブジェクトストレージからも葬るように https://github.com/team-shahu/misskey/pull/49 https://github.com/team-shahu/misskey/pull/52

- えもえもローディング画面 https://github.com/team-shahu/misskey/pull/55
## Special Thanks
- [Misskey](https://github.com/misskey-dev/misskey)
- [にる村](https://github.com/n1lsqn/misskey)
Expand Down
2 changes: 2 additions & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,8 @@ sensitiveWordsDescription2: "Using spaces will create AND expressions and surrou
prohibitedWords: "Prohibited words"
prohibitedWordsDescription: "Enables an error when attempting to post a note containing the set word(s). Multiple words can be set, separated by a new line."
prohibitedWordsDescription2: "Using spaces will create AND expressions and surrounding keywords with slashes will turn them into a regular expression."
customSplashText: "Custom splash text"
customSplashTextDescription: "This text will be displayed on the loading page."
hiddenTags: "Hidden hashtags"
hiddenTagsDescription: "Select tags which will not shown on trend list.\nMultiple tags could be registered by lines."
notesSearchNotAvailable: "Note search is unavailable."
Expand Down
8 changes: 8 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4366,6 +4366,14 @@ export interface Locale extends ILocale {
* スペースで区切るとAND指定になり、キーワードをスラッシュで囲むと正規表現になります。
*/
"prohibitedWordsDescription2": string;
/**
* カスタムスプラッシュテキスト
*/
"customSplashText": string;
/**
* ロード画面に表示されるテキストを設定します。改行で区切って複数設定できます。
*/
"customSplashTextDescription": string;
/**
* 非表示ハッシュタグ
*/
Expand Down
2 changes: 2 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,8 @@ sensitiveWordsDescription2: "スペースで区切るとAND指定になり、キ
prohibitedWords: "禁止ワード"
prohibitedWordsDescription: "設定したワードが含まれるノートを投稿しようとした際、エラーとなるようにします。改行で区切って複数設定できます。"
prohibitedWordsDescription2: "スペースで区切るとAND指定になり、キーワードをスラッシュで囲むと正規表現になります。"
customSplashText: "カスタムスプラッシュテキスト"
customSplashTextDescription: "ロード画面に表示されるテキストを設定します。改行で区切って複数設定できます。"
hiddenTags: "非表示ハッシュタグ"
hiddenTagsDescription: "設定したタグをトレンドに表示させないようにします。改行で区切って複数設定できます。"
notesSearchNotAvailable: "ノート検索は利用できません。"
Expand Down
11 changes: 11 additions & 0 deletions packages/backend/migration/1723982389378-AddCustomSplash.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export class AddCustomSplash1723982389378 {
name = 'AddCustomSplash1723982389378'

async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ADD "customSplashText" character varying(1024) array NOT NULL DEFAULT '{}'`);
}

async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" DROP COLUMN "customSplashText"`);
}
}
7 changes: 7 additions & 0 deletions packages/backend/src/models/Meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,4 +663,11 @@ export class MiMeta {
default: '{}',
})
public federationHosts: string[];

@Column('varchar', {
length: 1024,
array: true,
default: '{}',
})
public customSplashText: string[];
}
12 changes: 10 additions & 2 deletions packages/backend/src/server/api/endpoints/admin/meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,14 +518,21 @@ export const meta = {
type: 'string',
optional: false, nullable: false,
},
federationHosts: {
type: 'array',
emailToReceiveAbuseReport: {
type: 'string',
optional: false, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
customSplashText: {
type: 'array',
optional: false, nullable: false,
items: {
type: 'string',
},
},
},
},
} as const;
Expand Down Expand Up @@ -667,6 +674,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
urlPreviewSummaryProxyUrl: instance.urlPreviewSummaryProxyUrl,
federation: instance.federation,
federationHosts: instance.federationHosts,
customSplashText: instance.customSplashText,
};
});
}
Expand Down
11 changes: 11 additions & 0 deletions packages/backend/src/server/api/endpoints/admin/update-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ export const paramDef = {
type: 'string',
},
},
customSplashText: { type: 'array', nullable: true, items: {
type: 'string',
}},

Check failure on line 191 in packages/backend/src/server/api/endpoints/admin/update-meta.ts

View workflow job for this annotation

GitHub Actions / lint (backend)

A space is required before '}'
},
required: [],
} as const;
Expand Down Expand Up @@ -679,6 +682,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
set.federationHosts = ps.federationHosts.filter(Boolean).map(x => x.toLowerCase());
}

if (Array.isArray(ps.customSplashText)) {
set.customSplashText = ps.customSplashText.filter(Boolean);
}

if (Array.isArray(ps.customSplashText)) {
set.customSplashText = ps.customSplashText.filter(Boolean);
}

const before = await this.metaService.fetch(true);

await this.metaService.update(set);
Expand Down
1 change: 1 addition & 0 deletions packages/backend/src/server/web/ClientServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export class ClientServerService {
instanceUrl: this.config.url,
metaJson: htmlSafeJsonStringify(await this.metaEntityService.packDetailed(meta)),
now: Date.now(),
customSplashText: meta.customSplashText[Math.floor(Math.random() * meta.customSplashText.length)],
};
}

Expand Down
Loading

0 comments on commit 649d4c5

Please sign in to comment.