aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/migrate/gitea.tmpl
Commit message (Collapse)AuthorAgeFilesLines
* Fix "force private" logic (#31012)wxiaoguang2024-05-201-1/+1
| | | | | When creating a repo, the "FORCE_PRIVATE" config option should be respected, `readonly` doesn't work for checkbox, so it should use `disabled` attribute.
* Remove unnecessary "Safe" modifier from templates (#29318)wxiaoguang2024-02-221-8/+8
| | | Follow #29165
* Fix more "locale" usages (#27259)wxiaoguang2023-09-251-1/+1
|
* Always use `ctx.Locale.Tr` inside templates (#27231)delvh2023-09-251-19/+19
|
* Change green buttons to primary color (#27099)silverwind2023-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I think it's better if the primary actions have primary color instead of green which fits better into the overall single-color UI design. This PR currently replaces every green button with primary: <img width="141" alt="Screenshot 2023-09-16 at 14 07 59" src="https://github.com/go-gitea/gitea/assets/115237/843c1e50-4fb2-4ec6-84ba-0efb9472dcbe"> <img width="161" alt="Screenshot 2023-09-16 at 14 07 51" src="https://github.com/go-gitea/gitea/assets/115237/9442195a-a3b2-4a42-b262-8377d6f5c0d1"> Modal actions now use uncolored/primary instead of previous green/red colors. I also removed the box-shadow on all basic buttons: <img width="259" alt="Screenshot 2023-09-16 at 14 16 39" src="https://github.com/go-gitea/gitea/assets/115237/5beea529-127a-44b0-8d4c-afa7b034a490"> <img width="261" alt="Screenshot 2023-09-16 at 14 17 42" src="https://github.com/go-gitea/gitea/assets/115237/4757f7b2-4d46-49bc-a797-38bb28437b88"> The change currently includes the "Merge PR" button, for which we might want to make an exception to match the icon color there: <img width="442" alt="Screenshot 2023-09-16 at 14 33 53" src="https://github.com/go-gitea/gitea/assets/115237/993ac1a5-c94d-4895-b76c-0d872181a70b">
* Use docs.gitea.com instead of docs.gitea.io (#26739)Lunny Xiao2023-08-271-1/+1
|
* Use template context function for avatar rendering (#26385)wxiaoguang2023-08-101-3/+3
| | | | Introduce `AvatarUtils`, no need to pass `$.Context` to every sub-template, and simplify the template helper functions.
* Replace fomantic divider module with our own (#25539)silverwind2023-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | Should look exactly like before for normal dividers. "Horizontal" ones look better because they no longer use image backgrounds. <img width="917" alt="Screenshot 2023-06-27 at 19 07 56" src="https://github.com/go-gitea/gitea/assets/115237/d97d8dec-6859-44a8-85ba-e4549b4dd9df"> <img width="914" alt="Screenshot 2023-06-27 at 19 05 58" src="https://github.com/go-gitea/gitea/assets/115237/8bf98544-2d82-4ebf-ac68-d6dc237bd6b2"> <img width="1246" alt="Screenshot 2023-06-27 at 19 00 42" src="https://github.com/go-gitea/gitea/assets/115237/36a6bb21-6029-4f53-8bee-535f55c66fed"> <img width="344" alt="Screenshot 2023-06-27 at 18 58 15" src="https://github.com/go-gitea/gitea/assets/115237/a9e70aee-8e6b-4ea1-9e93-19c9f96aec6e"> <img width="823" alt="Screenshot 2023-06-27 at 18 56 22" src="https://github.com/go-gitea/gitea/assets/115237/e7a497cd-f262-4683-8872-23c3c8cce32f"> <img width="330" alt="Screenshot 2023-06-27 at 19 21 11" src="https://github.com/go-gitea/gitea/assets/115237/42f24149-a655-4c7e-bd26-8ab52db6446b">
* Improve some Forms (#24878)JakobDev2023-05-261-2/+2
| | | | | | | | | Don't really know a better name for this. I've gone through some Forms and added missing HTML attributes (mostly `maxlength`). I tried to fill the Forms with dummy Data and see if Gitea throws a Error (e.g. maximum length). If yes, I added the missing HTML attribute. While working on this, I discovered that the Form to add OAuth2 Apps just silently fails when filled with invalid data, so I fixed that too.
* Set type="password" on all auth_token fields (#22175)Dan Church2023-04-231-1/+1
| | | | | | | | | | | | | | | | | | | Set `type="password"` on all `auth_token` fields Seen when migrating from other hosting platforms. 1. Prevents exposing the token to screen capture/cameras/eyeballs. 2. Prevents the browser from saving the value in its autocomplete dictionary, which often is not secure. ![exposed auth token](https://user-images.githubusercontent.com/615684/208541005-e2c9c6b0-3c6c-4a56-95d9-357b987aa0c8.png) Closes #22174 --------- Signed-off-by: Dan Church <amphetamachine@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Add context cache as a request level cache (#22294)Lunny Xiao2023-02-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid duplicated load of the same data in an HTTP request, we can set a context cache to do that. i.e. Some pages may load a user from a database with the same id in different areas on the same page. But the code is hidden in two different deep logic. How should we share the user? As a result of this PR, now if both entry functions accept `context.Context` as the first parameter and we just need to refactor `GetUserByID` to reuse the user from the context cache. Then it will not be loaded twice on an HTTP request. But of course, sometimes we would like to reload an object from the database, that's why `RemoveContextData` is also exposed. The core context cache is here. It defines a new context ```go type cacheContext struct { ctx context.Context data map[any]map[any]any lock sync.RWMutex } var cacheContextKey = struct{}{} func WithCacheContext(ctx context.Context) context.Context { return context.WithValue(ctx, cacheContextKey, &cacheContext{ ctx: ctx, data: make(map[any]map[any]any), }) } ``` Then you can use the below 4 methods to read/write/del the data within the same context. ```go func GetContextData(ctx context.Context, tp, key any) any func SetContextData(ctx context.Context, tp, key, value any) func RemoveContextData(ctx context.Context, tp, key any) func GetWithContextCache[T any](ctx context.Context, cacheGroupKey string, cacheTargetID any, f func() (T, error)) (T, error) ``` Then let's take a look at how `system.GetString` implement it. ```go func GetSetting(ctx context.Context, key string) (string, error) { return cache.GetWithContextCache(ctx, contextCacheKey, key, func() (string, error) { return cache.GetString(genSettingCacheKey(key), func() (string, error) { res, err := GetSettingNoCache(ctx, key) if err != nil { return "", err } return res.SettingValue, nil }) }) } ``` First, it will check if context data include the setting object with the key. If not, it will query from the global cache which may be memory or a Redis cache. If not, it will get the object from the database. In the end, if the object gets from the global cache or database, it will be set into the context cache. An object stored in the context cache will only be destroyed after the context disappeared.
* Add main landmark to templates and adjust titles (#22670)Felipe Leopoldo Sologuren Gutiérrez2023-02-011-1/+1
| | | | | | | * Add main aria landmark to templates * Adjust some titles to improve understanding of location in navigation Contributed by @Forgejo
* Remove useless "Cancel" buttons (#21872)Yarden Shoham2022-12-051-1/+0
| | | | | | | | * Continues #21381 These buttons have no real use. To cancel, one would simply navigate away. Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
* Refactor `i18n` to `locale` (#20153)Gusted2022-06-271-20/+20
| | | | | | | | | | | * Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
* Migrating wiki don't require token, so we should move it out of the require ↵Lunny Xiao2021-11-161-12/+16
| | | | | | | form (#17645) * Migrating wiki don't require token, so we should move it out of the require form * Fix lint
* Unify migration descriptions (#16781)delvh2021-08-251-1/+1
| | | | | | | | | | | | * Unify migration descriptions * Clarify that pure Git migration differs from other migrations Co-authored-by: Norwin <noerw@users.noreply.github.com> * Use Pull Requests for Gitea migration Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: zeripath <art27@cantab.net>
* Add LFS Migration and Mirror (#14726)KN4CK3R2021-04-081-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implemented LFS client. * Implemented scanning for pointer files. * Implemented downloading of lfs files. * Moved model-dependent code into services. * Removed models dependency. Added TryReadPointerFromBuffer. * Migrated code from service to module. * Centralised storage creation. * Removed dependency from models. * Moved ContentStore into modules. * Share structs between server and client. * Moved method to services. * Implemented lfs download on clone. * Implemented LFS sync on clone and mirror update. * Added form fields. * Updated templates. * Fixed condition. * Use alternate endpoint. * Added missing methods. * Fixed typo and make linter happy. * Detached pointer parser from gogit dependency. * Fixed TestGetLFSRange test. * Added context to support cancellation. * Use ReadFull to probably read more data. * Removed duplicated code from models. * Moved scan implementation into pointer_scanner_nogogit. * Changed method name. * Added comments. * Added more/specific log/error messages. * Embedded lfs.Pointer into models.LFSMetaObject. * Moved code from models to module. * Moved code from models to module. * Moved code from models to module. * Reduced pointer usage. * Embedded type. * Use promoted fields. * Fixed unexpected eof. * Added unit tests. * Implemented migration of local file paths. * Show an error on invalid LFS endpoints. * Hide settings if not used. * Added LFS info to mirror struct. * Fixed comment. * Check LFS endpoint. * Manage LFS settings from mirror page. * Fixed selector. * Adjusted selector. * Added more tests. * Added local filesystem migration test. * Fixed typo. * Reset settings. * Added special windows path handling. * Added unit test for HTTPClient. * Added unit test for BasicTransferAdapter. * Moved into util package. * Test if LFS endpoint is allowed. * Added support for git:// * Just use a static placeholder as the displayed url may be invalid. * Reverted to original code. * Added "Advanced Settings". * Updated wording. * Added discovery info link. * Implemented suggestion. * Fixed missing format parameter. * Added Pointer.IsValid(). * Always remove model on error. * Added suggestions. * Use channel instead of array. * Update routers/repo/migrate.go * fmt Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
* Fix truncated organization names (#14655)vnkmpf2021-02-121-6/+6
| | | | | | | * Fix truncated organization names Previous ellipsis implementation hid vertical overflow - image + descent line of letters. Organization visibility in select on dashboard was not always visible. This commit extracts classes which don't make collisions with other items on page.
* Truncated organisations name #14583 (#14615)vnkmpf2021-02-091-3/+3
| | | | | - truncate to max length 40 - add CSS ellipsis
* Direct avatar rendering (#13649)silverwind2020-12-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Direct avatar rendering This adds new template helpers for avatar rendering which output image elements with direct links to avatars which makes them cacheable by the browsers. This should be a major performance improvment for pages with many avatars. * fix avatars of other user's profile pages * fix top border on user avatar name * uncircle avatars * remove old incomplete avatar selector * use title attribute for name and add it back on blame * minor refactor * tweak comments * fix url path join and adjust test to new result * dedupe functions
* Add class to page content to unify top margin (#13766)silverwind2020-11-301-1/+1
| | | | | | | | | | | | | | | | | | | * Add class to page content to unify top margin Previously pages would individually set this margin but some didn't so content would stick to the header without any space. Resolve this by adding a new class that is added on all pages. The only place where we remove this margin again is on the pages with menu or wrapper in the header. * fix admin notices * fix team pages * fix loading segment on gitgraph for arc-green * fix last missing case Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Comment box tweaks and SVG dropdown triangles (#13376)silverwind2020-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | * Comment box tweaks and SVG dropdown triangles - Change all dropdown triangles to SVG - Bring inline review comment box closer to regular comment boxes - Enhance arc-green checkbox contrast - Minor reaction tweaks - Flexbox the diff file header * remove a border * fix type marker in arc-green * add small code padding * fix position regression and remove useless rules Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Gitea 2 Gitea migration (#12657)65432020-10-141-0/+137
* first draft * update gitea sdk to 9e280adb4da * adapt feat of updated sdk * releases now works * break the Reactions loop * use convertGiteaLabel * fix endless loop because paggination is not supported there !!! * rename gitea local uploader files * pagination can bite you in the ass * Version Checks * lint * docs * rename gitea sdk import to miss future conficts * go-swagger: dont scan the sdk structs * make sure gitea can shutdown gracefully * make GetPullRequests and GetIssues similar * rm useles * Add Test: started ... * ... add tests ... * Add tests and Fixing things * Workaround missing SHA * Adapt: Ensure that all migration requests are cancellable (714ab71ddc4260937b1480519d453d2dc4e77dd6) * LINT: fix misspells in test set * adapt ListMergeRequestAwardEmoji * update sdk * Return error when creating giteadownloader failed * update sdk * adapt new sdk * adopt new features * check version before err * adapt: 'migrate service type switch page' * optimize * Fix DefaultBranch * impruve * handle subPath * fix test * Fix ReviewCommentPosition * test GetReviews * add DefaultBranch int test set * rm unused * Update SDK to v0.13.0 * addopt sdk changes * found better link * format template * Update Docs * Update Gitea SDK (v0.13.1)