Skip to content

Commit 556ad16

Browse files
authored
Merge branch 'main' into lunny/merge_tree_conflict_check
2 parents 0bf39c7 + cddff73 commit 556ad16

File tree

16 files changed

+101
-104
lines changed

16 files changed

+101
-104
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ require (
109109
github.com/ulikunitz/xz v0.5.15
110110
github.com/urfave/cli-docs/v3 v3.0.0-alpha6
111111
github.com/urfave/cli/v3 v3.4.1
112-
github.com/wneessen/go-mail v0.7.1
112+
github.com/wneessen/go-mail v0.7.2
113113
github.com/xeipuuv/gojsonschema v1.2.0
114114
github.com/yohcop/openid-go v1.0.1
115115
github.com/yuin/goldmark v1.7.13

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,8 +768,8 @@ github.com/urfave/cli/v3 v3.4.1/go.mod h1:FJSKtM/9AiiTOJL4fJ6TbMUkxBXn7GO9guZqoZ
768768
github.com/valyala/fastjson v1.6.4 h1:uAUNq9Z6ymTgGhcm0UynUAB6tlbakBrz6CQFax3BXVQ=
769769
github.com/valyala/fastjson v1.6.4/go.mod h1:CLCAqky6SMuOcxStkYQvblddUtoRxhYMGLrsQns1aXY=
770770
github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
771-
github.com/wneessen/go-mail v0.7.1 h1:rvy63sp14N06/kdGqCYwW8Na5gDCXjTQM1E7So4PuKk=
772-
github.com/wneessen/go-mail v0.7.1/go.mod h1:+TkW6QP3EVkgTEqHtVmnAE/1MRhmzb8Y9/W3pweuS+k=
771+
github.com/wneessen/go-mail v0.7.2 h1:xxPnhZ6IZLSgxShebmZ6DPKh1b6OJcoHfzy7UjOkzS8=
772+
github.com/wneessen/go-mail v0.7.2/go.mod h1:+TkW6QP3EVkgTEqHtVmnAE/1MRhmzb8Y9/W3pweuS+k=
773773
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
774774
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
775775
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=

options/locale/locale_ga-IE.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,6 +3914,14 @@ variables.update.success=Tá an t-athróg curtha in eagar.
39143914
logs.always_auto_scroll=Logchomhaid scrollaithe uathoibríoch i gcónaí
39153915
logs.always_expand_running=Leathnaigh logs reatha i gcónaí
39163916
3917+
general=Ginearálta
3918+
general.enable_actions=Cumasaigh Gníomhartha
3919+
general.collaborative_owners_management=Bainistíocht Chomhoibríoch Úinéirí
3920+
general.collaborative_owners_management_help=Is úsáideoir nó eagraíocht é úinéir comhoibríoch a bhfuil rochtain ag a stór príobháideach ar ghníomhartha agus ar shreafaí oibre an stórais sin.
3921+
general.add_collaborative_owner=Cuir Úinéir Comhoibríoch leis
3922+
general.collaborative_owner_not_exist=Níl an t-úinéir comhoibríoch ann.
3923+
general.remove_collaborative_owner=Bain Úinéir Comhoibríoch
3924+
general.remove_collaborative_owner_desc=Má bhaintear úinéir comhoibríoch, cuirfidh sé sin cosc ​​ar stórtha an úinéara rochtain a fháil ar na gníomhartha sa stór seo. An bhfuil tú ag iarraidh leanúint ar aghaidh?
39173925
39183926
[projects]
39193927
deleted.display_name=Tionscadal scriosta

options/locale/locale_ja-JP.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,6 +1969,9 @@ pulls.status_checks_requested=必須
19691969
pulls.status_checks_details=詳細
19701970
pulls.status_checks_hide_all=すべてのチェックを隠す
19711971
pulls.status_checks_show_all=すべてのチェックを表示
1972+
pulls.status_checks_approve_all=ワークフローをすべて承認
1973+
pulls.status_checks_need_approvals=%d 件のワークフローが承認待ちです
1974+
pulls.status_checks_need_approvals_helper=ワークフローはリポジトリ管理者が承認した後にのみ実行されます。
19721975
pulls.update_branch=マージでブランチを更新
19731976
pulls.update_branch_rebase=リベースでブランチを更新
19741977
pulls.update_branch_success=ブランチの更新が成功しました
@@ -3890,6 +3893,7 @@ workflow.has_workflow_dispatch=このワークフローには workflow_dispatch
38903893
workflow.has_no_workflow_dispatch=ワークフロー '%s' には workflow_dispatch イベントトリガーがありません。
38913894

38923895
need_approval_desc=フォークプルリクエストのワークフローを実行するには承認が必要です。
3896+
approve_all_success=すべてのワークフローの実行が正常に承認されました。
38933897

38943898
variables=変数
38953899
variables.management=変数の管理

options/locale/locale_pt-PT.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3914,6 +3914,14 @@ variables.update.success=A variável foi editada.
39143914
logs.always_auto_scroll=Rolar registos de forma automática e permanente
39153915
logs.always_expand_running=Expandir sempre os registos que vão rolando
39163916

3917+
general=Geral
3918+
general.enable_actions=Habilitar Operações
3919+
general.collaborative_owners_management=Gestão de proprietários colaborativos
3920+
general.collaborative_owners_management_help=Um proprietário colaborativo é um utilizador ou uma organização cujo repositório privado tem acesso às operações e às sequências de trabalho deste repositório.
3921+
general.add_collaborative_owner=Adicionar proprietário colaborativo
3922+
general.collaborative_owner_not_exist=O proprietário colaborativo não existe.
3923+
general.remove_collaborative_owner=Remover proprietário colaborativo
3924+
general.remove_collaborative_owner_desc=A remoção de um proprietário colaborativo impedirá que os repositórios do proprietário acedam às operações neste repositório. Continuamos?
39173925

39183926
[projects]
39193927
deleted.display_name=Planeamento eliminado

routers/web/web.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -307,13 +307,6 @@ func registerWebRoutes(m *web.Router) {
307307

308308
validation.AddBindingRules()
309309

310-
linkAccountEnabled := func(ctx *context.Context) {
311-
if !setting.Service.EnableOpenIDSignIn && !setting.Service.EnableOpenIDSignUp && !setting.OAuth2.Enabled {
312-
ctx.HTTPError(http.StatusForbidden)
313-
return
314-
}
315-
}
316-
317310
openIDSignInEnabled := func(ctx *context.Context) {
318311
if !setting.Service.EnableOpenIDSignIn {
319312
ctx.HTTPError(http.StatusForbidden)
@@ -545,9 +538,9 @@ func registerWebRoutes(m *web.Router) {
545538
}, openIDSignInEnabled)
546539
m.Get("/sign_up", auth.SignUp)
547540
m.Post("/sign_up", web.Bind(forms.RegisterForm{}), auth.SignUpPost)
548-
m.Get("/link_account", linkAccountEnabled, auth.LinkAccount)
549-
m.Post("/link_account_signin", linkAccountEnabled, web.Bind(forms.SignInForm{}), auth.LinkAccountPostSignIn)
550-
m.Post("/link_account_signup", linkAccountEnabled, web.Bind(forms.RegisterForm{}), auth.LinkAccountPostRegister)
541+
m.Get("/link_account", auth.LinkAccount)
542+
m.Post("/link_account_signin", web.Bind(forms.SignInForm{}), auth.LinkAccountPostSignIn)
543+
m.Post("/link_account_signup", web.Bind(forms.RegisterForm{}), auth.LinkAccountPostRegister)
551544
m.Group("/two_factor", func() {
552545
m.Get("", auth.TwoFactor)
553546
m.Post("", web.Bind(forms.TwoFactorAuthForm{}), auth.TwoFactorPost)
@@ -622,7 +615,7 @@ func registerWebRoutes(m *web.Router) {
622615
m.Post("/delete", security.DeleteOpenID)
623616
m.Post("/toggle_visibility", security.ToggleOpenIDVisibility)
624617
}, openIDSignInEnabled)
625-
m.Post("/account_link", linkAccountEnabled, security.DeleteAccountLink)
618+
m.Post("/account_link", security.DeleteAccountLink)
626619
})
627620

628621
m.Group("/applications", func() {

templates/base/head_script.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
3636
copy_success: {{ctx.Locale.Tr "copy_success"}},
3737
copy_error: {{ctx.Locale.Tr "copy_error"}},
3838
error_occurred: {{ctx.Locale.Tr "error.occurred"}},
39-
network_error: {{ctx.Locale.Tr "error.network_error"}},
4039
remove_label_str: {{ctx.Locale.Tr "remove_label_str"}},
4140
modal_confirm: {{ctx.Locale.Tr "modal.confirm"}},
4241
modal_cancel: {{ctx.Locale.Tr "modal.cancel"}},

web_src/js/components/ContextPopup.vue

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,53 @@
22
import {SvgIcon} from '../svg.ts';
33
import {GET} from '../modules/fetch.ts';
44
import {getIssueColor, getIssueIcon} from '../features/issue.ts';
5-
import {computed, onMounted, shallowRef, useTemplateRef} from 'vue';
6-
import type {IssuePathInfo} from '../types.ts';
5+
import {computed, onMounted, shallowRef} from 'vue';
76
8-
const {appSubUrl, i18n} = window.config;
7+
const props = defineProps<{
8+
repoLink: string,
9+
loadIssueInfoUrl: string,
10+
}>();
911
1012
const loading = shallowRef(false);
1113
const issue = shallowRef(null);
1214
const renderedLabels = shallowRef('');
13-
const i18nErrorOccurred = i18n.error_occurred;
14-
const i18nErrorMessage = shallowRef(null);
15+
const errorMessage = shallowRef(null);
1516
16-
const createdAt = computed(() => new Date(issue.value.created_at).toLocaleDateString(undefined, {year: 'numeric', month: 'short', day: 'numeric'}));
17-
const body = computed(() => {
18-
const body = issue.value.body.replace(/\n+/g, ' ');
19-
if (body.length > 85) {
20-
return `${body.substring(0, 85)}…`;
21-
}
22-
return body;
17+
const createdAt = computed(() => {
18+
return new Date(issue.value.created_at).toLocaleDateString(undefined, {year: 'numeric', month: 'short', day: 'numeric'});
2319
});
2420
25-
const root = useTemplateRef('root');
26-
27-
onMounted(() => {
28-
root.value.addEventListener('ce-load-context-popup', (e: CustomEventInit<IssuePathInfo>) => {
29-
if (!loading.value && issue.value === null) {
30-
load(e.detail);
31-
}
32-
});
21+
const body = computed(() => {
22+
const body = issue.value.body.replace(/\n+/g, ' ');
23+
return body.length > 85 ? `${body.substring(0, 85)}…` : body;
3324
});
3425
35-
async function load(issuePathInfo: IssuePathInfo) {
26+
onMounted(async () => {
3627
loading.value = true;
37-
i18nErrorMessage.value = null;
38-
28+
errorMessage.value = null;
3929
try {
40-
const response = await GET(`${appSubUrl}/${issuePathInfo.ownerName}/${issuePathInfo.repoName}/issues/${issuePathInfo.indexString}/info`); // backend: GetIssueInfo
41-
const respJson = await response.json();
42-
if (!response.ok) {
43-
i18nErrorMessage.value = respJson.message ?? i18n.network_error;
30+
const resp = await GET(props.loadIssueInfoUrl);
31+
if (!resp.ok) {
32+
errorMessage.value = resp.status ? resp.statusText : 'Unknown network error';
4433
return;
4534
}
35+
const respJson = await resp.json();
4636
issue.value = respJson.convertedIssue;
4737
renderedLabels.value = respJson.renderedLabels;
48-
} catch {
49-
i18nErrorMessage.value = i18n.network_error;
5038
} finally {
5139
loading.value = false;
5240
}
53-
}
41+
});
5442
</script>
5543

5644
<template>
57-
<div ref="root">
45+
<div class="tw-p-4">
5846
<div v-if="loading" class="tw-h-12 tw-w-12 is-loading"/>
59-
<div v-if="!loading && issue !== null" class="tw-flex tw-flex-col tw-gap-2">
60-
<div class="tw-text-12">{{ issue.repository.full_name }} on {{ createdAt }}</div>
47+
<div v-else-if="issue" class="tw-flex tw-flex-col tw-gap-2">
48+
<div class="tw-text-12">
49+
<a :href="repoLink" class="muted">{{ issue.repository.full_name }}</a>
50+
on {{ createdAt }}
51+
</div>
6152
<div class="flex-text-block">
6253
<svg-icon :name="getIssueIcon(issue)" :class="['text', getIssueColor(issue)]"/>
6354
<span class="issue-title tw-font-semibold tw-break-anywhere">
@@ -69,9 +60,8 @@ async function load(issuePathInfo: IssuePathInfo) {
6960
<!-- eslint-disable-next-line vue/no-v-html -->
7061
<div v-if="issue.labels.length" v-html="renderedLabels"/>
7162
</div>
72-
<div class="tw-flex tw-flex-col tw-gap-2" v-if="!loading && issue === null">
73-
<div class="tw-text-12">{{ i18nErrorOccurred }}</div>
74-
<div>{{ i18nErrorMessage }}</div>
63+
<div v-else>
64+
{{ errorMessage }}
7565
</div>
7666
</div>
7767
</template>

web_src/js/features/contextpopup.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

web_src/js/features/repo-diff.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import {invertFileFolding} from './file-fold.ts';
1212
import {parseDom, sleep} from '../utils.ts';
1313
import {registerGlobalSelectorFunc} from '../modules/observer.ts';
1414

15-
const {i18n} = window.config;
16-
1715
function initRepoDiffFileBox(el: HTMLElement) {
1816
// switch between "rendered" and "source", for image and CSV files
1917
queryElems(el, '.file-view-toggle', (btn) => btn.addEventListener('click', () => {
@@ -86,7 +84,7 @@ function initRepoDiffConversationForm() {
8684
}
8785
} catch (error) {
8886
console.error('Error:', error);
89-
showErrorToast(i18n.network_error);
87+
showErrorToast(`Submit form failed: ${error}`);
9088
} finally {
9189
form?.classList.remove('is-loading');
9290
}

0 commit comments

Comments
 (0)