diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fd9729e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,26 @@ +# Build output - always rebuilt inside the image +**/bin/ +**/obj/ + +# Local secrets and environment +.env +**/appsettings.Development.json +**/appsettings.Production.json +**/*.user + +# Runtime state that must not be baked into an image +**/App_Data/DataProtectionKeys/ +**/Logs/ + +# Source control and tooling +.git/ +.github/ +.vs/ +.vscode/ +.idea/ + +# Docs and assets not needed by the build +assets/ +*.md +!README.md +LICENSE diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f780321 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +end_of_line = crlf diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..977de14 --- /dev/null +++ b/.env.example @@ -0,0 +1,71 @@ +# Copy to .env and edit before running `docker compose up`. +# cp .env.example .env +# +# .env is git-ignored. Never commit real credentials. + +# ---- Database ---- +# SQL Server requires at least 8 characters with upper case, lower case, +# digits and symbols, or the container will refuse to start. +MSSQL_SA_PASSWORD=ChangeMe_Str0ng!Pass +MSSQL_DATABASE=Taskist +MSSQL_PORT=1433 + +# ---- Application ---- +TASKIST_PORT=8080 +ASPNETCORE_ENVIRONMENT=Production + +# Public address of this install, used in e-mail links, OAuth callbacks and webhook URLs. +APP_BASE_URL=http://localhost:8080/ + +# Restrict sign-in cookies to HTTPS. The sample stack serves plain HTTP, so this +# defaults to false. Set to true once Taskist sits behind TLS. +TASKIST_REQUIRE_HTTPS_COOKIES=false + +# Set to true when a reverse proxy terminates TLS in front of Taskist, so the app +# sees the original scheme and client IP. Only the network below is trusted. +TASKIST_FORWARDED_HEADERS=false +TASKIST_PROXY_NETWORK=172.16.0.0/12 + +# Encryption keys (Data Protection) are generated on first start and kept in the +# taskist-keys volume. Back that volume up: losing it makes stored Git tokens, +# webhook secrets and notification channel URLs unreadable. + +# ---- Error tracking (optional) ---- +# Send unhandled exceptions and logged errors to Sentry. Off by default. +# No cookies, request bodies, query strings, auth headers or e-mail addresses are sent; +# signed-in users are identified by their numeric user ID only. +SENTRY_ENABLED=false +SENTRY_DSN= +# Defaults to ASPNETCORE_ENVIRONMENT when empty. +SENTRY_ENVIRONMENT= +# Share of requests sent as performance traces (0 = errors only, 0.1 = 10%). +SENTRY_TRACES_SAMPLE_RATE=0 + +# ---- Single sign-on (optional) ---- +# Sign in with an OpenID Connect provider (Keycloak, Authentik, Entra ID, Google, Okta...). +# Off by default. Setup guide: docs/sso.md. Register this redirect URI at your provider: +# signin-oidc (for example http://localhost:8080/signin-oidc) +SSO_ENABLED=false +# Button text on the login page, e.g. "Keycloak" -> "Sign in with Keycloak". +SSO_DISPLAY_NAME= +SSO_AUTHORITY= +SSO_CLIENT_ID= +SSO_CLIENT_SECRET= +# true: create a Taskist account (Registered role only) on first sign-in. false: only existing users can sign in. +SSO_AUTO_PROVISION=false +# true: hide the password form; only administrators can still sign in with a password, at /Login?local=1. +SSO_DISABLE_LOCAL_LOGIN=false + +# ---- Two-factor sign-in ---- +# Anyone with a password can turn on authenticator-app codes under My profile -> Security. +# true: administrators who sign in with a password must set it up before using Taskist. +TWO_FACTOR_REQUIRE_FOR_ADMINS=false +# "Don't ask again on this device" lasts this many days; 0 turns the option off. +TWO_FACTOR_REMEMBER_DEVICE_DAYS=30 + +# ---- Seeding ---- +# Reference data (roles, permissions, menus, translations, admin account). Leave true for a usable install. +SEED_DATA=true + +# Sample client, project and modules, useful for evaluating Taskist. Not for production. +SEED_DUMMY_DATA=false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..aa6c006 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,10 @@ +# Normalize line endings. Text files are checked out as CRLF on all platforms +# (this is a Windows / .NET repository), keeping editors from flagging mixed endings. +* text=auto eol=crlf + +# Shell scripts must stay LF to remain executable on Unix. +*.sh text eol=lf + +# Leave vendored / third-party assets untouched (no EOL normalization). +src/Presentation/Taskist.Web/wwwroot/lib/** -text +src/Presentation/Taskist.Web/theme/** -text diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..2702d74 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,63 @@ +name: Bug report +description: Something in Taskist doesn't work as expected +labels: [bug] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to report a bug. + **Security issues:** please don't file them here — follow [SECURITY.md](https://github.com/Taskist/taskist/blob/main/SECURITY.md) instead. + + - type: textarea + id: what-happened + attributes: + label: What happened? + description: What did you see, and what did you expect to see instead? + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to reproduce + placeholder: | + 1. Open Work Items → Backlog + 2. … + 3. See error + validations: + required: true + + - type: input + id: version + attributes: + label: Taskist version or commit + description: Shown under the sign-in form (e.g. "v 1.0.1"), or the commit hash you built from. + validations: + required: true + + - type: dropdown + id: deployment + attributes: + label: How do you run Taskist? + options: + - Docker Compose (this repository) + - IIS + - Linux / Kestrel behind a reverse proxy + - dotnet run (development) + - Other + validations: + required: true + + - type: input + id: environment + attributes: + label: Environment + description: SQL Server version, operating system, browser. + placeholder: SQL Server 2022, Windows Server 2022, Edge 130 + + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Application log or browser console errors. Remove any secrets, tokens or personal data first. + render: text diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..2d8d598 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: false +contact_links: + - name: Report a security vulnerability + url: https://github.com/Taskist/taskist/security/advisories/new + about: Please report vulnerabilities privately, not as a public issue. + - name: Setup help and questions + url: https://github.com/Taskist/taskist/discussions/categories/q-a + about: Ask the community in GitHub Discussions. + - name: Ideas and feedback + url: https://github.com/Taskist/taskist/discussions/categories/ideas + about: Discuss larger ideas before opening a feature request. + - name: Documentation + url: https://docs.taskist.org + about: Setup guides and module explanations. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..92244b6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,30 @@ +name: Feature request +description: Suggest an idea or improvement for Taskist +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: What problem would this solve? + description: Describe the situation and why the current behaviour falls short. + validations: + required: true + + - type: textarea + id: proposal + attributes: + label: What would you like to happen? + validations: + required: true + + - type: textarea + id: alternatives + attributes: + label: Alternatives you've considered + + - type: checkboxes + id: contribute + attributes: + label: Contributing + options: + - label: I'd be willing to open a pull request for this diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6b426d2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,27 @@ +version: 2 +updates: + # Before merging a major update, check the new licence: Taskist only takes + # MIT / Apache / BSD dependencies (see CONTRIBUTING.md). + - package-ecosystem: nuget + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 10 + groups: + microsoft: + patterns: ["Microsoft.*", "System.*"] + update-types: [minor, patch] + test: + patterns: ["xunit*", "Microsoft.NET.Test.Sdk"] + minor-and-patch: + update-types: [minor, patch] + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + + - package-ecosystem: docker + directory: / + schedule: + interval: weekly diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..c2969af --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,17 @@ +## What and why + + + +## How it was tested + + + +## Checklist + +- [ ] `dotnet build src/Taskist.sln` and `dotnet test src/Taskist.sln` pass +- [ ] Entity changes come with an EF migration, and the migration is additive (no dropped columns, no rewritten data) +- [ ] New UI text is added to `sql-scripts/03_locale.sql` +- [ ] New menu entries or permissions are added to `sql-scripts/02_defaults.sql` +- [ ] No inline scripts or styles, no CDN links, no `ViewBag`/`ViewData`, no comments in `.cs` files +- [ ] New dependencies are MIT, Apache or BSD licensed +- [ ] This touches authentication, authorization, file uploads, outbound HTTP or query building (please describe the impact above) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..44cbc42 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,105 @@ +name: CI + +on: + push: + branches: [main, develop] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-dotnet@v6 + with: + dotnet-version: 10.0.x + + - name: Restore + run: dotnet restore src/Taskist.sln + + - name: Build + run: dotnet build src/Taskist.sln --configuration Release --no-restore + + - name: Test + run: dotnet test src/Taskist.sln --configuration Release --no-build --logger "trx;LogFileName=results.trx" + + - name: Check the generated dark theme is up to date + run: | + python3 tools/theme/generate-dark-css.py + git diff --exit-code -- src/Presentation/Taskist.Web/wwwroot/css/theme-dark.generated.css || { echo "::error::theme-dark.generated.css is stale. Run 'python tools/theme/generate-dark-css.py' and commit the result."; exit 1; } + + - name: Check for missing migrations + run: | + dotnet tool install --global dotnet-ef --version 10.* + dotnet ef migrations has-pending-model-changes \ + --project src/Libraries/Taskist.Data \ + --startup-project src/Libraries/Taskist.Data \ + --configuration Release \ + --no-build + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v7 + with: + name: test-results + path: "**/TestResults/*.trx" + if-no-files-found: ignore + + docker: + name: Docker stack smoke test + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v7 + + - name: Create .env + run: | + cp .env.example .env + sed -i "s/^MSSQL_SA_PASSWORD=.*/MSSQL_SA_PASSWORD=Ci_$(openssl rand -hex 12)Aa1!/" .env + + - name: Build and start + run: docker compose up -d --build + + - name: Wait for the web container to become healthy + run: | + for attempt in $(seq 1 120); do + migrate="$(docker compose ps -a --format '{{.State}} {{.ExitCode}}' migrate)" + case "$migrate" in + exited\ 0|"") ;; + exited*) echo "migrate failed: $migrate"; exit 1 ;; + esac + web="$(docker compose ps -q web)" + if [ -n "$web" ] && [ "$(docker inspect -f '{{.State.Health.Status}}' "$web")" = "healthy" ]; then + echo "web is healthy"; exit 0 + fi + sleep 5 + done + echo "timed out waiting for web"; exit 1 + + - name: Sign-in page responds + run: curl -fsS http://localhost:8080/login -o /dev/null + + - name: Seeding is repeatable + run: docker compose run --rm migrate + + - name: Logs + if: failure() + run: docker compose logs + + - name: Tear down + if: always() + run: docker compose down -v diff --git a/.gitignore b/.gitignore index 38e05be..07d0c55 100644 --- a/.gitignore +++ b/.gitignore @@ -397,5 +397,18 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml /src/.cr -src/Presentation/Taskist.Web/App_Data/DataProtectionKeys/* -/src/Presentation/Taskist.Web/Logs \ No newline at end of file +/src/Presentation/Taskist.Web/App_Data/DataProtectionKeys/* +/src/Presentation/Taskist.Web/Logs +/src/Presentation/Taskist.Web/wwwroot/uploads +# Local configuration and secrets - never commit real credentials +src/Presentation/Taskist.Web/appsettings.Production.json +src/Presentation/Taskist.Web/appsettings.*.local.json +src/Presentation/Taskist.Web/appsettings.Development.json +*.user + +# Docker local environment +.env + +# Claude Code project notes (local only) +CLAUDE.md +CLAUDE.local.md diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..3754d0c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,51 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Taskist.Web (https)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/src/Presentation/Taskist.Web/bin/Debug/net10.0/Taskist.Web.dll", + "args": [], + "cwd": "${workspaceFolder}/src/Presentation/Taskist.Web", + "stopAtEntry": false, + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "https://localhost:7025;http://localhost:5081", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/src/Presentation/Taskist.Web/Views" + } + }, + { + "name": "Taskist.Web (http)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/src/Presentation/Taskist.Web/bin/Debug/net10.0/Taskist.Web.dll", + "args": [], + "cwd": "${workspaceFolder}/src/Presentation/Taskist.Web", + "stopAtEntry": false, + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development", + "ASPNETCORE_URLS": "http://localhost:5081", + "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" + } + }, + { + "name": ".NET Attach to Process", + "type": "coreclr", + "request": "attach" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b393ae6 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "files.exclude": { + "**/bin": true, + "**/obj": true, + "**/.cr": true, + "**/.vs": true + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..a6691c5 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,47 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/src/Presentation/Taskist.Web/Taskist.Web.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary;ErrorsOnly" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/src/Presentation/Taskist.Web/Taskist.Web.csproj" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/src/Presentation/Taskist.Web/Taskist.Web.csproj", + "-c", + "Release", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + } + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..8c138a3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,89 @@ +# Changelog + +All notable changes to Taskist are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow [Semantic Versioning](https://semver.org/). + +Each release lists **Upgrade notes** when an install needs action beyond the steps in [UPGRADING.md](UPGRADING.md). + +## [Unreleased] + +## [1.1.0] - 2026-11-16 + +The first tagged release of Taskist as an open-source project, including single sign-on and two-factor sign-in from the 1.1 roadmap. + +### Added + +- **GitHub support** alongside GitLab: multiple Git connections, several repositories per project, webhooks per repository, user accounts connected by token or OAuth, and two-way issue sync. See [docs/git-integration.md](docs/git-integration.md). +- **Merge request reviews** (Work Items → Reviews): approve, comment, reject with a reason, rebase and merge under the reviewer's own account. +- **Chat notifications** to Microsoft Teams (channel or Power Automate flow), Slack, Google Chat, Discord, Mattermost or any JSON webhook (optionally HMAC-signed), chosen per project and event. +- **Release version auto-generation** from a per-project format, with "patch of" a chosen release and live hints for manual names. +- **Closing checklist**: statuses can require root cause, resolution details or a closing merge request. +- **Appearance**: light, dark or system theme and an accent colour per user. +- **Per-user export column layouts** on top of the administrator's default. +- **Tags** for the backlog, with inline create and merge. +- **Custom field positions**: a project's custom fields can be placed anywhere on the task form (after Title, Description, Attachments, or after any field in the right panel, such as Status, Module or Developer), with an order number within each position. Existing fields stay at the bottom of their section until moved. +- **Two-factor sign-in** with any authenticator app (TOTP), turned on per user under My profile → Security: QR-code setup, ten one-time recovery codes, an optional "don't ask again on this device" (`Authentication:TwoFactor:RememberDeviceDays`, default 30), and administrator reset on the user's page. `Authentication:TwoFactor:RequireForAdministrators` (off by default) makes it mandatory for administrators who sign in with a password. Single sign-on users are not asked, since their identity provider handles it. See [docs/two-factor.md](docs/two-factor.md). ([#12](https://github.com/Taskist/taskist/issues/12)) +- **Single sign-on with OpenID Connect** (`Authentication:Oidc`, off by default): Keycloak, Authentik, Entra ID, Google, Okta and other providers. Existing users are linked by verified e-mail; optional account creation on first sign-in (*Registered* role only), optional group → role mapping (adds roles only), and an SSO-only mode that keeps password sign-in for administrators at `/Login?local=1`. Linked sign-ins are listed under My profile → Security and on the user's admin page. See [docs/sso.md](docs/sso.md). ([#11](https://github.com/Taskist/taskist/issues/11)) +- **Optional Sentry error tracking** (`Sentry:Enabled` + `Sentry:Dsn`, off by default): unhandled exceptions and logged errors, with request bodies, cookies, query strings, auth headers and personal data filtered out. +- `Security:RequireHttpsCookies` and `Security:ForwardedHeaders:*` settings for plain-HTTP and reverse-proxy deployments. +- Startup checks: the Data Protection key folder must be writable; Production logs warnings for plain-HTTP cookies and an unprotected key ring. +- Test project (`src/Tests/Taskist.Tests`) and GitHub Actions CI. + +### Changed + +- Upgraded to **.NET 10** and EF Core 10. +- Passwords are hashed with PBKDF2-HMAC-SHA512 (210,000 iterations). +- All stored secrets are protected with ASP.NET Core Data Protection. +- Renamed *Employee* → *User* and *BacklogTask* → *Backlog* throughout. +- Backlog filters use select2; Kendo UI was removed. +- Excel export uses ClosedXML instead of EPPlus; object mapping uses Mapperly. +- Seed data moved from the install wizard to four idempotent scripts in `sql-scripts/`: schema, defaults, translations and optional sample data. A fresh install now also gets the email templates, using an inactive placeholder email account. +- Docker images target .NET 10; the migrate container runs `sql-scripts/02`–`04`. +- E-mails fill `%company%` from **Configuration → Settings → Company name** (falls back to "Taskist"). +- Custom fields: checkbox and radio fields now have a label and save on the edit page, every field saves when changed (previously only mandatory ones did), dropdowns start empty instead of preselecting the first option, a field without a translation shows its label instead of its resource key, and values typed on Create are kept when the form returns with an error. + +### Security + +- Saving a single custom field value (`Backlog/UpdateCustomField`) now requires edit rights on the task, like the rest of the task form. +- Wiki reads (content, tree, history, linked tasks, Word export) are limited to members of the page's project; previously any signed-in user could read any project's pages by id. Restoring a version now requires the version to belong to the page, and pages and folders can no longer be moved into another project or into their own sub-folders. +- Wiki images are recorded against their page's project at upload and served only to the uploader and that project's members; previously any user with the Wiki permission could fetch any stored image (including other projects' wiki images, profile photos and unsaved task uploads) by id. +- Task attachments are access-checked on download, upload and delete, uploads require the antiforgery token, and files are served as downloads with `nosniff`. +- Uploads are limited to an allow-list of file types and a size cap; wiki images and profile photos accept raster images only. +- Files uploaded before a task is saved are linked through a signed, user-bound token instead of a raw document ID. +- The seeded administrator is only created in an empty user table, so re-running the seed scripts can never restore the default account. + +### Fixed + +- "Open tasks by project" on the dashboard no longer counts closed or deleted tasks. +- Missing "Reporter" label on the task form. +- Branch names from accented titles no longer split words ("déjà" → `deja`). +- Malformed wiki page or category ids no longer cause a server error; the action returns its normal "not found" response. +- Word export of a wiki page now includes its images (image links were not recognised before). +- Wiki pages now open read-only for users without edit rights (the editor call that set the mode had been removed in TinyMCE 5). + +### Removed + +- HR module (leave, work from home, attendance, holidays, approvals), the desktop quick-capture app, and the organisation structure (departments, designations, org chart, country/state masters). +- Issue Tracker module. +- Developer notes and QA notes fields. +- Reporting fields on tasks (reported via / on / by / to) and the generic Lookup master. +- Dev, Test and Release status fields on tasks; release tracking uses the Release Plan. +- The Client User role; signing in requires the Registered role. +- The unused "Form Name" column in the release export. +- The Configuration → Notifications tab: its daily-digest switches no longer controlled anything (the digest jobs were removed with the HR module). +- The built-in encryption key and the legacy `enc:` secret format. + +### Upgrade notes + +- The schema was re-baselined into a single `InitialCreate` migration. Databases from earlier releases cannot be upgraded in place — see [UPGRADING.md](UPGRADING.md). +- Environment variables are no longer prefixed: use `ConnectionStrings__AppContext`, not `TASKIST_ConnectionStrings__AppContext`. +- The Docker `uploads` volume is no longer used; attachments are stored in the database. +- New additive migrations, all applied automatically by Docker; manual installs run `dotnet ef database update` or the regenerated `sql-scripts/01_schema.sql`: + - `AddWikiImage`: new table `WikiImage`. + - `AddUserExternalLogin`: new table `UserExternalLogin` (single sign-on links). + - `AddUserTwoFactor`: new tables `UserTwoFactor` and `UserRecoveryCode`. + - `AddCustomFieldSlot`: two nullable columns on `CustomField` (`Slot`, `DisplayOrder`); existing values are not changed. +- Re-run `sql-scripts/03_locale.sql` (Docker does this when `SEED_DATA` is on) so the new sign-in, two-factor and custom field labels appear. +- Single sign-on, two-factor enforcement for administrators and Sentry are all off until configured. + +[Unreleased]: https://github.com/Taskist/taskist/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/Taskist/taskist/releases/tag/v1.1.0 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..211a96a --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +taskist@outlook.in. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..79bcf59 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# Contributing to Taskist + +We welcome and appreciate all contributions to **Taskist** — bug fixes, features, documentation, translations, and help for other users in the community. + +## 💡 Before You Start + +**For anything beyond a small fix, please discuss the change first** in an [issue](https://github.com/Taskist/taskist/issues), in [GitHub Discussions](https://github.com/Taskist/taskist/discussions/categories/ideas), or by [email](mailto:taskist@outlook.in). It saves your time if the idea doesn't fit the project's direction. + +Other ways to help: + +- Answer questions in [GitHub Discussions](https://github.com/Taskist/taskist/discussions/categories/q-a) +- Improve the [documentation](https://docs.taskist.org) +- Spread the word — write about Taskist or link to it + +Found a vulnerability? Please **do not** open a public issue or pull request. Follow [SECURITY.md](SECURITY.md) to report it privately. + +## 🛠 Setting Up Your Development Environment + +### Prerequisites + +- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) +- SQL Server (Express, LocalDB or the Docker image) +- EF Core tools: `dotnet tool install --global dotnet-ef` +- Optional: [Docker Desktop](https://www.docker.com/products/docker-desktop/) for the full stack + +### Getting started + +```bash +git clone https://github.com/Taskist/taskist.git +cd taskist +dotnet restore src/Taskist.sln +``` + +Create `src/Presentation/Taskist.Web/appsettings.Development.json` (git-ignored): + +```json +{ + "ConnectionStrings": { + "AppContext": "Server=.\\SQLEXPRESS;Database=Taskist;Integrated Security=True;TrustServerCertificate=True;" + } +} +``` + +Create the schema, then run `sql-scripts/02_defaults.sql` and `03_locale.sql` (`04_demo.sql` adds optional sample data): + +```bash +dotnet ef database update --project src/Libraries/Taskist.Data --startup-project src/Libraries/Taskist.Data +``` + +Run the app and sign in with `admin@taskist.org` / `Admin@123`: + +```bash +dotnet run --project src/Presentation/Taskist.Web +``` + +### Solution layout + +| Project | Contents | +| ------- | -------- | +| `src/Libraries/Taskist.Core` | Entities, enums, DTOs, settings, shared helpers | +| `src/Libraries/Taskist.Data` | EF Core context, configurations, migrations, repositories | +| `src/Libraries/Taskist.Service` | Business services (registered automatically by assembly scan) | +| `src/Presentation/Taskist.Web` | MVC controllers, views, view models, validators, `wwwroot` | +| `src/Tests/Taskist.Tests` | xUnit tests (no database needed) | +| `sql-scripts/` | Idempotent seed scripts, run in numeric order | +| `tools/theme/` | Dark-theme generator (`generate-dark-css.py`) | + +## ✅ Before Opening a Pull Request + +CI runs these on every pull request, so please run them locally first: + +```bash +dotnet build src/Taskist.sln +dotnet test src/Taskist.sln + +# fails if the model changed without a migration +dotnet ef migrations has-pending-model-changes --project src/Libraries/Taskist.Data --startup-project src/Libraries/Taskist.Data +``` + +If you changed an entity, add a migration: + +```bash +dotnet ef migrations add YourMigrationName --project src/Libraries/Taskist.Data --startup-project src/Libraries/Taskist.Data +``` + +Rebuild first; a stale build can produce an empty migration. + +## 📐 Code Guidelines + +Please match the style of the file you are editing. In particular: + +**C#** + +- **No comments in `.cs` files.** Group members with `#region` blocks instead (`Fields`, `Ctor`, `Methods`, `Utilities`, …). +- **One top-level type per file**, named after the type. Nested types stay with their parent. +- Inject dependencies through the constructor into `private readonly` fields. + +**Views and front end** + +- **No inline ` + + +} diff --git a/src/Presentation/Taskist.Web/Views/Account/TwoFactor.cshtml b/src/Presentation/Taskist.Web/Views/Account/TwoFactor.cshtml new file mode 100644 index 0000000..8db7b9f --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Account/TwoFactor.cshtml @@ -0,0 +1,73 @@ +@model TwoFactorLoginModel +@inject Taskist.Service.Localization.ILocalizationService LocalizationService +@functions { + private async Task TextAsync(string key, string fallback) + { + var value = await LocalizationService.GetResourceAsync(key); + return string.IsNullOrWhiteSpace(value) || string.Equals(value, key, StringComparison.OrdinalIgnoreCase) ? fallback : value; + } +} +@{ + ViewData["Title"] = "Two-factor sign-in"; + Layout = "~/Views/Shared/_LayoutLogin.cshtml"; +} + +@section PageStyles { + +} + + + +@section PageScripts { + +} diff --git a/src/Presentation/Taskist.Web/Views/ActivityLog/Index.cshtml b/src/Presentation/Taskist.Web/Views/ActivityLog/Index.cshtml new file mode 100644 index 0000000..c9465f3 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/ActivityLog/Index.cshtml @@ -0,0 +1,142 @@ +@using Microsoft.AspNetCore.Mvc.Rendering +@using Taskist.Web.Models.Logging +@model LogViewModel +@{ + ViewData["Title"] = Localize("ActivityLogPage.Title"); +} + +@section PageStyles { + +} + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ + + +
+
+ @await Html.PartialAsync("DataTable", new DataTableModel + { + Name = "ActivityGrid", + Title = Localize("Log.ActivityTab").Text, + Searching = false, + LengthChangeLabel = Localize("Grid.LengthChangeLabel").Text, + SearchLabel = Localize("Grid.SearchLabel").Text, + ZeroRecordsLabel = Localize("Grid.ZeroRecords").Text, + FooterInfoLabel = Localize("Grid.FooterInfo").Text, + FooterInfoWhenEmptyLabel = Localize("Grid.FooterInfoWhenEmpty").Text, + UrlRead = Url.Action("ActivityDataRead"), + FilterParameters = new List + { + new FilterModel { Parameter = "from", Element = "logFrom" }, + new FilterModel { Parameter = "to", Element = "logTo" }, + new FilterModel { Parameter = "userId", Element = "logUser" }, + new FilterModel { Parameter = "type", Element = "logType" } + }, + Columns = new List + { + new ColumnModel { Title = Localize("Log.When").Text, DataColumn = "When", Sorting = false }, + new ColumnModel { Title = Localize("Log.User").Text, DataColumn = "User", Sorting = false }, + new ColumnModel { Title = Localize("Log.ActivityTab").Text, DataColumn = "Type", Sorting = false }, + new ColumnModel { Title = Localize("Log.Comment").Text, DataColumn = "Comment", Sorting = false }, + new ColumnModel { Title = Localize("Log.Entity").Text, DataColumn = "Entity", Sorting = false }, + new ColumnModel { Title = "IP", DataColumn = "Ip", Sorting = false } + } + }) +
+ +
+ @await Html.PartialAsync("DataTable", new DataTableModel + { + Name = "AuditGrid", + Title = Localize("Log.AuditTab").Text, + Searching = false, + LengthChangeLabel = Localize("Grid.LengthChangeLabel").Text, + SearchLabel = Localize("Grid.SearchLabel").Text, + ZeroRecordsLabel = Localize("Grid.ZeroRecords").Text, + FooterInfoLabel = Localize("Grid.FooterInfo").Text, + FooterInfoWhenEmptyLabel = Localize("Grid.FooterInfoWhenEmpty").Text, + UrlRead = Url.Action("AuditDataRead"), + FilterParameters = new List + { + new FilterModel { Parameter = "from", Element = "logFrom" }, + new FilterModel { Parameter = "to", Element = "logTo" }, + new FilterModel { Parameter = "userId", Element = "logUser" }, + new FilterModel { Parameter = "action", Element = "logAction" } + }, + ColumnActions = new List + { + new ActionModel { + Title = Localize("Log.ViewChanges").Text, + Url = Url.Action("AuditDetail"), + Text = Localize("Log.ViewChanges").Text, + Icon = "fas fa-list-ul", + ReferenceParameter = "Id", + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY + } + }, + Columns = new List + { + new ColumnModel { Title = Localize("Log.When").Text, DataColumn = "When", Sorting = false }, + new ColumnModel { Title = Localize("Log.User").Text, DataColumn = "User", Sorting = false }, + new ColumnModel { Title = Localize("Log.Action").Text, DataColumn = "Action", Sorting = false }, + new ColumnModel { Title = Localize("Log.Entity").Text, DataColumn = "Entity", Sorting = false }, + new ColumnModel { Title = "IP", DataColumn = "Ip", Sorting = false } + } + }) +
+
+ +@section PageScripts { + +} diff --git a/src/Presentation/Taskist.Web/Views/ActivityLog/_AuditDetail.cshtml b/src/Presentation/Taskist.Web/Views/ActivityLog/_AuditDetail.cshtml new file mode 100644 index 0000000..98d94d9 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/ActivityLog/_AuditDetail.cshtml @@ -0,0 +1,46 @@ +@using Taskist.Web.Models.Logging +@model AuditDetailModel + +
+
+
@Model.Action @Model.Entity@(Model.EntityId.HasValue ? " #" + Model.EntityId : "")
+
@Model.User · @Model.When.ToString("dd-MMM-yyyy HH:mm:ss")@(string.IsNullOrWhiteSpace(Model.Ip) ? "" : " · " + Model.Ip)
+
+ + @if (!Model.Changes.Any()) + { +
@Localize("Log.NoChanges").Text
+ } + else + { +
+ + + + + + + + + + @foreach (var c in Model.Changes) + { + + + + + + } + +
@Localize("Log.Field").Text@Localize("Log.OldValue").Text@Localize("Log.NewValue").Text
@c.Field@(string.IsNullOrEmpty(c.Old) ? "—" : c.Old)@(string.IsNullOrEmpty(c.New) ? "—" : c.New)
+
+ } + +
+ @Localize("Log.ViewRaw").Text +
@Localize("Log.OldValue").Text
+
@Model.OldRaw
+
@Localize("Log.NewValue").Text
+
@Model.NewRaw
+
+
diff --git a/src/Presentation/Taskist.Web/Views/Announcement/Acknowledgements.cshtml b/src/Presentation/Taskist.Web/Views/Announcement/Acknowledgements.cshtml new file mode 100644 index 0000000..604f631 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Announcement/Acknowledgements.cshtml @@ -0,0 +1,34 @@ +@model AnnouncementAckAuditModel +@{ + Layout = "~/Views/Shared/_LayoutPartial.cshtml"; +} + +
@Model.Title
+
@Model.Rows.Count @Localize("Announcement.AckCount").Text
+ +@if (!Model.Rows.Any()) +{ +
@Localize("Announcement.NoAcks").Text
+} +else +{ +
+ + + + + + + + + @foreach (var r in Model.Rows) + { + + + + + } + +
@Localize("Announcement.AckUser").Text@Localize("Announcement.AckOn").Text
@r.User@r.AcknowledgedOn.ToString("dd-MMM-yyyy HH:mm")
+
+} diff --git a/src/Presentation/Taskist.Web/Views/Announcement/Create.cshtml b/src/Presentation/Taskist.Web/Views/Announcement/Create.cshtml new file mode 100644 index 0000000..4f431c7 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Announcement/Create.cshtml @@ -0,0 +1,20 @@ +@model AnnouncementModel +@{ + ViewData["Title"] = Localize("AnnouncementPage.Title"); +} + +
+
+
+ @await Html.PartialAsync("_Form", Model) +
+ +
+
+ +@section PageScripts { + +} diff --git a/src/Presentation/Taskist.Web/Views/Announcement/Edit.cshtml b/src/Presentation/Taskist.Web/Views/Announcement/Edit.cshtml new file mode 100644 index 0000000..95ade11 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Announcement/Edit.cshtml @@ -0,0 +1,21 @@ +@model AnnouncementModel +@{ + ViewData["Title"] = Localize("AnnouncementPage.Title"); +} + +
+
+ +
+ @await Html.PartialAsync("_Form", Model) +
+ +
+
+ +@section PageScripts { + +} diff --git a/src/Presentation/Taskist.Web/Views/Announcement/Index.cshtml b/src/Presentation/Taskist.Web/Views/Announcement/Index.cshtml new file mode 100644 index 0000000..84378df --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Announcement/Index.cshtml @@ -0,0 +1,78 @@ +@{ + ViewData["Title"] = Localize("AnnouncementPage.Title"); +} + +@await Html.PartialAsync("DataTable", new DataTableModel +{ + Name = "AnnouncementGrid", + Title = Localize("AnnouncementPage.Title").Text, + LengthChangeLabel = Localize("Grid.LengthChangeLabel").Text, + SearchLabel = Localize("Grid.SearchLabel").Text, + SearchPlaceholder = Localize("Grid.SearchPlaceholder").Text, + ZeroRecordsLabel = Localize("Grid.ZeroRecords").Text, + FooterInfoLabel = Localize("Grid.FooterInfo").Text, + FooterInfoWhenEmptyLabel = Localize("Grid.FooterInfoWhenEmpty").Text, + UrlRead = Url.Action("DataRead"), + HeaderActions = new List + { + new ActionModel { + Title = Localize("Button.AddNew").Text, + Url = Url.Action("Create"), + Text = Localize("Button.AddNew").Text, + Icon = "fas fa-plus", + HyperLinkType = HyperLinkType.BUTTON_TEXT_ICON, + NavigationType = NavigationType.STANDARD, + ButtonColor = ButtonColor.PRIMARY + } + }, + ColumnActions = new List + { + new ActionModel { + Title = Localize("Button.Edit").Text, + Url = Url.Action("Edit"), + Text = Localize("Button.Edit").Text, + Icon = "far fa-edit", + ReferenceParameter = "Id", + HyperLinkType = HyperLinkType.HYPERLINK_ICON, + NavigationType = NavigationType.STANDARD, + ButtonColor = ButtonColor.PRIMARY + }, + new ActionModel { + Title = Localize("AnnouncementGrid.Acknowledgements").Text, + Url = Url.Action("Acknowledgements"), + Text = Localize("AnnouncementGrid.Acknowledgements").Text, + Icon = "fas fa-user-check text-secondary", + ReferenceParameter = "Id", + HyperLinkType = HyperLinkType.HYPERLINK_ICON, + NavigationType = NavigationType.MODAL, + ModalSize = "col-md-6", + ButtonColor = ButtonColor.PRIMARY + }, + new ActionModel { + Title = Localize("Button.Delete").Text, + Url = Url.Action("Delete"), + Text = Localize("Button.Delete").Text, + AuxText = Localize("Button.Cancel").Text, + Icon = "fas fa-trash", + ReferenceParameter = "Id", + DeleteConfirmBox = true, + DeleteConfirmBoxMsg = Localize("Confirmation.Delete").Text, + HyperLinkType = HyperLinkType.HYPERLINK_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY + } + }, + Columns = new List + { + new ColumnModel { Title = Localize("AnnouncementGrid.Title").Text, DataColumn = "Title" }, + new ColumnModel { Title = Localize("AnnouncementGrid.Type").Text, DataColumn = "TypeName" }, + new ColumnModel { Title = Localize("AnnouncementGrid.Severity").Text, DataColumn = "SeverityName" }, + new ColumnModel { Title = Localize("AnnouncementGrid.Audience").Text, DataColumn = "AudienceName" }, + new ColumnModel { Title = Localize("AnnouncementGrid.ValidFrom").Text, DataColumn = "ValidFrom", IsDate = true }, + new ColumnModel { Title = Localize("AnnouncementGrid.ValidTo").Text, DataColumn = "ValidTo", IsDate = true }, + new ColumnModel { Title = Localize("AnnouncementGrid.Active").Text, DataColumn = "Active", Conditions = new List{ + new ColumnConditionModel { Value = "true", Operator = Operator.EQUAL, Icon = "fa fa-check", TextColor = "#2eb85c" }, + new ColumnConditionModel { Value = "false", Operator = Operator.EQUAL, Icon = "fa fa-times", TextColor = "#e55353" } + }} + } +}) diff --git a/src/Presentation/Taskist.Web/Views/Announcement/_Form.cshtml b/src/Presentation/Taskist.Web/Views/Announcement/_Form.cshtml new file mode 100644 index 0000000..8c55626 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Announcement/_Form.cshtml @@ -0,0 +1,78 @@ +@model AnnouncementModel +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+ +
+
+
diff --git a/src/Presentation/Taskist.Web/Views/Backlog/BatchUpdate.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/BatchUpdate.cshtml new file mode 100644 index 0000000..cf2d231 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Backlog/BatchUpdate.cshtml @@ -0,0 +1,9 @@ +@model BacklogBatchUpdateModel +@{ + Layout = "~/Views/Shared/_LayoutPartial.cshtml"; +} + +
+ @await Html.PartialAsync("_FormBatchUpdate", Model) + + \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/Views/Backlog/ClosingComment.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/ClosingComment.cshtml new file mode 100644 index 0000000..e7e1ee3 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/Backlog/ClosingComment.cshtml @@ -0,0 +1,140 @@ +@model ClosingCommentModel +@{ + Layout = "~/Views/Shared/_LayoutPartial.cshtml"; + var req = Model.Requirement; +} + +@section Scripts { + +} + +
+ + + + + +
+
+
+
@Localize("ClosingComment.BeforeMoving") @Model.StatusName
+
#@Model.Id · @Model.TaskTitle
+
+
+ +
    + @if (req.RootCauseRequired) + { +
  • + @Localize("BacklogPage.RootCauseFix.RootCause") + @(req.HasRootCause ? Localize("ClosingComment.AlreadyAdded") : Localize("ClosingComment.AddBelow")) +
  • + } + @if (req.ResolutionRequired) + { +
  • + @Localize("BacklogPage.RootCauseFix.Resolution") + @(req.HasResolution ? Localize("ClosingComment.AlreadyAdded") : Localize("ClosingComment.AddBelow")) +
  • + } + @if (req.MrRequired) + { +
  • + @Localize("BacklogPage.ClosingChecklist.Mr") + + @if (req.HasMr) + { + @($"!{req.ClosingMergeRequestId}") + } + else + { + @Localize("ClosingComment.AddBelow") + } + +
  • + } +
+ +
+ + @if (req.RootCauseMissing) + { +
+ +
@Localize("BacklogPage.RootCauseFix.RootCauseHint")
+ +
+ } + + @if (req.ResolutionMissing) + { +
+ +
@Localize("BacklogPage.RootCauseFix.ResolutionHint")
+ +
+ } + + @if (req.MrMissing) + { +
+
@Localize("ClosingComment.PickMr")
+ @if (req.MrLookupFailed || !string.IsNullOrEmpty(Model.GitLabWarning)) + { +
+ @Localize("ClosingComment.GitLabUnreachable") + @if (!string.IsNullOrEmpty(Model.GitLabWarning ?? req.MrLookupMessage)) + { +
@(Model.GitLabWarning ?? req.MrLookupMessage)
+ } +
+ } +
+ @foreach (var mr in Model.AvailableMergeRequests) + { + + } + +
+
+ } + +
+ + +
+
diff --git a/src/Presentation/Taskist.Web/Views/Backlog/Comments.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/Comments.cshtml index 268b3c7..bd22107 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/Comments.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/Comments.cshtml @@ -1,85 +1,40 @@ -@model BacklogCommentModel - -
- @if (Model.Comments.Count > 0) - { -
- @foreach (var comment in Model.Comments) +@model BacklogCommentModel + +
+
+
+ +
Nobody commented yet!
+ Be the first to add a comment. +
+
+ @foreach (var comment in Model.Comments.OrderBy(c => c.CommentOn)) { -
-
@comment.CommentBy
-
@comment.CommentOn.ToString("dd-MM-yyyy hh:mm")
-
@Html.Raw(comment.Comment)
+
+
@comment.CommentBy
+
+
+ @comment.CommentBy + +
+
@if (comment.SystemComment) { @Html.Raw(comment.Comment) } else { @comment.Comment }
+
}
- } - else - { -
Nobody commented yet!
- } -
-
-
- -
-
- - - \ No newline at end of file +
+
diff --git a/src/Presentation/Taskist.Web/Views/Backlog/Create.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/Create.cshtml index ced381e..7e99caa 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/Create.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/Create.cshtml @@ -1,38 +1,57 @@ -@model BacklogModel +@model BacklogModel @{ - ViewData["Title"] = Localize("BacklogPage.Title"); + ViewData["Title"] = Localize("BacklogPage.Title"); } -
-
-
-
-
- - @await Html.PartialAsync("_Form", Model) -
- -
-
-
-
-
- @await Html.PartialAsync("_FormStatus", Model) -
-
-
-
+@section PageStyles { + + + +} + +@section PageScripts { + + + + + + +} + + +
+
+
+
+ + @await Html.PartialAsync("_Form", Model) +
+
+
+
+
+
+ @await Html.PartialAsync("_FormStatus", Model) +
+
+
+
+ +
+ Ctrl+S + + @if (Model.Id <= 0) + { + + } + + @Localize("Button.Cancel") + +
\ No newline at end of file diff --git a/src/Presentation/Taskist.Web/Views/Backlog/Documents.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/Documents.cshtml index 61ef408..4020c4f 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/Documents.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/Documents.cshtml @@ -1,39 +1,18 @@ -@model IList +@model IList -@if (Model.Count > 0) +@await Html.PartialAsync("_FileTiles", new FileTilesModel { -
- @foreach (var doc in Model) - { - var iconColorClass = "none"; - var iconClass = "none"; - - switch (doc.ContentType) - { - case "image/png": - case "image/jpeg": - iconColorClass = "img"; - iconClass = "fas fa-file-image"; - break; - case "application/pdf": - iconColorClass = "pdf"; - iconClass = "fas fa-file-pdf"; - break; - } - -
- -
- -
-
-
- Delete -
-
- } -
-} + AllowDelete = true, + Items = Model.Select(d => new FileTileModel + { + Id = d.Id, + Name = d.Name, + ContentType = d.ContentType, + FileSize = d.FileSize, + Extension = d.Extension, + Url = Url.Action("ViewDocument", new { token = d.Id })! + }).ToList() +}) \ No newline at end of file + diff --git a/src/Presentation/Taskist.Web/Views/Backlog/Edit.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/Edit.cshtml index a557e51..513e96c 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/Edit.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/Edit.cshtml @@ -3,25 +3,149 @@ ViewData["Title"] = Localize("BacklogPage.Title"); } +@section PageStyles { + + +} + +@section PageScripts { + + + + + + + + + + + + +} + +
+ @if (!Model.CanEdit) {
You are not authorized to edit this task, please contact IT Support.
} -
+@if (Model.StatusLogs.Count > 0) +{ + double DurMinutes(StatusLogModel s) => + (s.StartDate.HasValue && s.EndDate.HasValue) + ? Math.Max(0, (s.EndDate.Value - s.StartDate.Value).TotalMinutes) + : 0; + + var firstStart = Model.StatusLogs.First().StartDate; + var lastEnd = Model.StatusLogs.Last().EndDate; + var ageDays = (firstStart.HasValue && lastEnd.HasValue) ? (lastEnd.Value - firstStart.Value).Days : 0; + var transitions = Model.StatusLogs.Count - 1; + + string DurText(StatusLogModel s) + { + var mins = DurMinutes(s); + if (mins >= 1440) return s.DaysHeld + "d"; + if (mins >= 60) return Math.Round(mins / 60) + "h"; + return Math.Max(0, (int)mins) + "m"; + } + + string RelStart(StatusLogModel s) + { + if (!s.StartDate.HasValue) return ""; + var span = DateTime.Now - s.StartDate.Value; + if (span.TotalDays >= 1) { var d = (int)span.TotalDays; return $"{d} day{(d == 1 ? "" : "s")} ago"; } + if (span.TotalHours >= 1) { var h = (int)span.TotalHours; return $"{h} hour{(h == 1 ? "" : "s")} ago"; } + var m = Math.Max(1, (int)span.TotalMinutes); return $"{m} min ago"; + } +
+
+ @for (var i = 0; i < Model.StatusLogs.Count; i++) + { + var item = Model.StatusLogs[i]; + var isCurrent = i == Model.StatusLogs.Count - 1; +
+
To@(isCurrent ? "now" : item.EndDate.ToDateString("dd-MMM-yyyy hh:mm tt"))
+
@DurText(item) in status • started @RelStart(item)
+
+
"> + + + @item.Status.Name + @DurText(item) + +
+ } + + @ageDays d + +
+ @if (Model.StageDurations.Count > 0) + { + + @foreach (var chip in Model.StageDurations) + { + + @chip.Name@chip.DurationText + + } + + } + +} +
@await Html.PartialAsync("_Form", Model)
-
+
+
+ @Localize("Backlog.Code.Title") + +
+
+ @Localize("Backlog.Code.Loading") +
+
+
+
+ @Localize("Backlog.Issue.Title") +
+
+ @Localize("Backlog.Code.Loading") +
+
- - \ No newline at end of file + +
+ Ctrl+S + + @if (Model.CanDelete) + { + + } + + @Localize("Button.Cancel") + +
+ \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/Views/Backlog/Filter.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/Filter.cshtml index cf5b1ed..208dc23 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/Filter.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/Filter.cshtml @@ -1,100 +1,175 @@ -@model BacklogModel +@model BacklogModel -
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
+
+
+
+ + + + +
+
+
+ + +
+
-
-
-
- - -
-
+ + + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
- \ No newline at end of file +
+ +
+
+
+
+ +
+ + +
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+ + + +
diff --git a/src/Presentation/Taskist.Web/Views/Backlog/History.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/History.cshtml index 75bdda9..1fe7817 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/History.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/History.cshtml @@ -1,11 +1,48 @@ -@model IList +@model IList -
- @foreach(var comment in Model){ -
-
@comment.CommentBy
-
@comment.CommentOn.ToString("dd-MM-yyyy hh:mm")
-
@Html.Raw(comment.Comment)
-
- } -
\ No newline at end of file +@if (Model.Any()) +{ +
+ @foreach (var item in Model) + { +
+
@item.CommentBy
+
+
+ @item.CommentBy + +
+ @if (item.IsTextChange) + { +
+
+ @item.FieldLabel + @item.ChangeAction + View changes +
+
+
+ + + +
+
+
+
+ } + else + { +
+ } +
+
+ } +
+} +else +{ +
+ +
No history yet.
+
+} diff --git a/src/Presentation/Taskist.Web/Views/Backlog/Index.cshtml b/src/Presentation/Taskist.Web/Views/Backlog/Index.cshtml index e7b671f..51b1787 100644 --- a/src/Presentation/Taskist.Web/Views/Backlog/Index.cshtml +++ b/src/Presentation/Taskist.Web/Views/Backlog/Index.cshtml @@ -1,157 +1,201 @@ -@model BacklogPageModel +@model BacklogGridModel +@inject GeneralSettings GeneralSettings @{ ViewData["Title"] = Localize("BacklogPage.Title"); + + var pageLength = GeneralSettings.ItemsPerPage > 0 ? GeneralSettings.ItemsPerPage : 10; + var lengthOptions = new List { 10, 25, 50, 100 }; + if (!lengthOptions.Contains(pageLength)) + lengthOptions.Add(pageLength); + lengthOptions = lengthOptions.Distinct().OrderBy(x => x).ToList(); } @section PageStyles { - + + } @section PageScripts { - - + + + + + + + + + + + } -
- + +@if (Model.TwoFactorEnabled == true) +{ +
+
+
+
@Localize("Profile.TwoFactor.Title").Text @Localize("Profile.TwoFactor.On").Text
+
@Localize("UserPage.TwoFactor.ResetHint").Text
+
+ +
+
+} + +@if (Model.LinkedSignIns.Any()) +{ +
+
@Localize("Profile.SignIns.Title").Text
+
+
@Localize("UserPage.SignIns.Intro").Text
+ @foreach (var link in Model.LinkedSignIns) + { +
+
+ @link.ProviderName + @if (!string.IsNullOrEmpty(link.Email)) + { + · @link.Email + } +
+ @Localize("Profile.SignIns.LastUsed").Text: + @(link.LastUsedOn.HasValue ? link.LastUsedOn.Value.ToLocalTime().ToString("g") : Localize("Profile.SignIns.Never").Text) +
+
+ +
+ } +
+
+} + +@section PageScripts { + + +} \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/Views/User/Index.cshtml b/src/Presentation/Taskist.Web/Views/User/Index.cshtml index 32349f9..49154bc 100644 --- a/src/Presentation/Taskist.Web/Views/User/Index.cshtml +++ b/src/Presentation/Taskist.Web/Views/User/Index.cshtml @@ -1,7 +1,42 @@ -@{ +@model UserListModel +@{ ViewData["Title"] = Localize("UserPage.Title"); } +@section PageStyles { + +} + + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +@* Hidden CSV mirrors of the multi-selects — the grid's filter sends these (string), so int[] binds. + empStatus is seeded with Active (1) so the grid's first load already shows active users. *@ + + + @await Html.PartialAsync("DataTable", new DataTableModel { Name = "UserGrid", @@ -13,6 +48,12 @@ FooterInfoLabel = Localize("Grid.FooterInfo").Text, FooterInfoWhenEmptyLabel = Localize("Grid.FooterInfoWhenEmpty").Text, UrlRead = Url.Action("DataRead"), + FilterParameters = new List + { + new FilterModel { Parameter = "Statuses", Element = "empStatus" }, + new FilterModel { Parameter = "RoleIds", Element = "empRole" }, + new FilterModel { Parameter = "Locked", Element = "empLockedSel" } + }, HeaderActions = new List { new ActionModel { @@ -20,9 +61,9 @@ Url = Url.Action("Create"), Text = Localize("Button.AddNew").Text, Icon = "fas fa-plus", - HyperLinkType = HyperLinkTypeEnum.BUTTON_TEXT_ICON, - NavigationType = NavigationTypeEnum.STANDARD, - ButtonColor = ButtonColorEnum.PRIMARY + HyperLinkType = HyperLinkType.BUTTON_TEXT_ICON, + NavigationType = NavigationType.STANDARD, + ButtonColor = ButtonColor.PRIMARY } }, ColumnActions = new List @@ -33,9 +74,9 @@ Text = Localize("Button.Edit").Text, Icon = "far fa-edit", ReferenceParameter = "Id", - HyperLinkType = HyperLinkTypeEnum.HYPERLINK_TEXT_ICON, - NavigationType = NavigationTypeEnum.STANDARD, - ButtonColor = ButtonColorEnum.PRIMARY + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.STANDARD, + ButtonColor = ButtonColor.PRIMARY }, new ActionModel { Title = Localize("ButtonUser.ResetPassword").Text, @@ -43,9 +84,23 @@ Text = Localize("ButtonUser.ResetPassword").Text, Icon = "fas fa-key", ReferenceParameter = "Id", - HyperLinkType = HyperLinkTypeEnum.HYPERLINK_TEXT_ICON, - NavigationType = NavigationTypeEnum.MODAL, - ButtonColor = ButtonColorEnum.PRIMARY + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY + }, + new ActionModel { + Title = Localize("UserUnlock.Unlock").Text, + Url = Url.Action("Unlock"), + Text = Localize("UserUnlock.Unlock").Text, + Icon = "fas fa-unlock", + ReferenceParameter = "Id", + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY, + VisibleConditions = new List + { + new ActionCoditionModel { ReferenceParameter = "Locked", Operator = Operator.EQUAL, Value = "true" } + } } }, Columns = new List @@ -53,6 +108,15 @@ new ColumnModel { Title = Localize("UserGrid.FirstName").Text, DataColumn = "FirstName" }, new ColumnModel { Title = Localize("UserGrid.LastName").Text, DataColumn = "LastName" }, new ColumnModel { Title = Localize("UserGrid.Email").Text, DataColumn = "Email" }, - new ColumnModel { Title = Localize("UserGrid.MobileNumber").Text, DataColumn = "MobileNumber" } + new ColumnModel { Title = Localize("UserGrid.MobileNumber").Text, DataColumn = "MobileNumber" }, + new ColumnModel { Title = Localize("UserGrid.Status").Text, DataColumn = "StatusName" }, + new ColumnModel { Title = Localize("UserGrid.Locked").Text, DataColumn = "Locked", Conditions = new List{ + new ColumnConditionModel { Value = "true", Operator = Operator.EQUAL, Icon = "fa fa-lock", TextColor = "#e55353" }, + new ColumnConditionModel { Value = "false", Operator = Operator.EQUAL, Icon = "fa fa-lock-open", TextColor = "#2eb85c" } + }} } -}) \ No newline at end of file +}) + +@section PageScripts { + +} diff --git a/src/Presentation/Taskist.Web/Views/User/ResetPassword.cshtml b/src/Presentation/Taskist.Web/Views/User/ResetPassword.cshtml index 382579b..9995daa 100644 --- a/src/Presentation/Taskist.Web/Views/User/ResetPassword.cshtml +++ b/src/Presentation/Taskist.Web/Views/User/ResetPassword.cshtml @@ -1,4 +1,4 @@ -@model ResetPasswordModel +@model ResetPasswordModel @{ Layout = "~/Views/Shared/_LayoutPartial.cshtml"; } diff --git a/src/Presentation/Taskist.Web/Views/User/Unlock.cshtml b/src/Presentation/Taskist.Web/Views/User/Unlock.cshtml new file mode 100644 index 0000000..2cdcbe0 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/User/Unlock.cshtml @@ -0,0 +1,14 @@ +@model UserModel +@{ + Layout = "~/Views/Shared/_LayoutPartial.cshtml"; +} + +
+ +
+ + @string.Format(Localize("UserUnlock.Confirm").Text, $"{Model.FirstName} {Model.LastName}") +
+ + +
diff --git a/src/Presentation/Taskist.Web/Views/User/_Form.cshtml b/src/Presentation/Taskist.Web/Views/User/_Form.cshtml index 55a6c68..7e3d365 100644 --- a/src/Presentation/Taskist.Web/Views/User/_Form.cshtml +++ b/src/Presentation/Taskist.Web/Views/User/_Form.cshtml @@ -1,53 +1,149 @@ @model UserRegistrationModel -
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
-
-
- - - -
-
+ +
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+ + + +
+
+
+
+
+
+ + @if (Model.User.GitLabConfigured) + { + + } + else + { + + } + +
+
\ No newline at end of file diff --git a/src/Presentation/Taskist.Web/Views/UserRole/Access.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/Access.cshtml new file mode 100644 index 0000000..694c67c --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/UserRole/Access.cshtml @@ -0,0 +1,87 @@ +@model UserAccessFilterModel +@using Microsoft.AspNetCore.Mvc.Rendering +@{ + ViewData["Title"] = Localize("UserAccessPage.Title"); + var roles = Model.Roles; + var permissions = Model.Permissions; +} + +@section PageStyles { + +} + +@section PageScripts { + +} + +
+
+
+
+ + + +
+
+ + + +
+
+ + +
+
+
+
+ +@await Html.PartialAsync("DataTable", new DataTableModel +{ + Name = "UserAccessGrid", + Title = Localize("UserAccessPage.Title").Text, + LengthChangeLabel = Localize("Grid.LengthChangeLabel").Text, + SearchLabel = Localize("Grid.SearchLabel").Text, + SearchPlaceholder = Localize("Grid.SearchPlaceholder").Text, + ZeroRecordsLabel = Localize("Grid.ZeroRecords").Text, + FooterInfoLabel = Localize("Grid.FooterInfo").Text, + FooterInfoWhenEmptyLabel = Localize("Grid.FooterInfoWhenEmpty").Text, + UrlRead = Url.Action("AccessDataRead"), + FilterParameters = new List + { + new FilterModel { Parameter = "roleId", Element = "filterRole" }, + new FilterModel { Parameter = "permissionId", Element = "filterPermission" } + }, + ColumnActions = new List + { + new ActionModel { + Title = Localize("UserAccess.ViewAccess").Text, + Url = Url.Action("UserAccess"), + Text = Localize("UserAccess.ViewAccess").Text, + Icon = "fas fa-user-shield", + ReferenceParameter = "Id", + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY + } + }, + Columns = new List + { + new ColumnModel { Title = Localize("UserAccessGrid.User").Text, DataColumn = "UserName" }, + new ColumnModel { Title = Localize("UserAccessGrid.Roles").Text, DataColumn = "Roles" }, + new ColumnModel { Title = Localize("UserAccessGrid.PermissionCount").Text, DataColumn = "PermissionCount" } + } +}) diff --git a/src/Presentation/Taskist.Web/Views/UserRole/Create.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/Create.cshtml index 5df8d81..86df046 100644 --- a/src/Presentation/Taskist.Web/Views/UserRole/Create.cshtml +++ b/src/Presentation/Taskist.Web/Views/UserRole/Create.cshtml @@ -1,4 +1,4 @@ -@model UserRoleModel +@model UserRoleModel @{ Layout = "~/Views/Shared/_LayoutPartial.cshtml"; } diff --git a/src/Presentation/Taskist.Web/Views/UserRole/Edit.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/Edit.cshtml index d5d31fb..15f10a4 100644 --- a/src/Presentation/Taskist.Web/Views/UserRole/Edit.cshtml +++ b/src/Presentation/Taskist.Web/Views/UserRole/Edit.cshtml @@ -1,4 +1,4 @@ -@model UserRoleModel +@model UserRoleModel @{ Layout = "~/Views/Shared/_LayoutPartial.cshtml"; } diff --git a/src/Presentation/Taskist.Web/Views/UserRole/Index.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/Index.cshtml index 92d489e..450cf34 100644 --- a/src/Presentation/Taskist.Web/Views/UserRole/Index.cshtml +++ b/src/Presentation/Taskist.Web/Views/UserRole/Index.cshtml @@ -1,7 +1,15 @@ -@{ +@{ ViewData["Title"] = Localize("UserRolePage.Title"); } +@section PageStyles { + +} + +@section PageScripts { + +} + @await Html.PartialAsync("DataTable", new DataTableModel { Name = "UserRoleGrid", @@ -20,9 +28,9 @@ Url = Url.Action("Create"), Text = Localize("Button.AddNew").Text, Icon = "fas fa-plus", - HyperLinkType = HyperLinkTypeEnum.BUTTON_TEXT_ICON, - NavigationType = NavigationTypeEnum.MODAL, - ButtonColor = ButtonColorEnum.PRIMARY + HyperLinkType = HyperLinkType.BUTTON_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY } }, ColumnActions = new List @@ -33,9 +41,9 @@ Text = Localize("Button.Edit").Text, Icon = "far fa-edit", ReferenceParameter = "Id", - HyperLinkType = HyperLinkTypeEnum.HYPERLINK_TEXT_ICON, - NavigationType = NavigationTypeEnum.MODAL, - ButtonColor = ButtonColorEnum.PRIMARY + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY }, new ActionModel { Title = Localize("UserRoleGrid.Button.Permission").Text, @@ -43,9 +51,9 @@ Text = Localize("UserRoleGrid.Button.Permission").Text, Icon = "fas fa-shield-alt", ReferenceParameter = "Id", - HyperLinkType = HyperLinkTypeEnum.HYPERLINK_TEXT_ICON, - NavigationType = NavigationTypeEnum.MODAL, - ButtonColor = ButtonColorEnum.PRIMARY + HyperLinkType = HyperLinkType.HYPERLINK_TEXT_ICON, + NavigationType = NavigationType.OFFCANVAS, + ButtonColor = ButtonColor.PRIMARY } }, Columns = new List @@ -54,12 +62,12 @@ new ColumnModel { Title = Localize("UserRoleGrid.SystemName").Text, DataColumn = "SystemName" }, new ColumnModel { Title = Localize("UserRoleGrid.Description").Text, DataColumn = "Description" }, new ColumnModel { Title = Localize("UserRoleGrid.SystemDefined").Text, DataColumn = "SystemDefined", Conditions = new List{ - new ColumnConditionModel { Value = "true", Operator = OperatorEnum.EQUAL, Icon = "fa fa-check", TextColor = "#2eb85c" }, - new ColumnConditionModel { Value = "false", Operator = OperatorEnum.EQUAL, Icon = "fa fa-times", TextColor = "#e55353" } + new ColumnConditionModel { Value = "true", Operator = Operator.EQUAL, Icon = "fa fa-check", TextColor = "#2eb85c" }, + new ColumnConditionModel { Value = "false", Operator = Operator.EQUAL, Icon = "fa fa-times", TextColor = "#e55353" } }}, new ColumnModel { Title = Localize("UserRoleGrid.Active").Text, DataColumn = "Active", Conditions = new List{ - new ColumnConditionModel { Value = "true", Operator = OperatorEnum.EQUAL, Icon = "fa fa-check", TextColor = "#2eb85c" }, - new ColumnConditionModel { Value = "false", Operator = OperatorEnum.EQUAL, Icon = "fa fa-times", TextColor = "#e55353" } + new ColumnConditionModel { Value = "true", Operator = Operator.EQUAL, Icon = "fa fa-check", TextColor = "#2eb85c" }, + new ColumnConditionModel { Value = "false", Operator = Operator.EQUAL, Icon = "fa fa-times", TextColor = "#e55353" } }} } }) diff --git a/src/Presentation/Taskist.Web/Views/UserRole/Permission.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/Permission.cshtml index 89b814a..6eceb9f 100644 --- a/src/Presentation/Taskist.Web/Views/UserRole/Permission.cshtml +++ b/src/Presentation/Taskist.Web/Views/UserRole/Permission.cshtml @@ -1,39 +1,83 @@ -@model UserRolePermissionGridModel +@model UserRolePermissionGridModel +@functions { + static string Humanize(string s) => + string.IsNullOrWhiteSpace(s) ? "Other" : System.Text.RegularExpressions.Regex.Replace(s, "(\\B[A-Z])", " $1"); +} @{ Layout = "~/Views/Shared/_LayoutPartial.cshtml"; - var canModify = true; - if (Model.SystemRole && !Model.IsAdmin) - { - canModify = false; - } + var canModify = !(Model.SystemRole && !Model.IsAdmin); + + var order = new[] { "Dashboard", "WorkItems", "Reports", "Master", "Configuration", "Integration", "Security", "Docs" }; + var groups = Model.UserRolePermission + .GroupBy(p => string.IsNullOrWhiteSpace(p.RoleGroup) ? "Other" : p.RoleGroup) + .OrderBy(g => { var i = Array.IndexOf(order, g.Key); return i < 0 ? int.MaxValue : i; }) + .ThenBy(g => g.Key) + .ToList(); } + @if (!canModify) {
@Localize("UserRoleModal.SystemRoleMsg")
} +
-
- @foreach (var permission in Model.UserRolePermission) + +
+ +
+ + + @if (canModify) + { + + + } +
+
+ +
+ @foreach (var group in groups) { - var isChecked = Model.UserRolePermissionMap.Any(x => x.PermissionId == permission.Id && x.UserRoleId == Model.RoleId); -
-
-
-
+ + - \ No newline at end of file + diff --git a/src/Presentation/Taskist.Web/Views/UserRole/UserAccess.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/UserAccess.cshtml new file mode 100644 index 0000000..639fa68 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/UserRole/UserAccess.cshtml @@ -0,0 +1,49 @@ +@model UserAccessDetailModel +@{ + Layout = "~/Views/Shared/_LayoutPartial.cshtml"; + var totalPermissions = Model.PermissionGroups.Sum(g => g.Permissions.Count); +} + +
+ @Model.UserName +
+ +
+
@Localize("UserAccess.Roles").Text
+ @if (Model.Roles.Any()) + { + foreach (var role in Model.Roles) + { + @role + } + } + else + { + @Localize("UserAccess.NoRoles").Text + } +
+ +
@Localize("UserAccess.EffectivePermissions").Text (@totalPermissions)
+ +@if (Model.PermissionGroups.Any()) +{ + foreach (var group in Model.PermissionGroups) + { +
+
+ @group.GroupName + @group.Permissions.Count +
+
+ @foreach (var permission in group.Permissions) + { + @permission + } +
+
+ } +} +else +{ +
@Localize("UserAccess.NoPermissions").Text
+} diff --git a/src/Presentation/Taskist.Web/Views/UserRole/_Form.cshtml b/src/Presentation/Taskist.Web/Views/UserRole/_Form.cshtml index 1d02ce7..93b8611 100644 --- a/src/Presentation/Taskist.Web/Views/UserRole/_Form.cshtml +++ b/src/Presentation/Taskist.Web/Views/UserRole/_Form.cshtml @@ -1,5 +1,4 @@ -@model UserRoleModel -@Html.AntiForgeryToken() +@model UserRoleModel @{ var isDisabled = Model.Id > 0 && Model.SystemDefined; } diff --git a/src/Presentation/Taskist.Web/Views/WikiDocument/Index.cshtml b/src/Presentation/Taskist.Web/Views/WikiDocument/Index.cshtml new file mode 100644 index 0000000..523ace8 --- /dev/null +++ b/src/Presentation/Taskist.Web/Views/WikiDocument/Index.cshtml @@ -0,0 +1,108 @@ +@model WikiDocumentModel +@{ + ViewData["Title"] = Localize("WikiPage.Title"); +} + +@section PageStyles { + + +} + +
+@Html.AntiForgeryToken() + +
+
+
+
+
+ +
+
+ +
+
+ + +
+
+
+ +
+
+
+
+ Pages + + + + +
+
+
+
+
+
+
+ Home + +
+
+ + + + + +
+
+
+
+
+ +
+
+
+
+
+
+
+ +@section PageScripts { + + +} diff --git a/src/Presentation/Taskist.Web/Views/_ViewImports.cshtml b/src/Presentation/Taskist.Web/Views/_ViewImports.cshtml index 57b7e35..85485f5 100644 --- a/src/Presentation/Taskist.Web/Views/_ViewImports.cshtml +++ b/src/Presentation/Taskist.Web/Views/_ViewImports.cshtml @@ -1,22 +1,31 @@ -@using StackExchange.Profiling +@using StackExchange.Profiling @addTagHelper *, MiniProfiler.AspNetCore.Mvc @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, WebOptimizer.Core @addTagHelper *, Taskist.Web @inherits Taskist.Web.Helpers.Razor.LocalizeRazorPage @inject IWorkContext workContext +@using Taskist.Core.Dtos.Charts +@using Taskist.Core.Dtos.Git +@using Taskist.Core.Dtos.Reports @using Taskist.Web @using Taskist.Web.Models @using Taskist.Core @using Taskist.Core.Common +@using Taskist.Core.Enums +@using Taskist.Core.Domain.Settings @using Taskist.Web.Models.Common @using Taskist.Web.Models.Datatable -@using Taskist.Web.Models.Masters @using Taskist.Web.Models.Users @using Taskist.Web.Models.Dashboard @using Taskist.Web.Models.Localization @using Taskist.Web.Models.WorkItems +@using Taskist.Web.Models.Reports +@using Taskist.Web.Models.Masters +@using Taskist.Web.Models.Announcements +@using Taskist.Web.Models.Wiki @using Taskist.Core.Extensions @using Taskist.Web.Helpers.Localization \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/Views/_ViewStart.cshtml b/src/Presentation/Taskist.Web/Views/_ViewStart.cshtml index 1af6e49..d641c67 100644 --- a/src/Presentation/Taskist.Web/Views/_ViewStart.cshtml +++ b/src/Presentation/Taskist.Web/Views/_ViewStart.cshtml @@ -1,3 +1,3 @@ -@{ +@{ Layout = "_Layout"; } \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/appsettings.Development.json b/src/Presentation/Taskist.Web/appsettings.Development.json deleted file mode 100644 index 0c208ae..0000000 --- a/src/Presentation/Taskist.Web/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/src/Presentation/Taskist.Web/appsettings.json b/src/Presentation/Taskist.Web/appsettings.json index 2b51bce..0db2134 100644 --- a/src/Presentation/Taskist.Web/appsettings.json +++ b/src/Presentation/Taskist.Web/appsettings.json @@ -1,32 +1,62 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information", - "Hangfire": "Information" - } - }, - "AllowedHosts": "*", - "ConnectionStrings": { - "AppContext": "Server=.\\SQLEXPRESS;Database=Taskist;Integrated Security=True;TrustServerCertificate=True;" - }, - "AppConfig": { - "DefaultEmailAccount": { - "Name": "Taskist", - "Email": "noreply@taskist.in", - "Host": "taskist.in", - "Port": 465, - "Username": "XX", - "Password": "XX", - "EnableSsl": true, - "UseDefaultCredentials": false - } - }, - "Sentry": { - "Enabled": false, - "Dsn": "https://YOUR_SENTRY_DSN_HERE", - "Debug": true, - "TracesSampleRate": 1.0 - } + "ConnectionStrings": { + "AppContext": "Server=.;Database=Taskist;Trusted_Connection=True;TrustServerCertificate=True;Encrypt=False;" + }, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information", + "Hangfire": "Information" + } + }, + "AllowedHosts": "*", + "App": { + "BaseUrl": "https://localhost:7025/", + "Version": "1.1.0", + "IsBeta": true, + "BetaMessage": "You're on a beta build — some features may change." + }, + "DataProtection": { + "KeysPath": "", + "CertificatePath": "", + "CertificateThumbprint": "", + "ProtectWithDpapi": false, + "DpapiLocalMachine": false + }, + "Sentry": { + "Enabled": false, + "Dsn": "", + "Environment": "", + "TracesSampleRate": 0.0, + "Debug": false + }, + "Authentication": { + "Oidc": { + "Enabled": false, + "DisplayName": "", + "Authority": "", + "ClientId": "", + "ClientSecret": "", + "Scopes": "openid profile email", + "RequireHttpsMetadata": true, + "RequireVerifiedEmail": true, + "AutoProvision": false, + "RoleClaim": "", + "RoleMappings": {}, + "DisableLocalLogin": false + }, + "TwoFactor": { + "RequireForAdministrators": false, + "RememberDeviceDays": 30 + } + }, + "Security": { + "RequireHttpsCookies": true, + "ForwardedHeaders": { + "Enabled": false, + "KnownProxies": [], + "KnownNetworks": [] + } + } } diff --git a/src/Presentation/Taskist.Web/web.config b/src/Presentation/Taskist.Web/web.config new file mode 100644 index 0000000..a34dbfd --- /dev/null +++ b/src/Presentation/Taskist.Web/web.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/Presentation/Taskist.Web/wwwroot/css/announcement.css b/src/Presentation/Taskist.Web/wwwroot/css/announcement.css new file mode 100644 index 0000000..cb71d4f --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/announcement.css @@ -0,0 +1,86 @@ +/* Announcement banners (full-width, in-flow under the header) */ +.ann-banner-stack { width: 100%; } +/* Rendered hidden; JS reveals only non-dismissed ones (no dismissed-then-flash). */ +.ann-banner--pending { display: none !important; } +.ann-banner { + display: flex; + align-items: center; + gap: 10px; + padding: 10px 16px; + border-bottom: 1px solid rgba(0, 0, 0, .06); + border-left: 4px solid transparent; + font-size: .88rem; + box-shadow: 0 2px 6px rgba(20, 40, 70, .08); + animation: annSlideDown .35s ease-out; +} +@keyframes annSlideDown { + from { transform: translateY(-100%); opacity: 0; } + to { transform: translateY(0); opacity: 1; } +} +@media (prefers-reduced-motion: reduce) { + .ann-banner { animation: none; } +} +.ann-banner__mega { + flex: 0 0 auto; + width: 26px; height: 26px; + display: inline-flex; align-items: center; justify-content: center; + border-radius: 50%; + background: rgba(255, 255, 255, .7); + font-size: .8rem; +} +.ann-banner__icon { flex: 0 0 auto; } +.ann-banner__body { flex: 1 1 auto; min-width: 0; } +.ann-banner__title { font-weight: 700; margin-right: 6px; } +.ann-banner__text > * { display: inline; margin: 0; } +.ann-banner__close { + flex: 0 0 auto; background: none; border: none; font-size: 1.2rem; + line-height: 1; color: inherit; opacity: .6; cursor: pointer; +} +.ann-banner__close:hover { opacity: 1; } +.ann-banner__ack { + flex: 0 0 auto; + background: rgba(255, 255, 255, .65); + border: 1px solid rgba(0, 0, 0, .12); + color: inherit; + font-weight: 600; + font-size: .76rem; + white-space: nowrap; +} +.ann-banner__ack:hover { background: #fff; } + +.ann-banner--info { background: #dcebfd; color: #14508f; border-left-color: #3b82f6; } +.ann-banner--info .ann-banner__icon, .ann-banner--info .ann-banner__mega { color: #3b82f6; } + +.ann-banner--success { background: #d8f3e3; color: #176437; border-left-color: #22c55e; } +.ann-banner--success .ann-banner__icon, .ann-banner--success .ann-banner__mega { color: #16a34a; } + +.ann-banner--warning { background: #fdefc7; color: #7a5c00; border-left-color: #e0a800; } +.ann-banner--warning .ann-banner__icon, .ann-banner--warning .ann-banner__mega { color: #d69700; } + +.ann-banner--critical { + background: #fbdce1; color: #9c1b30; border-left-color: #dc3545; + font-weight: 500; + box-shadow: 0 2px 10px rgba(220, 53, 69, .2); +} +.ann-banner--critical .ann-banner__title { text-transform: uppercase; letter-spacing: .02em; } +.ann-banner--critical .ann-banner__icon, .ann-banner--critical .ann-banner__mega { color: #dc3545; } + +/* One-time announcement modal */ +.ann-modal .modal-content { border: none; border-radius: 14px; overflow: hidden; box-shadow: 0 16px 48px rgba(20, 40, 70, .28); } +.ann-modal__head { + display: flex; align-items: center; gap: 12px; + padding: 18px 22px; color: #fff; +} +.ann-modal__icon { + flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; + display: inline-flex; align-items: center; justify-content: center; + background: rgba(255, 255, 255, .22); font-size: 1.05rem; +} +.ann-modal__title { margin: 0; font-size: 1.1rem; font-weight: 700; color: #fff; } +.ann-modal__body { padding: 22px; font-size: .92rem; color: #33455c; line-height: 1.55; } +.ann-modal__footer { border-top: 1px solid #eef2f7; padding: 12px 18px; } + +.ann-modal--info .ann-modal__head { background: linear-gradient(135deg, #3b82f6, #2563eb); } +.ann-modal--success .ann-modal__head { background: linear-gradient(135deg, #22c55e, #16a34a); } +.ann-modal--warning .ann-modal__head { background: linear-gradient(135deg, #f59e0b, #d97706); } +.ann-modal--critical .ann-modal__head { background: linear-gradient(135deg, #ef4444, #dc2626); } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/appearance.css b/src/Presentation/Taskist.Web/wwwroot/css/appearance.css new file mode 100644 index 0000000..e8d2258 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/appearance.css @@ -0,0 +1,236 @@ +/* Appearance: accent colour (data-app-accent on ) and the CoreUI primary colour mapped onto it. + Indigo is CoreUI's own primary, so the default accent changes nothing. Dark mode itself is CoreUI's + data-coreui-theme="dark" plus the dark tokens in theme-tokens.css / vendor-dark.css. */ + +html { + --app-accent: #5856d6; + --app-accent-rgb: 88, 86, 214; +} + +html[data-app-accent=teal] { --app-accent: #0d7f81; --app-accent-rgb: 13, 127, 129; } +html[data-app-accent=blue] { --app-accent: #2563eb; --app-accent-rgb: 37, 99, 235; } +html[data-app-accent=purple] { --app-accent: #7c3aed; --app-accent-rgb: 124, 58, 237; } +html[data-app-accent=green] { --app-accent: #15803d; --app-accent-rgb: 21, 128, 61; } +html[data-app-accent=orange] { --app-accent: #c2410c; --app-accent-rgb: 194, 65, 12; } +html[data-app-accent=rose] { --app-accent: #e11d48; --app-accent-rgb: 225, 29, 72; } + +html[data-app-accent] { + --app-accent-hover: color-mix(in srgb, var(--app-accent) 85%, #000); + --app-accent-active: color-mix(in srgb, var(--app-accent) 78%, #000); + --app-accent-text: var(--app-accent); + --app-accent-subtle: color-mix(in srgb, var(--app-accent) 14%, #fff); + --app-accent-border: color-mix(in srgb, var(--app-accent) 50%, #fff); + --cui-primary: var(--app-accent); + --cui-primary-rgb: var(--app-accent-rgb); + --cui-link-color: var(--app-accent-text); + --cui-link-color-rgb: var(--app-accent-rgb); + --cui-link-hover-color: var(--app-accent-hover); + --cui-primary-text-emphasis: color-mix(in srgb, var(--app-accent) 70%, #000); + --cui-primary-bg-subtle: var(--app-accent-subtle); + --cui-primary-border-subtle: var(--app-accent-border); + --cui-focus-ring-color: rgba(var(--app-accent-rgb), .25); +} + +html[data-coreui-theme=dark] { --app-accent-text-rgb: 152, 150, 230; } +html[data-coreui-theme=dark][data-app-accent=teal] { --app-accent-text-rgb: 105, 176, 177; } +html[data-coreui-theme=dark][data-app-accent=blue] { --app-accent-text-rgb: 120, 158, 243; } +html[data-coreui-theme=dark][data-app-accent=purple] { --app-accent-text-rgb: 174, 133, 244; } +html[data-coreui-theme=dark][data-app-accent=green] { --app-accent-text-rgb: 110, 176, 135; } +html[data-coreui-theme=dark][data-app-accent=orange] { --app-accent-text-rgb: 217, 137, 104; } +html[data-coreui-theme=dark][data-app-accent=rose] { --app-accent-text-rgb: 236, 115, 142; } + +html[data-app-accent][data-coreui-theme=dark] { + --app-accent-text: rgb(var(--app-accent-text-rgb)); + --cui-link-color-rgb: var(--app-accent-text-rgb); + --app-accent-subtle: color-mix(in srgb, var(--app-accent) 22%, #212631); + --app-accent-border: color-mix(in srgb, var(--app-accent) 55%, #212631); + --cui-link-hover-color: color-mix(in srgb, var(--app-accent) 45%, #fff); + --cui-primary-text-emphasis: color-mix(in srgb, var(--app-accent) 55%, #fff); +} + +/* Buttons */ +html[data-app-accent] .btn-primary { + --cui-btn-bg: var(--app-accent); + --cui-btn-border-color: var(--app-accent); + --cui-btn-hover-bg: var(--app-accent-hover); + --cui-btn-hover-border-color: var(--app-accent-hover); + --cui-btn-focus-shadow-rgb: var(--app-accent-rgb); + --cui-btn-active-bg: var(--app-accent-active); + --cui-btn-active-border-color: var(--app-accent-active); + --cui-btn-disabled-bg: var(--app-accent); + --cui-btn-disabled-border-color: var(--app-accent); +} + +html[data-app-accent] .btn-outline-primary { + --cui-btn-color: var(--app-accent-text); + --cui-btn-border-color: var(--app-accent); + --cui-btn-hover-bg: var(--app-accent); + --cui-btn-hover-border-color: var(--app-accent); + --cui-btn-focus-shadow-rgb: var(--app-accent-rgb); + --cui-btn-active-bg: var(--app-accent-active); + --cui-btn-active-border-color: var(--app-accent-active); + --cui-btn-disabled-color: var(--app-accent-text); +} + +html[data-app-accent] .btn-ghost-primary { + --cui-btn-color: var(--app-accent-text); + --cui-btn-hover-bg: var(--app-accent); + --cui-btn-hover-border-color: var(--app-accent); + --cui-btn-active-bg: var(--app-accent-active); + --cui-btn-active-border-color: var(--app-accent-active); + --cui-btn-disabled-color: var(--app-accent-text); +} + +html[data-app-accent] .btn-link { --cui-btn-focus-shadow-rgb: var(--app-accent-rgb); } +html[data-app-accent][data-coreui-theme=dark] .text-bg-primary { background-color: var(--app-accent) !important; } +html[data-app-accent] .callout-primary { --cui-callout-border-left-color: var(--app-accent); } +html[data-app-accent] .border-top-primary { border-top-color: var(--app-accent) !important; } +html[data-app-accent] .border-end-primary { border-right-color: var(--app-accent) !important; } +html[data-app-accent] .border-bottom-primary { border-bottom-color: var(--app-accent) !important; } +html[data-app-accent] .border-start-primary { border-left-color: var(--app-accent) !important; } + +/* Focus rings */ +html[data-app-accent] .form-control:focus, +html[data-app-accent] .form-select:focus, +html[data-app-accent] .form-check-input:focus { + border-color: var(--app-accent-border); + box-shadow: 0 0 0 .25rem rgba(var(--app-accent-rgb), .25); +} + +html[data-app-accent] .nav-link:focus-visible { box-shadow: 0 0 0 .25rem rgba(var(--app-accent-rgb), .25); } +html[data-app-accent] .accordion { --cui-accordion-btn-focus-box-shadow: 0 0 0 .25rem rgba(var(--app-accent-rgb), .25); } +html[data-app-accent] .pagination { --cui-pagination-focus-box-shadow: 0 0 0 .25rem rgba(var(--app-accent-rgb), .25); } +html[data-app-accent] .form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--cui-body-bg), 0 0 0 .25rem rgba(var(--app-accent-rgb), .25); } +html[data-app-accent] .form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px var(--cui-body-bg), 0 0 0 .25rem rgba(var(--app-accent-rgb), .25); } + +/* Third-party controls that carry their own blue/indigo */ +html[data-app-accent] .select2-container--default .select2-results__option--highlighted[aria-selected], +html[data-app-accent] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { + background-color: var(--app-accent); + color: #fff; +} + +html[data-app-accent] .select2-container--default.select2-container--focus .select2-selection--multiple, +html[data-app-accent] .select2-container--default.select2-container--open .select2-selection--single, +html[data-app-accent] .select2-container--default.select2-container--open .select2-selection--multiple { + border-color: var(--app-accent-border); +} + +html[data-app-accent] .select2-container--default .select2-selection--multiple .select2-selection__choice { + background-color: var(--app-accent-subtle) !important; + border-color: var(--app-accent-border) !important; + color: var(--cui-body-color); +} + +html[data-app-accent] .page-item.active .page-link, +html[data-app-accent] .dataTables_wrapper .pagination .page-item.active .page-link { + background-color: var(--app-accent); + border-color: var(--app-accent); + color: #fff; +} + +html[data-app-accent] .datepicker table tr td.active, +html[data-app-accent] .datepicker table tr td.active:hover, +html[data-app-accent] .datepicker table tr td.active.active, +html[data-app-accent] .datepicker table tr td span.active, +html[data-app-accent] .datepicker table tr td span.active:hover { + background: var(--app-accent) !important; + background-image: none !important; + border-color: var(--app-accent) !important; + color: #fff !important; + text-shadow: none; +} + +html[data-app-accent] .swal2-styled.swal2-confirm { background-color: var(--app-accent); } +html[data-app-accent] .swal2-styled:focus { box-shadow: 0 0 0 3px rgba(var(--app-accent-rgb), .5); } +html[data-app-accent] .jconfirm .jconfirm-box.jconfirm-type-blue { border-top-color: var(--app-accent); } +html[data-app-accent] .ladda-button[data-style] .ladda-spinner { color: inherit; } + +/* Appearance picker (My profile) */ +.appearance-modes { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: .75rem; +} + +.appearance-mode { + display: flex; + flex-direction: column; + gap: .5rem; + padding: .5rem; + border: 2px solid var(--cui-border-color); + border-radius: .5rem; + background: var(--cui-body-bg); + color: var(--cui-body-color); + cursor: pointer; + text-align: left; +} + +.appearance-mode:hover { border-color: var(--app-accent-border); } + +.appearance-mode.is-selected { + border-color: var(--app-accent); + box-shadow: 0 0 0 .2rem rgba(var(--app-accent-rgb), .2); +} + +.appearance-mode-label { + display: flex; + align-items: center; + gap: .4rem; + font-weight: 600; + font-size: .85rem; +} + +.appearance-preview { + display: flex; + height: 64px; + border-radius: .35rem; + overflow: hidden; + border: 1px solid rgba(0, 0, 0, .12); +} + +.appearance-preview-side { width: 24%; background: #1b2e4a; } +.appearance-preview-main { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 6px; } +.appearance-preview-bar { height: 7px; border-radius: 4px; } +.appearance-preview-bar.is-accent { width: 40%; background: var(--app-accent); } +.appearance-preview--light .appearance-preview-main { background: #f3f4f7; } +.appearance-preview--light .appearance-preview-bar:not(.is-accent) { background: #d9dde4; } +.appearance-preview--dark .appearance-preview-main { background: #212631; } +.appearance-preview--dark .appearance-preview-bar:not(.is-accent) { background: #3a4252; } +.appearance-preview--auto .appearance-preview-main { background: linear-gradient(135deg, #f3f4f7 0 50%, #212631 50% 100%); } +.appearance-preview--auto .appearance-preview-bar:not(.is-accent) { background: #8a93a2; } + +.appearance-accents { + display: flex; + flex-wrap: wrap; + gap: .6rem; +} + +.appearance-accent { + width: 34px; + height: 34px; + border-radius: 50%; + border: 3px solid var(--cui-body-bg); + box-shadow: 0 0 0 1px var(--cui-border-color); + cursor: pointer; + display: inline-flex; + align-items: center; + justify-content: center; + color: #fff; + padding: 0; +} + +.appearance-accent i { visibility: hidden; font-size: .8rem; } +.appearance-accent.is-selected { box-shadow: 0 0 0 2px var(--cui-body-color); } +.appearance-accent.is-selected i { visibility: visible; } +.appearance-accent[data-accent=indigo] { background: #5856d6; } +.appearance-accent[data-accent=teal] { background: #0d7f81; } +.appearance-accent[data-accent=blue] { background: #2563eb; } +.appearance-accent[data-accent=purple] { background: #7c3aed; } +.appearance-accent[data-accent=green] { background: #15803d; } +.appearance-accent[data-accent=orange] { background: #c2410c; } +.appearance-accent[data-accent=rose] { background: #e11d48; } + +@media (max-width: 575.98px) { + .appearance-modes { grid-template-columns: 1fr; } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/beta.css b/src/Presentation/Taskist.Web/wwwroot/css/beta.css new file mode 100644 index 0000000..2d1b6b4 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/beta.css @@ -0,0 +1,62 @@ +.app-beta-chip { + display: inline-block; + padding: 1px 7px; + font-size: 0.62rem; + font-weight: 700; + letter-spacing: 0.08em; + border-radius: 10px; + background: #f9b115; + color: #3a2f00; + vertical-align: middle; +} + +.beta-pill { + display: inline-flex; + align-items: center; + gap: 7px; + max-width: 100%; + padding: 3px 12px; + font-size: 0.78rem; + line-height: 1; + color: #6b5200; + background: #fff6e0; + border: 1px solid #f3e0a8; + border-radius: 999px; + white-space: nowrap; +} + +.beta-pill > i { + color: #c98a00; + font-size: 0.8rem; +} + +.beta-pill__report { + color: #6b5200; + font-weight: 600; + text-decoration: underline; +} + +.beta-pill__report:hover { + color: #4a3800; +} + +.beta-pill__chip { + display: none; + font-weight: 700; + letter-spacing: 0.06em; + font-size: 0.62rem; +} + +@media (max-width: 767.98px) { + .beta-pill__text { + display: none; + } + + .beta-pill__chip { + display: inline; + } + + .beta-pill { + padding: 3px 9px; + } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/backlog-task.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/backlog-task.css new file mode 100644 index 0000000..ab3312d --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/backlog-task.css @@ -0,0 +1,1257 @@ +/* Shared styles for the task-detail AJAX partials (Documents, Comments, History) + and the task form's dropzone. Loaded on Backlog Index, Create and Edit because + these partials are opened from all three. */ + +/* Compact dropzone (task form) */ +#dropzone-container { + border: 1px dashed #007bff; + color: #6c757d; + border-radius: 8px; + min-height: 0; + padding: 10px 14px; + background: #f8fbff; + cursor: pointer; + transition: background 0.15s ease, border-color 0.15s ease; +} + +#dropzone-container:hover { + background: #eef6ff; + border-color: #0069d9; +} + +#dropzone-container .dz-message { + margin: 0; + font-size: 0.85rem; + text-align: center; +} + +#dropzone-container .dz-message i { + color: #007bff; +} + +/* Uploaded file tiles (documents offcanvas and task form) */ +.file-tile { + flex: 0 0 auto; + width: 110px; + text-align: center; + position: relative; +} + +.file-tile-link { + display: block; + text-decoration: none; +} + +.file-thumb { + width: 100px; + height: 80px; + object-fit: cover; + border-radius: 8px; + border: 1px solid #e3eaf2; + background: #f6f8fa; +} + +.file-tile .file-icon { + width: 100px; + height: 80px; + font-size: 2.4rem; +} + +.file-name { + margin-top: 6px; + font-size: 0.76rem; + color: #1b2e4a; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.file-meta { + font-size: 0.68rem; + color: #7b8aa0; +} + +.file-tile-actions { + position: absolute; + top: 4px; + right: 4px; + display: none; + gap: 4px; +} + +.file-tile:hover .file-tile-actions { + display: flex; +} + +.file-action { + width: 22px; + height: 22px; + display: inline-flex; + align-items: center; + justify-content: center; + background: rgba(255, 255, 255, 0.92); + border: 1px solid #e3eaf2; + border-radius: 4px; + color: #5a6b80; + font-size: 0.7rem; + cursor: pointer; + text-decoration: none; +} + +.file-action:hover { + color: #1b2e4a; +} + +.file-action.file-icon-delete:hover { + color: #e74c3c; + border-color: #f3b6b6; +} + +.files-empty { + text-align: center; + color: #7b8aa0; + padding: 24px 12px; +} + +/* In the task form the dropzone already prompts to upload, so the empty + state in the preview zone is redundant. */ +#thumbnail-zone .files-empty { + display: none; +} + +.files-empty i { + font-size: 2rem; + display: block; + margin-bottom: 8px; + opacity: 0.6; +} + +/* Task comments offcanvas (used from the grid and the task form) */ +.offcanvas-body:has(#comments) { + display: flex; + flex-direction: column; + height: 100%; + overflow: hidden; +} + +.offcanvas-body:has(#comments) > .comments-root { + display: flex; + flex-direction: column; + flex: 1 1 auto; + min-height: 0; +} + +#comments.comments-container { + flex: 1 1 auto; + overflow-y: auto; + padding-bottom: 10px; +} + +/* Task activity card (inline comments + history on the task form) */ +.task-activity-card .card-header { + padding: 0 16px; + background: transparent; + border-bottom: 1px solid var(--cui-border-color, #dbdfe6); +} + +.task-activity-card .card-header-tabs { + margin: 0; + gap: 1.25rem; + border-bottom: 0; +} + +.task-activity-card .card-header-tabs .nav-link { + display: inline-flex; + align-items: center; + margin: 0 0 -1px; + padding: .7rem .1rem; + border: 0; + border-bottom: 2px solid transparent; + border-radius: 0; + background: transparent; + color: var(--cui-secondary-color, #6b7785); + font-weight: 500; +} + +.task-activity-card .card-header-tabs .nav-link:hover { + color: var(--cui-body-color, #212631); +} + +.task-activity-card .card-header-tabs .nav-link.active { + color: var(--cui-primary, #5856d6); + border-bottom-color: var(--cui-primary, #5856d6); + background: transparent; +} + +.task-activity-card .activity-count { + margin-left: .4rem; + background-color: var(--cui-secondary-bg, #e7eaee); + color: var(--cui-secondary-color, #6b7785); + font-size: .7rem; + font-weight: 600; +} + +.task-activity-card .nav-link.active .activity-count { + background-color: var(--cui-primary, #5856d6); + color: #fff; +} + +.task-activity-card .activity-pane { + padding: 12px 16px; +} + +.task-activity-card #comments.comments-container { + max-height: 480px; +} + +.task-activity-card .comment-box { + padding: 10px 0 0; + background: transparent; +} + +.task-activity-card #activityHistory { + max-height: 560px; + overflow-y: auto; +} + +.comments-list { + display: flex; + flex-direction: column; + gap: 12px; +} + +.comment-item { + display: flex; + gap: 10px; +} + +.comment-avatar { + flex: 0 0 34px; + width: 34px; + height: 34px; + border-radius: 50%; + background: #1cc7c9; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.72rem; + font-weight: 700; + overflow: hidden; +} + +.comment-body { + flex: 1 1 auto; + background: #f6f8fa; + border: 1px solid #e9eef4; + border-radius: 10px; + padding: 8px 12px; +} + +.comment-meta { + display: flex; + justify-content: space-between; + align-items: baseline; + gap: 8px; + margin-bottom: 2px; +} + +.comment-author { + font-weight: 600; + font-size: 0.85rem; + color: #1b2e4a; +} + +.comment-time { + font-size: 0.72rem; + color: #7b8aa0; + white-space: nowrap; +} + +.comment-text { + font-size: 0.88rem; + color: #33455c; + word-break: break-word; + white-space: pre-wrap; +} + +.comments-empty { + text-align: center; + color: #7b8aa0; + padding: 30px 12px; +} + +.comments-empty i { + font-size: 2rem; + display: block; + margin-bottom: 8px; + opacity: 0.6; +} + +.comment-box { + flex: 0 0 auto; + background: #fff; + padding: 10px; + border-top: 1px solid #ddd; +} + +.comment-input-wrap { + display: flex; + gap: 8px; + align-items: flex-end; +} + +.comment-input-wrap textarea { + resize: none; + max-height: 120px; +} + +.comment-hint { + display: block; + margin-top: 4px; + font-size: 0.72rem; +} + +/* Task history timeline */ +.history-timeline { + padding: 6px 4px; +} + +.history-item { + position: relative; + display: flex; + gap: 12px; + padding-bottom: 16px; +} + +.history-item::before { + content: ""; + position: absolute; + left: 13px; + top: 30px; + bottom: -2px; + width: 2px; + background: #e3eaf2; +} + +.history-item:last-child::before { + display: none; +} + +.history-dot { + flex: 0 0 28px; + width: 28px; + height: 28px; + border-radius: 50%; + background: #1cc7c9; + color: #fff; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.62rem; + font-weight: 700; + z-index: 1; + border: 2px solid #fff; + box-shadow: 0 0 0 1px #cfeef0; + overflow: hidden; +} + +.history-content { + flex: 1 1 auto; + padding-top: 2px; +} + +.history-meta { + display: flex; + align-items: baseline; + gap: 8px; + flex-wrap: wrap; +} + +.history-author { + font-weight: 600; + font-size: 0.85rem; + color: #1b2e4a; +} + +.history-time { + font-size: 0.72rem; + color: #7b8aa0; +} + +.history-text { + font-size: 0.85rem; + color: #33455c; + margin-top: 2px; + word-break: break-word; +} + +.history-text p:last-child { + margin-bottom: 0; +} + +.history-collapsed { + max-height: 110px; + overflow: hidden; + position: relative; +} + +.history-collapsed::after { + content: ""; + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 36px; + background: linear-gradient(rgba(255, 255, 255, 0), #fff); +} + +.history-more, +.history-change-toggle { + font-size: 0.78rem; + text-decoration: none; +} + +.history-change-head { + display: flex; + flex-wrap: wrap; + align-items: baseline; + gap: 6px; +} + +.history-change-action { + font-size: 0.72rem; + padding: 0 6px; + border-radius: 8px; + background: #eaf1f8; + color: #33455c; +} + +.history-change-action--added { background: #e7f6ec; color: #1e7a3c; } +.history-change-action--cleared { background: #fdecec; color: #b42318; } + +.history-change-toggle { + margin-left: auto; +} + +.history-change-body { + margin-top: 6px; + padding: 8px 10px; + border: 1px solid #e3e9f1; + border-radius: 6px; + background: #f8fafc; +} + +.history-change-view { + max-height: 320px; + overflow: auto; +} + +.history-diff { + white-space: pre-wrap; +} + +.history-diff-ins { + background: #dcfce7; + color: #166534; + text-decoration: none; +} + +.history-diff-del { + background: #fee2e2; + color: #991b1b; +} + +/* Avatar image (profile photo or the server-generated initials SVG) */ +.comment-avatar img, +.history-dot img { + width: 100%; + height: 100%; + object-fit: cover; + border-radius: 50%; + display: block; +} + +/* Image lightbox preview */ +.img-lightbox { + display: none; + position: fixed; + inset: 0; + z-index: 100000000; + background: rgba(0, 0, 0, 0.82); + align-items: center; + justify-content: center; +} + +.img-lightbox-img { + max-width: 90vw; + max-height: 86vh; + border-radius: 6px; + box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); +} + +.img-lightbox-close { + position: absolute; + top: 16px; + right: 24px; + color: #fff; + font-size: 2rem; + line-height: 1; + cursor: pointer; + opacity: 0.85; +} + +.img-lightbox-close:hover { + opacity: 1; +} + +.img-lightbox-nav { + position: absolute; + top: 50%; + transform: translateY(-50%); + color: #fff; + font-size: 2.2rem; + cursor: pointer; + opacity: 0.7; + padding: 10px 16px; + user-select: none; +} + +.img-lightbox-nav:hover { + opacity: 1; +} + +.img-lightbox-prev { + left: 12px; +} + +.img-lightbox-next { + right: 12px; +} + +.img-lightbox-caption { + position: absolute; + bottom: 18px; + left: 0; + right: 0; + text-align: center; + color: #e9eef4; + font-size: 0.85rem; +} + +/* ===== Backlog history offcanvas ===== */ +.backlog-history .tab-pane { + max-height: calc(100vh - 108px); + overflow-y: auto; +} + +/* ---- Backlog assignee/tester availability hint ---- */ +.wp-avail { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; } +.wp-avail:empty { margin-top: 0; } + +.wp-avail__chip { + display: inline-flex; + align-items: center; + padding: .2rem .5rem; + font-size: .74rem; + font-weight: 500; + border-radius: 6px; + border: 1px solid transparent; +} + +.wp-avail__ok { background: rgba(46, 184, 92, .10); color: #1f8f53; border-color: rgba(46, 184, 92, .25); } +.wp-avail__wfh { background: rgba(28, 199, 201, .10); color: #0f7c7e; border-color: rgba(28, 199, 201, .25); } +.wp-avail__leave { background: rgba(255, 194, 26, .14); color: #b07b00; border-color: rgba(255, 194, 26, .35); } +.wp-avail__warn { background: rgba(229, 83, 83, .10); color: #b02a37; border-color: rgba(229, 83, 83, .3); } + +/* Floating action cluster for the task form (always reachable) */ +.backlog-fab { + position: fixed; + bottom: 3.25rem; + right: 1.5rem; + z-index: 1030; + display: flex; + align-items: center; + gap: .5rem; + padding: .55rem .7rem; + border: 2px solid transparent; + border-radius: 2rem; + background: linear-gradient(#fff, #fff) padding-box, + linear-gradient(90deg, #1cc7c9 0%, #ffc21a 100%) border-box; + box-shadow: 0 6px 20px rgba(0, 0, 0, .18); +} + +.backlog-fab-hint { + display: inline-flex; + align-items: center; + gap: 2px; + font-size: .7rem; + color: #8a97a8; + padding: 0 .15rem 0 .25rem; + white-space: nowrap; +} + +.backlog-fab-hint kbd { + font-size: .66rem; + padding: 1px 5px; + color: #5b6b7b; + background: #f1f4f8; + border: 1px solid #dbe2ea; + border-radius: 4px; + box-shadow: none; +} + +/* Environment panel (auto-captured desktop diagnostics on bug tasks). + Flat "spec sheet": sections flow across auto-fill columns with no boxes, + so content packs top-to-bottom with no stretched cells or empty gaps. */ +.env-panel { + column-width: 240px; + column-gap: 28px; + padding: 14px 16px; + font-size: 12px; + border: 1px solid #e2e8f0; + border-radius: 8px; + background: #fcfdfe; +} +.env-block { + break-inside: avoid; + -webkit-column-break-inside: avoid; + margin-bottom: 14px; +} +.env-head { + font-size: 10px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: .05em; + color: #94a3b8; + padding-bottom: 3px; + margin-bottom: 5px; + border-bottom: 1px solid #e2e8f0; +} +.env-row { + display: grid; + grid-template-columns: 92px 1fr; + gap: 8px; + padding: 1.5px 0; + line-height: 1.4; +} +.env-key { color: #94a3b8; white-space: nowrap; } +.env-val { color: #1f2937; font-weight: 600; word-break: break-word; overflow-wrap: anywhere; } + +@media (max-width: 480px) { + .env-row { grid-template-columns: 84px 1fr; } +} + +/* Status lifecycle: slim connected-node journey track (one line, low height) */ +.status-track { + display: flex; + align-items: center; + gap: 0; + flex-wrap: nowrap; + overflow-x: auto; + padding: 4px 2px; + margin-bottom: 8px; + scrollbar-width: thin; +} +.status-node { + display: inline-flex; + align-items: center; + gap: 6px; + flex: 0 0 auto; + padding: 2px 4px; + cursor: default; + position: relative; +} +/* connector line between nodes */ +.status-node:not(:last-of-type)::after { + content: ""; + width: 20px; + height: 2px; + margin: 0 6px; + background: #d7dee7; + flex: 0 0 auto; + order: 3; +} +.status-node__dot { + width: 22px; + height: 22px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 10px; + flex: 0 0 auto; + order: 1; +} +.status-node__text { + display: inline-flex; + align-items: baseline; + gap: 5px; + order: 2; + white-space: nowrap; +} +.status-node__name { + font-size: 12px; + font-weight: 600; + color: #334155; + max-width: 120px; + overflow: hidden; + text-overflow: ellipsis; +} +.status-node__dur { + font-size: 10.5px; + font-weight: 700; + color: #94a3b8; + font-variant-numeric: tabular-nums; +} +/* past nodes: compact to just the dot; names appear on hover of the track */ +.status-node:not(.is-current):not(:hover) .status-node__name { display: none; } +.status-node.is-current .status-node__dot { + position: relative; + box-shadow: 0 0 0 2px #fff; +} +/* blinking theme-gradient ring around the current status dot */ +.status-node.is-current .status-node__dot::before { + content: ""; + position: absolute; + inset: -5px; + border-radius: 50%; + padding: 3px; + background: var(--wp-accent-gradient); + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: xor; + mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + mask-composite: exclude; + animation: statusNodePulse 1.6s ease-in-out infinite; + pointer-events: none; +} +.status-node.is-current .status-node__name { color: #0f172a; font-weight: 700; } +@keyframes statusNodePulse { + 0%, 100% { opacity: .35; transform: scale(.94); } + 50% { opacity: 1; transform: scale(1.06); } +} +.status-track__age { + flex: 0 0 auto; + margin-left: 10px; + padding-left: 10px; + border-left: 1px solid #e2e8f0; + font-size: 11.5px; + font-weight: 700; + color: #475569; + white-space: nowrap; +} + +/* Status node tooltip: mini duration card */ +.status-card-tooltip { opacity: 1 !important; } +.status-card-tooltip .tooltip-inner { + max-width: 260px; + padding: 0; + background: #fff; + border: 1px solid #e2e8f0; + border-radius: 8px; + box-shadow: 0 6px 24px rgba(15, 23, 42, 0.18); + overflow: hidden; + text-align: left; +} +.status-card-tooltip .tooltip-arrow::before { border-top-color: #e2e8f0 !important; } + +.stc__head { + padding: 6px 10px; + font-size: 12.5px; + font-weight: 700; + letter-spacing: .01em; +} +.stc__body { padding: 8px 10px; } +.stc__row { + display: flex; + justify-content: space-between; + gap: 12px; + font-size: 11.5px; + padding: 1px 0; +} +.stc__lbl { color: #94a3b8; } +.stc__val { color: #1f2937; font-weight: 600; font-variant-numeric: tabular-nums; } +.stc__dur { + margin-top: 6px; + padding-top: 6px; + border-top: 1px dashed #e2e8f0; + font-size: 12px; + font-weight: 700; + color: #0f766e; +} + +/* Stage-duration chips (below the status track on the task Edit screen) */ +/* Flex strip: track scrolls on the left, metric chips pinned on the right */ +.status-strip { + display: flex; + align-items: center; + gap: 0; + margin-bottom: 8px; +} +.status-strip .status-track { + flex: 1 1 auto; + min-width: 0; + margin-bottom: 0; +} +.stage-chips { + flex: 0 0 auto; + display: inline-flex; + flex-wrap: wrap; + align-items: center; + justify-content: flex-end; + gap: 6px; + margin-left: 12px; + padding-left: 12px; + border-left: 1px solid #dbe3ec; +} +/* On small screens the track already scrolls; drop the chips to avoid crowding */ +@media (max-width: 767.98px) { + .stage-chips { display: none; } +} +.stage-chip { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 1px 8px 1px 6px; + font-size: 11px; + line-height: 1.7; + border-radius: 999px; + background: #eafaf7; + border: 1px solid #b7e6dc; + color: #0f766e; + cursor: default; +} +.stage-chip__icon { font-size: 10px; opacity: .85; } +.stage-chip__name { font-weight: 600; color: #115e59; } +.stage-chip__val { + font-weight: 700; + color: #0f766e; + font-variant-numeric: tabular-nums; +} + +/* Task Edit page header: id + divider + soft owner pill */ +#pageTitle .bl-head-label { font-weight: 600; } +/* Click-to-copy task-id chip */ +#pageTitle .bl-head-id { + display: inline-flex; + align-items: center; + gap: 3px; + margin-left: 8px; + padding: 1px 8px; + font-family: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace; + font-size: .82rem; + font-weight: 700; + line-height: 1.5; + color: #0f766e; + background: #eafaf7; + border: 1px solid #b7e6dc; + border-radius: 6px; + cursor: pointer; + vertical-align: 1px; + transition: background .15s ease, border-color .15s ease, color .15s ease; +} +#pageTitle .bl-head-id:hover { background: #d5f4ec; border-color: #8fd8c8; } +#pageTitle .bl-head-id__hash { font-size: .7rem; opacity: .7; } +#pageTitle .bl-head-id__copy { font-size: .72rem; opacity: .55; margin-left: 2px; } +#pageTitle .bl-head-id:hover .bl-head-id__copy { opacity: .9; } +#pageTitle .bl-head-id.is-copied { + background: #0f766e; + border-color: #0f766e; + color: #fff; +} +#pageTitle .bl-head-id.is-copied .bl-head-id__hash, +#pageTitle .bl-head-id.is-copied .bl-head-id__copy { opacity: .9; } +#pageTitle .bl-head-sep { + display: inline-block; + width: 1px; + height: 15px; + margin: 0 10px; + vertical-align: -2px; + background: #cdd7e3; +} +#pageTitle .bl-head-owner { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 1px 10px 1px 8px; + font-size: .8rem; + font-weight: 600; + border-radius: 999px; + background: #eef4fb; + border: 1px solid #d9e5f2; + color: #33455c; + vertical-align: 1px; +} +#pageTitle .bl-head-owner__icon { font-size: .72rem; color: #6b83a3; } + +/* ===== Similar / duplicate task warning under the Title (create form) ===== */ +.similar-tasks { + margin-top: .5rem; + padding: .55rem .75rem; + border: 1px solid #ffe08a; + background: #fff9e6; + border-radius: 8px; + font-size: .85rem; +} +.similar-tasks--exact { + border-color: #f5a3a3; + background: #fdeaea; +} +.similar-head { color: #7a5b00; font-weight: 600; margin-bottom: .35rem; } +.similar-tasks--exact .similar-head { color: #a12a2a; } +.similar-head .similar-scope-toggle { font-weight: 500; font-size: .8rem; margin-left: .4rem; } +.similar-list { list-style: none; margin: 0; padding: 0; } +.similar-item { padding: .15rem 0; } +.similar-item + .similar-item { border-top: 1px dashed #eadfbf; } +.similar-item--exact a { font-weight: 600; } + +/* GitLab "Code" card on the task */ +.task-code-section + .task-code-section { + margin-top: 12px; + padding-top: 10px; + border-top: 1px solid #eef2f7; +} + +.task-code-heading { + font-size: 0.75rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.03em; + color: #64748b; + margin-bottom: 6px; +} + +.task-code-branch, +.task-code-mr { + padding: 4px 0; +} + +.task-code-branch-name { + font-size: 0.8rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; +} + +.task-code-mr-title { + font-size: 0.84rem; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + min-width: 0; + flex: 1 1 auto; +} + +.task-code-meta { + font-size: 0.75rem; + color: #64748b; + margin-top: 2px; +} + +.task-code-state { + flex: 0 0 auto; + font-size: 0.68rem; + font-weight: 600; + padding: 1px 7px; + border-radius: 8px; + margin-top: 2px; +} + +.task-code-state--open { background: #dbeafe; color: #1d4ed8; } +.task-code-state--merged { background: #ede9fe; color: #6d28d9; } +.task-code-state--closed { background: #fee2e2; color: #b91c1c; } +.task-code-state--draft { background: #f1f5f9; color: #475569; } +.task-code-state--other { background: #f1f5f9; color: #475569; } + +.branch-result-list { + max-height: 260px; + overflow-y: auto; + border: 1px solid #eef2f7; + border-radius: 6px; +} + +/* ---- Root cause & fix tab ---- */ +.rcf-tab { color: #b45309; display: inline-flex; align-items: center; gap: 2px; } +.rcf-tab.active { color: #92400e; } + +.rcf-tab-badge { + display: inline-flex; + align-items: center; + justify-content: center; + min-width: 18px; + height: 18px; + padding: 0 5px; + margin-left: 6px; + border-radius: 9px; + font-size: 0.66rem; + font-weight: 700; + line-height: 1; +} +.rcf-tab-badge:empty { display: none; } +.rcf-tab-badge--done { background: #dcfce7; color: #15803d; } +.rcf-tab-badge--partial { background: #f1f5f9; color: #475569; } +.rcf-tab-badge--alert { background: #dc2626; color: #fff; animation: rcf-pulse 1.6s ease-out infinite; } + +@keyframes rcf-pulse { + 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } + 70% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); } + 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } +} + +.rcf { position: relative; padding: 2px 0 6px; } + +.rcf-step { + position: relative; + display: grid; + grid-template-columns: 34px minmax(0, 1fr); + gap: 12px; + padding-bottom: 18px; + --rcf-accent: #f59e0b; + --rcf-soft: #fffbeb; +} +.rcf-step:last-child { padding-bottom: 0; } +.rcf-step--fix { --rcf-accent: #10b981; --rcf-soft: #ecfdf5; } + +.rcf-step:not(:last-child)::before { + content: ""; + position: absolute; + left: 16px; + top: 34px; + bottom: 0; + width: 2px; + background: linear-gradient(#fcd34d, #6ee7b7); + border-radius: 2px; +} + +.rcf-marker span { + display: flex; + align-items: center; + justify-content: center; + width: 34px; + height: 34px; + border-radius: 50%; + background: #fff; + border: 2px solid var(--rcf-accent); + color: var(--rcf-accent); + font-weight: 700; + font-size: 0.9rem; + box-shadow: 0 0 0 4px var(--rcf-soft); + transition: background .2s, color .2s; +} +.rcf-step--done .rcf-marker span { background: var(--rcf-accent); color: #fff; } + +.rcf-card { + border: 1px solid #e5e7eb; + border-left: 4px solid var(--rcf-accent); + border-radius: 10px; + background: #fff; + padding: 10px 12px 12px; + box-shadow: 0 1px 2px rgba(15, 23, 42, .04); + transition: box-shadow .2s, border-color .2s; +} +.rcf-card:focus-within { box-shadow: 0 4px 14px rgba(15, 23, 42, .08); } +.rcf-step--alert .rcf-card { border-color: #fecaca; border-left-color: #dc2626; background: linear-gradient(#fff7f7, #fff 60px); } +.rcf-step--alert .rcf-marker span { border-color: #dc2626; color: #dc2626; box-shadow: 0 0 0 4px #fee2e2; } + +.rcf-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; } +.rcf-head__text { flex: 1 1 auto; min-width: 0; } +.rcf-title { font-weight: 600; color: #0f172a; font-size: 0.95rem; } +.rcf-title i { color: var(--rcf-accent); } +.rcf-sub { font-size: 0.78rem; color: #64748b; } + +.rcf-req, .rcf-state { + display: inline-flex; + align-items: center; + font-size: 0.72rem; + font-weight: 600; + padding: 3px 9px; + border-radius: 999px; + white-space: nowrap; +} +.rcf-req--later { background: #fef3c7; color: #92400e; } +.rcf-req--now { background: #fee2e2; color: #b91c1c; } +.rcf-state--done { background: #dcfce7; color: #15803d; } +.rcf-state--empty { background: #f1f5f9; color: #64748b; } + +.rcf-flash { animation: rcf-flash 1.1s ease-out; } +@keyframes rcf-flash { + 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .55); } + 100% { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); } +} + +/* ---- Closing checklist (status panel) ---- */ +.closing-checklist { + margin-top: .5rem; + padding: 8px 10px; + border: 1px dashed #cbd5e1; + border-radius: 10px; + background: #f8fafc; +} +.closing-checklist__head { font-size: 0.75rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; } +.closing-checklist__for { text-transform: none; letter-spacing: 0; color: #0f172a; } +.closing-checklist__items { display: flex; flex-wrap: wrap; gap: 6px; } + +.closing-chip { + display: inline-flex; + align-items: center; + gap: 5px; + border: 1px solid transparent; + border-radius: 999px; + padding: 3px 10px 3px 8px; + font-size: 0.78rem; + font-weight: 500; + background: #fff; + cursor: pointer; + transition: transform .12s, box-shadow .12s; +} +.closing-chip:hover { transform: translateY(-1px); box-shadow: 0 2px 6px rgba(15, 23, 42, .08); } +.closing-chip--done { border-color: #bbf7d0; color: #15803d; background: #f0fdf4; } +.closing-chip--missing { border-color: #fecaca; color: #b91c1c; background: #fef2f2; } +.closing-chip--missing .closing-chip__icon { animation: rcf-pulse 1.6s ease-out infinite; border-radius: 50%; } +.closing-chip--pending { border-color: #fde68a; color: #92400e; background: #fffbeb; } +.closing-chip--optional { border-color: #e2e8f0; color: #64748b; } +.closing-chip--unknown { border-color: #e2e8f0; color: #64748b; font-style: italic; } + +/* ---- Code card: closing MR ---- */ +.task-code-mr--closing { + background: linear-gradient(90deg, #f5f3ff, transparent); + border-left: 3px solid #7c3aed; + padding-left: 8px; + border-radius: 4px; +} +.task-code-closing-badge { + flex: 0 0 auto; + font-size: 0.66rem; + font-weight: 700; + padding: 1px 7px; + border-radius: 8px; + margin-top: 2px; + background: #7c3aed; + color: #fff; + white-space: nowrap; +} + +/* ---- Room for the floating action bar so it never covers the last card ---- */ +.backlog-fab-spacer { height: 5.5rem; } + +/* ---- Code card: branch deleted in GitLab, link-source button ---- */ +.task-code-branch--deleted .task-code-branch-name { color: #94a3b8; text-decoration: line-through; text-decoration-color: #cbd5e1; } +.task-code-branch--deleted .fa-code-branch { opacity: .5; } +.task-code-branch--deleted .task-code-meta { color: #94a3b8; } +.task-code-deleted-badge { + flex: 0 0 auto; + font-size: 0.66rem; + font-weight: 600; + padding: 1px 7px; + border-radius: 8px; + background: #f1f5f9; + color: #64748b; + white-space: nowrap; +} +.task-code-link-source { font-size: 0.74rem; text-decoration: none; margin-top: 2px; } +.task-code-link-source code { font-size: 0.72rem; } + +/* ---- Code card: branch rows (wrapped names, ⋯ menu, group badge) ---- */ +.task-code-heading .task-code-add { font-size: .78rem; font-weight: 600; text-transform: none; letter-spacing: 0; text-decoration: none; } +.task-code-branches { display: flex; flex-direction: column; gap: .45rem; } +.task-code-branches .task-code-branch { border: 1px solid #e2e8f0; border-radius: .55rem; padding: .45rem .55rem; background: #fff; } +.task-code-branches .task-code-branch:hover { border-color: #c7d2fe; } +.task-code-branch__top { display: flex; align-items: flex-start; gap: .4rem; } +.task-code-branch__icon { color: #94a3b8; margin-top: .2rem; } +.task-code-branches .task-code-branch-name { + flex: 1 1 auto; + min-width: 0; + color: #1e293b; + background: none; + padding: 0; + font-size: .8rem; + white-space: normal; + overflow: visible; + text-overflow: clip; + word-break: break-all; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} +.task-code-branch__menu { flex: 0 0 auto; } +.task-code-branch__menu > .btn { color: #64748b; } +.task-code-branch__menu > .btn:hover { color: #0f172a; } +.task-code-branch__meta { display: flex; flex-wrap: wrap; gap: .25rem; margin: .2rem 0 0 1.35rem; } +.task-code-branch__meta strong { color: #334155; font-weight: 600; } +.task-code-dot { color: #cbd5e1; } +.task-code-branch__shared { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .3rem 0 0 1.35rem; font-size: .74rem; } +.task-code-group-badge { font-size: .68rem; font-weight: 700; padding: .05rem .45rem; border-radius: .35rem; background: #eef2ff; color: #4338ca; } +.task-code-shared-label { color: #64748b; } +.task-code-task-link { font-weight: 600; text-decoration: none; } +.task-code-branches .task-code-create-mr { margin: .3rem 0 0 1.35rem; font-size: .78rem; text-decoration: none; } +.task-code-empty { display: flex; align-items: flex-start; font-size: .8rem; color: #64748b; background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: .5rem; padding: .5rem .65rem; } +.task-code-empty > i { margin-top: .15rem; color: #94a3b8; } + +/* Code card: make "+ Branch" and "Create merge request" read as buttons */ +.task-code-heading .task-code-add { padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; line-height: 1.4; } +.task-code-branches .task-code-create-mr { + display: inline-flex; + align-items: center; + margin: .4rem 0 0 1.35rem; + padding: .2rem .65rem; + font-size: .76rem; + font-weight: 600; + color: #4338ca; + background: #eef2ff; + border: 1px solid #c7d2fe; + border-radius: 999px; +} +.task-code-branches .task-code-create-mr:hover, +.task-code-branches .task-code-create-mr:focus-visible { color: #fff; background: #4f46e5; border-color: #4f46e5; } + +/* Code card: one clear action per branch — solid primary Create MR; group badge as a neutral tag */ +.task-code-branches .task-code-create-mr { + color: #fff; + background: var(--cui-primary, #4f46e5); + border-color: var(--cui-primary, #4f46e5); + box-shadow: 0 1px 2px rgba(15, 23, 42, .12); +} +.task-code-branches .task-code-create-mr:hover, +.task-code-branches .task-code-create-mr:focus-visible { color: #fff; filter: brightness(.92); box-shadow: 0 3px 8px rgba(15, 23, 42, .18); } +.task-code-group-badge { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; } + +/* Code card: Create MR in GitLab orange (darker GitLab red-orange keeps white text readable) */ +.task-code-branches .task-code-create-mr { background: #e24329; border-color: #e24329; color: #fff; } +.task-code-branches .task-code-create-mr:hover, +.task-code-branches .task-code-create-mr:focus-visible { background: #c93a23; border-color: #c93a23; color: #fff; filter: none; } +.task-code-empty { align-items: flex-start; line-height: 1.45; } +.task-code-empty > i { margin-top: .2em; flex: 0 0 auto; } + +.task-code-repo-badge { + flex: 0 0 auto; + font-size: 0.66rem; + font-weight: 600; + padding: 1px 7px; + border-radius: 8px; + margin-top: 2px; + background: #eef2f7; + color: #475467; + white-space: nowrap; + max-width: 180px; + overflow: hidden; + text-overflow: ellipsis; +} + +.task-issue-link { + padding: 6px 0; + border-bottom: 1px solid #eef2f7; +} + +.task-issue-link:last-child { + border-bottom: 0; +} + +.task-issue-link--off { + opacity: 0.6; +} + +.custom-field-slot--inline { + display: contents; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/backlog.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/backlog.css new file mode 100644 index 0000000..12e0566 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/backlog.css @@ -0,0 +1,543 @@ +/* Backlog filter panel + chips */ + +/* Filter off-canvas drawer */ +.offcanvas.backlog-filter-offcanvas { + --cui-offcanvas-width: min(640px, 100vw); + --bs-offcanvas-width: min(640px, 100vw); + width: min(640px, 100vw) !important; +} + +/* Keep the grid toolbar buttons on a single row (labels collapse to icons on small screens) */ +#gridToolbar { + flex-wrap: nowrap; +} + +.backlog-filter-offcanvas .offcanvas-body { + padding: 0; + overflow: hidden; + display: flex; + flex-direction: column; +} + +.backlog-filter-offcanvas #filter-container { + display: flex; + flex-direction: column; + flex: 1 1 auto; + min-height: 0; +} + +/* Scrollable fields region */ +.backlog-filter-offcanvas .filter-scroll { + flex: 1 1 auto; + overflow-y: auto; + padding: 18px; +} + +/* Action footer pinned at the bottom of the drawer */ +.backlog-filter-offcanvas .filter-actions { + flex: 0 0 auto; + display: flex; + justify-content: flex-end; + gap: 8px; + padding: 12px 18px; + background: #fff; + border-top: 1px solid #e3eaf2; +} + + +/* Filter trigger button */ +.filter-open-btn { + background: #3b4a5a; + color: #fff; + border: none; + font-weight: 600; +} + +.filter-open-btn:hover, +.filter-open-btn:focus { + background: #34424f; + color: #fff; +} + +/* Filter panel header */ +.filter-panel-header { + background: #3b4a5a; + color: #fff; + border: none; + padding: 12px 18px; + cursor: pointer; +} + +.filter-panel-header:hover { + background: #34424f; +} + +.filter-panel-title { + font-weight: 600; + font-size: 0.95rem; + letter-spacing: 0.2px; +} + +.filter-count-badge:empty { + display: none; +} + +.filter-count-badge { + background: #e74c3c; + color: #fff; + border-radius: 10px; + padding: 1px 8px; + font-size: 0.72rem; + margin-left: 6px; + font-weight: 600; +} + +.filter-toggle-icon { + opacity: 0.85; + transition: transform 0.15s ease; +} + +/* Saved-filter band (stands out from the filter fields) */ +.filter-presets { + background: #f4f7fb; + border: 1px solid #e3eaf2; + border-radius: 10px; + padding: 8px 10px; + margin-bottom: 12px; +} + +.filter-presets-title { + font-weight: 600; + font-size: 0.85rem; + color: #3b4a5a; + margin-bottom: 10px; + display: flex; + align-items: center; +} + +.filter-presets-title i { + color: #18b5c4; +} + +/* Active-filter chips */ +.filter-chip { + display: inline-flex; + align-items: center; + background: #eaf1f8; + border: 1px solid #cddcec; + color: #2c3e50; + border-radius: 16px; + padding: 3px 4px 3px 12px; + font-size: 0.8rem; + line-height: 1.5; +} + +.filter-chip-label { + color: #6c7a89; + margin-right: 4px; +} + +.filter-chip-remove { + border: none; + background: transparent; + color: #8b97a7; + width: 18px; + height: 18px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 50%; + margin-left: 7px; + padding: 0; + font-size: 0.7rem; + cursor: pointer; + text-decoration: none; + line-height: 1; +} + +.filter-chip-remove:hover { + background: #f8d2d2; + color: #c0392b; +} + + + +/* Sub-task expand — top-level caret in the Title cell */ +.subtask-toggle { + display: inline-block; + width: 16px; + margin-right: 4px; + color: #64748b; + cursor: pointer; + text-align: center; +} +.subtask-toggle:hover { color: #1cc7c9; } +tr.subtask-open .subtask-toggle { color: #1cc7c9; } + +/* Sub-task tree panel */ +.subtask-panel { + padding: 6px 10px 8px 30px; + background: #f8fafc; + border-left: 3px solid #1cc7c9; +} + +.subtask-row { position: relative; padding-left: 18px; } +/* connector rails */ +.subtask-row::before { + content: ""; + position: absolute; + left: 4px; top: 0; bottom: 0; + border-left: 1px solid #cbd5e1; +} +.subtask-row:last-child::before { bottom: auto; height: 15px; } +.subtask-row > .subtask-main::before { + content: ""; + position: absolute; + left: 4px; top: 15px; + width: 12px; + border-top: 1px solid #cbd5e1; +} + +.subtask-main { + display: flex; + align-items: center; + gap: 8px; + padding: 4px 0; + min-height: 30px; +} + +.subtask-caret { + flex: 0 0 auto; + width: 14px; + color: #64748b; + cursor: pointer; + text-align: center; + font-size: 12px; +} +.subtask-caret:hover { color: #1cc7c9; } +.subtask-caret--leaf { cursor: default; } + +.subtask-type-chip { + flex: 0 0 auto; + width: 20px; height: 20px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 5px; + color: #fff; + font-size: 10px; + font-weight: 700; +} + +.subtask-title { + font-weight: 600; + color: #1f2937; + text-decoration: none; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.subtask-title:hover { text-decoration: underline; } +.subtask-id { color: #94a3b8; font-weight: 700; margin-right: 2px; } + +.subtask-meta { + display: flex; + align-items: center; + gap: 8px; + padding-left: 40px; + margin-top: -2px; +} +.subtask-status { + color: #fff; + font-size: 10.5px; + font-weight: 600; + padding: 1px 8px; + border-radius: 10px; + white-space: nowrap; +} +.subtask-due { font-size: 11px; white-space: nowrap; } +.subtask-due--over { color: #e11d48; } +.subtask-due--today { color: #d97706; } +.subtask-due--future { color: #64748b; } + +.subtask-avatar { + width: 20px; height: 20px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + color: #fff; + font-size: 9.5px; + font-weight: 700; + letter-spacing: .02em; +} + +/* nested (recursive) level */ +.subtask-nested { display: none; margin-left: 14px; } +.subtask-row.open > .subtask-nested { display: block; } +.subtask-nested .subtask-panel { border-left-color: #cbd5e1; padding-left: 22px; } + +.subtask-empty { color: #94a3b8; font-size: 12px; } + +/* wider screens: put meta inline with title instead of wrapped below */ +@media (min-width: 992px) { + .subtask-row { display: flex; align-items: center; } + .subtask-row > .subtask-main { flex: 1 1 auto; min-width: 0; } + .subtask-main .subtask-title { max-width: 46vw; } + .subtask-row > .subtask-meta { flex: 0 0 auto; padding-left: 0; margin-top: 0; } + .subtask-row > .subtask-nested { flex-basis: 100%; } +} + +.backlog-age { + display: inline-flex; + align-items: baseline; + gap: 3px; + padding: 1px 7px; + border-radius: 10px; + font-size: 0.75rem; + font-weight: 600; + white-space: nowrap; + border-left: 3px solid transparent; + background: #f1f5f9; + color: #334155; +} + +.backlog-age-status { + font-weight: 400; + opacity: 0.75; +} + +.backlog-age--blue { border-left-color: blue; } +.backlog-age--orange { border-left-color: orange; background: #fff7ed; } +.backlog-age--pink { border-left-color: pink; background: #fdf2f8; } +.backlog-age--red { border-left-color: red; background: #fef2f2; color: #b91c1c; } + +.backlog-age[data-bs-toggle="tooltip"] { + cursor: default; +} + +.backlog-age-tip { + text-align: left; + line-height: 1.5; +} + +.backlog-age-tooltip .tooltip-inner { + max-width: 360px; +} + +/* Saved filters: single compact row */ +.filter-presets-row { + display: flex; + align-items: center; + gap: 6px; +} + +.filter-presets-icon { + color: #18b5c4; + flex: 0 0 auto; +} + +.filter-presets-row .form-select { + flex: 1 1 auto; + min-width: 0; +} + +.filter-presets-row .btn { + flex: 0 0 auto; + white-space: nowrap; +} + +.filter-presets-save { + margin-top: 6px; +} + +/* Grouped, collapsible filter sections */ +.backlog-filter-offcanvas .filter-scroll { + padding: 14px 16px; +} + +.backlog-filter-offcanvas .filter-scroll .form-label { + font-size: 0.8rem; + margin-bottom: 2px; + color: #475569; +} + +.filter-sections-toolbar { + display: flex; + justify-content: flex-end; + margin-bottom: 4px; +} + +.filter-sections-toggle-all { + font-size: 0.78rem; + text-decoration: none; +} + +.filter-section { + border: 1px solid #e3eaf2; + border-radius: 8px; + margin-bottom: 10px; + background: #fff; +} + +.filter-section--main { + border: 0; + margin-bottom: 6px; +} + +.filter-section-head { + width: 100%; + display: flex; + align-items: center; + gap: 8px; + padding: 8px 12px; + border: 0; + background: #f8fafc; + border-radius: 8px; + font-size: 0.85rem; + font-weight: 600; + color: #33455c; + text-align: left; +} + +.filter-section.is-open .filter-section-head { + border-bottom: 1px solid #e3eaf2; + border-radius: 8px 8px 0 0; +} + +.filter-section-title { + flex: 1 1 auto; +} + +.filter-section-count.has-count { + min-width: 20px; + padding: 0 6px; + border-radius: 10px; + background: #5856d6; + color: #fff; + font-size: 0.72rem; + line-height: 18px; + text-align: center; +} + +.filter-section-chevron { + font-size: 0.75rem; + color: #64748b; + transition: transform 0.15s ease; +} + +.filter-section.is-open .filter-section-chevron { + transform: rotate(180deg); +} + +.filter-section-body { + display: none; + padding: 10px 12px 2px; +} + +.filter-section.is-open .filter-section-body { + display: block; +} + +.filter-section .due-date-type { + flex: 0 0 110px; +} + +.backlog-age-help { + font-size: 0.75rem; + color: #94a3b8; + margin-left: 2px; + cursor: help; +} + +/* Bulk move to Quick Capture: skipped-task summary */ +.bulk-move-skipped { + max-height: 240px; + overflow-y: auto; + padding-left: 18px; + font-size: 0.85rem; + margin-bottom: 0; +} + +.bulk-move-preview-summary { + font-size: 0.88rem; + font-weight: 600; + padding: 6px 10px; + border-radius: 6px; +} + +.bulk-move-preview-summary.is-ok { + background: #ecfdf5; + color: #166534; +} + +.bulk-move-preview-summary.is-none { + background: #fef2f2; + color: #991b1b; +} + +.bulk-move-staying { + font-size: 0.83rem; + color: #1e40af; + background: #eff6ff; + border-radius: 6px; + padding: 6px 10px; +} + +/* ---- Grid selection bar (bulk actions) ---- */ +.grid-selection-bar { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: .5rem .75rem; + margin: .75rem 1rem 0; + padding: .45rem .6rem .45rem .9rem; + border-radius: .65rem; + background: linear-gradient(90deg, #eef2ff, #f5f3ff); + border: 1px solid #c7d2fe; + box-shadow: 0 4px 12px rgba(79, 70, 229, .12); + animation: grid-selection-in .18s ease-out; +} +@keyframes grid-selection-in { + from { opacity: 0; transform: translateY(-6px); } + to { opacity: 1; transform: translateY(0); } +} +.grid-selection-count { font-weight: 600; color: #3730a3; white-space: nowrap; } +.grid-selection-actions { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1 1 auto; } +.grid-selection-btn { + background: #fff; + border: 1px solid #c7d2fe; + color: #3730a3; +} +.grid-selection-btn:hover, .grid-selection-btn:focus { background: #4f46e5; border-color: #4f46e5; color: #fff; } +.grid-selection-clear { color: #64748b; background: transparent; border: 0; margin-left: auto; } +.grid-selection-clear:hover { color: #0f172a; background: rgba(15, 23, 42, .06); } +@media (max-width: 575.98px) { + .grid-selection-bar { margin: .5rem .5rem 0; } + .grid-selection-clear { margin-left: 0; } +} + +/* ---- Grid title icons (branch, closing details, attachments, comments) ---- */ +.dt-title-icons { display: inline-flex; align-items: center; gap: .25rem; margin-left: .4rem; vertical-align: middle; white-space: nowrap; } +.dt-title-icon { + display: inline-flex; + align-items: center; + gap: .15rem; + padding: .05rem .3rem; + border-radius: .35rem; + font-size: .9rem; + line-height: 1.2; + text-decoration: none; + color: #94a3b8; + transition: background .12s, color .12s; +} +.dt-title-icon:hover { background: #f1f5f9; } +.dt-title-icon__count { font-size: .72rem; font-weight: 700; } +.dt-title-icon--branch { color: #6366f1; } +.dt-title-icon--branch:hover { color: #4338ca; background: #eef2ff; } +.dt-title-icon--closing { color: #d97706; } +.dt-title-icon--closing:hover { color: #b45309; background: #fffbeb; } +.dt-title-icon--files { color: #64748b; } +.dt-title-icon--files:hover { color: #15803d; background: #f0fdf4; } +.dt-title-icon--comments { color: #64748b; } +.dt-title-icon--comments:hover { color: #0f172a; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/board.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/board.css new file mode 100644 index 0000000..bd01e1e --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/board.css @@ -0,0 +1,244 @@ +.board-header-project { + min-width: 200px; +} + +/* ===== Timeline ===== */ +.tl-event { + display: flex; + align-items: center; + gap: 4px; + overflow: hidden; + font-size: 0.78rem; + padding: 1px 2px; +} + +.tl-sev { + width: 8px; + height: 8px; + border-radius: 50%; + flex: 0 0 auto; +} + +.tl-title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.tl-assignee { + margin-left: auto; + padding-left: 6px; + opacity: 0.85; + font-size: 0.7rem; + white-space: nowrap; +} + +.fc-event.tl-overdue { + box-shadow: 0 0 0 2px #e55353; +} + +.tl-legend__heat { + display: inline-block; + width: 14px; + height: 14px; + border-radius: 3px; + background: rgba(229, 83, 83, 0.35); + vertical-align: middle; + margin-right: 4px; +} + +/* ===== Timeline — Gantt swimlanes ===== */ +#taskGantt { + overflow-x: auto; +} + +.gantt { + min-width: 760px; + font-size: 0.8rem; +} + +.gantt-axis, +.gantt-row { + display: flex; + align-items: center; +} + +.gantt-axis-label, +.gantt-row-label { + flex: 0 0 200px; + width: 200px; + padding-right: 8px; +} + +.gantt-row-label { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + color: inherit; + text-decoration: none; +} + +.gantt-row-label:hover { + text-decoration: underline; +} + +.gantt-axis-track, +.gantt-track { + position: relative; + flex: 1 1 auto; +} + +.gantt-axis-track { + height: 24px; + border-bottom: 1px solid #e3eaf2; +} + +.gantt-tick { + position: absolute; + top: 4px; + transform: translateX(-50%); + color: #8a93a2; + font-size: 0.68rem; + white-space: nowrap; +} + +.gantt-today, +.gantt-today-line { + position: absolute; + top: 0; + bottom: 0; + width: 2px; + background: #e55353; +} + +.gantt-group { + font-weight: 600; + margin-top: 8px; + padding: 4px 0; + color: #384b66; + border-top: 1px solid #eef2f7; +} + +.gantt-row { + height: 26px; +} + +.gantt-track { + height: 26px; + border-bottom: 1px dashed #f0f3f8; +} + +.gantt-bar { + position: absolute; + top: 5px; + height: 16px; + border-radius: 4px; + min-width: 3px; + display: block; +} + +.gantt-bar--overdue { + box-shadow: 0 0 0 2px #e55353; +} + +.board-wrap { + display: flex; + gap: 0.75rem; + overflow-x: auto; + overflow-y: hidden; + padding-bottom: 0.5rem; + align-items: stretch; + height: 70vh; /* fallback; refined to available area by board.js */ +} + +.board-column { + flex: 0 0 280px; + max-width: 280px; + background: #f4f6fa; + border: 1px solid #e3eaf2; + border-radius: 8px; + display: flex; + flex-direction: column; + min-height: 0; +} + +.board-column__header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.5rem 0.6rem; + font-weight: 600; + background: #fff; + border-top: 3px solid #6f78e6; + border-radius: 8px 8px 0 0; + flex-shrink: 0; +} + +.board-column__count { + font-size: 0.72rem; + background: #eef1f8; + border-radius: 999px; + padding: 0 0.45rem; + color: #5a6b85; +} + +.board-column__cards { + padding: 0.5rem; + flex: 1 1 auto; + min-height: 0; + overflow-y: auto; +} + +.board-card { + background: #fff; + border: 1px solid #e3eaf2; + border-radius: 6px; + padding: 0.5rem 0.6rem; + margin-bottom: 0.5rem; + cursor: pointer; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); +} + +.board-card:hover { + border-color: #c7d2e6; +} + +.board-card__title { + font-weight: 600; + font-size: 0.85rem; + margin-bottom: 0.35rem; +} + +.board-card__meta { + margin-bottom: 0.35rem; +} + +.board-card__meta .board-badge { + font-size: 0.68rem; + margin-right: 0.25rem; + font-weight: 600; +} + +.board-card__footer { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 0.72rem; + color: #768192; +} + +.board-card__assignee { + font-weight: 500; +} + +.board-card--placeholder { + border: 1px dashed #b5c2da; + border-radius: 6px; + background: #eef2f8; + height: 48px; + margin-bottom: 0.5rem; +} + +.board-card.ui-sortable-helper { + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/configuration.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/configuration.css new file mode 100644 index 0000000..240a510 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/configuration.css @@ -0,0 +1,28 @@ +/* ===== Configuration tabs as pills ===== */ +.config-tabs { gap: .4rem; row-gap: .4rem; } +.config-tabs .nav-link { + color: #4b5b73; + background: #f2f5f9; + border: 1px solid #e2e8f0; + border-radius: 999px; + padding: .35rem .9rem; + font-weight: 600; + white-space: nowrap; +} +.config-tabs .nav-link:hover { background: #e7edf5; color: #2a3b52; } +.config-tabs .nav-link.active { + color: #fff; + background: #1cc7c9; + border-color: #1cc7c9; +} + +/* Mobile: too many tabs to stack — keep one row and scroll sideways. */ +@media (max-width: 767.98px) { + .config-tabs { + flex-wrap: nowrap; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + padding-bottom: .25rem; + } + .config-tabs .nav-item { flex: 0 0 auto; } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/dashboard.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/dashboard.css new file mode 100644 index 0000000..a5e10fe --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/dashboard.css @@ -0,0 +1,378 @@ +/* ============================================================================ + Dashboard — modern, theme-matched (teal/amber) widgets. + Tokens (--wp-teal, --wp-amber, --wp-accent-gradient) come from site.css. + ============================================================================ */ + +/* Hide the page-title sub-header bar — dashboard only (this file loads only here). */ +.header.header-sticky > .container-fluid:last-child { + display: none; +} + +/* ---- Filter bar ---- */ +.wp-filterbar { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + gap: .75rem; + padding: .65rem .85rem; + margin-bottom: 1rem; + background: #fff; + border: 1px solid #e6e9ef; + border-radius: 12px; + box-shadow: 0 1px 2px rgba(16, 24, 40, .04); +} + +.wp-filterbar__title { + display: flex; + align-items: center; + font-weight: 600; + font-size: 1rem; + color: #2a3b52; +} + +.wp-filterbar__title i { color: var(--wp-teal); } + +.wp-filterbar__filters { + display: flex; + flex-wrap: wrap; + gap: .5rem; +} + +.wp-filterbar__field { + position: relative; + display: inline-flex; + align-items: center; +} + +.wp-filterbar__field i { + position: absolute; + left: .65rem; + color: var(--wp-teal); + pointer-events: none; + font-size: .8rem; +} + +.wp-filterbar__field .form-select { + padding-left: 2rem; + min-width: 170px; + border-radius: 8px; +} + +.wp-filterbar__actions { + display: flex; + flex-wrap: wrap; + gap: .4rem; +} + +/* ---- Stat tiles (KPI) ---- */ +.wp-stat-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: .75rem; +} + +.wp-stat { + display: flex; + flex-direction: row; + align-items: center; + gap: .55rem; + padding: .5rem .75rem; + background: #fff; + border: 1px solid #e6e9ef; + border-left: 3px solid var(--wp-teal); + border-radius: 10px; + text-decoration: none; + color: #2a3b52; + box-shadow: 0 1px 2px rgba(16, 24, 40, .04); + transition: transform .12s ease, box-shadow .12s ease; +} + +.wp-stat:hover { + transform: translateY(-2px); + box-shadow: 0 6px 18px rgba(16, 24, 40, .10); + color: #2a3b52; +} + +.wp-stat__icon { + width: 34px; + height: 34px; + flex: 0 0 auto; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 9px; + font-size: .9rem; + background: rgba(28, 199, 201, .12); + color: var(--wp-teal); +} + +.wp-stat__value { + font-size: 1.35rem; + font-weight: 700; + line-height: 1; + flex: 0 0 auto; +} + +.wp-stat__label { + flex: 1 1 auto; + min-width: 0; + font-size: .72rem; + text-transform: uppercase; + letter-spacing: .02em; + line-height: 1.15; + color: #7b8aa0; +} + +.wp-stat--teal { border-left-color: var(--wp-teal); } +.wp-stat--amber { border-left-color: var(--wp-amber); } +.wp-stat--amber .wp-stat__icon { background: rgba(255, 194, 26, .16); color: #c47f00; } +.wp-stat--red { border-left-color: #e55353; } +.wp-stat--red .wp-stat__icon { background: rgba(229, 83, 83, .12); color: #e55353; } +.wp-stat--green { border-left-color: #2eb85c; } +.wp-stat--green .wp-stat__icon { background: rgba(46, 184, 92, .12); color: #2eb85c; } + +.wp-stat--wide { + flex-direction: row; + align-items: center; + gap: .85rem; +} + +.wp-stat--wide .wp-stat__icon { + width: 46px; + height: 46px; + font-size: 1.2rem; + margin-bottom: 0; +} + +.wp-stat--wide .wp-stat__label { align-self: center; } + +/* ---- Auto-fit grid for chart / list cards ---- */ +.wp-dash-grid { + display: flex; + flex-wrap: wrap; + gap: 1rem; + align-items: flex-start; + margin-bottom: 1rem; +} + +.wp-dash-grid > * { + flex: 1 1 360px; + min-width: 0; +} + +/* ---- Cards (charts / lists) ---- */ +.wp-card { + background: #fff; + border: 1px solid #e6e9ef; + border-radius: 12px; + box-shadow: 0 1px 2px rgba(16, 24, 40, .04); + overflow: hidden; +} + +.wp-card__head { + padding: .55rem .9rem .1rem; + font-size: .82rem; + font-weight: 600; + color: #2a3b52; +} + +.wp-card__head i { color: var(--wp-teal); } + +.wp-card__body { + padding: .35rem .9rem .9rem; +} + +/* ---- Due-tasks mini tiles ---- */ +.wp-due { + display: flex; + flex-wrap: wrap; + gap: .6rem; +} + +.wp-due__tile { + flex: 1 1 120px; + display: flex; + flex-direction: row; + align-items: center; + gap: .45rem; + padding: .45rem .65rem; + border-radius: 10px; + background: #f6f8fa; + border: 1px solid #eceff3; +} + +.wp-due__icon { font-size: .85rem; flex: 0 0 auto; } +.wp-due__value { font-size: 1.15rem; font-weight: 700; color: #2a3b52; line-height: 1; flex: 0 0 auto; } +.wp-due__label { flex: 1 1 auto; min-width: 0; font-size: .66rem; text-transform: uppercase; color: #7b8aa0; line-height: 1.1; } + +.wp-due--today { background: rgba(46, 184, 92, .10); border-color: rgba(46, 184, 92, .25); } +.wp-due--today .wp-due__icon { color: #2eb85c; } +.wp-due--soon { background: rgba(255, 194, 26, .12); border-color: rgba(255, 194, 26, .3); } +.wp-due--soon .wp-due__icon { color: #c47f00; } +.wp-due--week { background: rgba(28, 199, 201, .10); border-color: rgba(28, 199, 201, .25); } +.wp-due--week .wp-due__icon { color: var(--wp-teal); } +.wp-due--overdue { background: rgba(229, 83, 83, .10); border-color: rgba(229, 83, 83, .25); } +.wp-due--overdue .wp-due__icon { color: #e55353; } +.wp-due--none .wp-due__icon { color: #7b8aa0; } + +/* ---- Release progress list ---- */ +.wp-release { + display: flex; + flex-direction: column; + gap: .8rem; +} + +.wp-release__top { + display: flex; + justify-content: space-between; + align-items: baseline; + font-size: .85rem; + margin-bottom: .3rem; +} + +.wp-release__name { font-weight: 600; color: #2a3b52; } +.wp-release__count { color: #7b8aa0; font-size: .78rem; } + +.wp-release__bar { + height: 8px; + border-radius: 6px; + background: #eef1f6; + overflow: hidden; +} + +.wp-release__bar > span { + display: block; + height: 100%; + border-radius: 6px; + background: var(--wp-accent-gradient); +} + +/* ---- Upcoming time off (compact list) ---- */ +.wp-upcoming__items { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + gap: .5rem; +} + +.wp-upcoming__chip { + display: flex; + align-items: center; + gap: .6rem; + min-width: 0; + padding: .4rem .6rem; + background: #f6f8fa; + border: 1px solid #eceff3; + border-left: 3px solid #ccd2dc; + border-radius: 9px; +} + +.wp-upcoming__icon { + flex: 0 0 auto; + width: 26px; + height: 26px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 50%; + color: #fff; + font-size: .72rem; +} + +.wp-upcoming__text { + display: flex; + flex-direction: column; + gap: .1rem; + flex: 1 1 auto; + min-width: 0; + line-height: 1.25; +} + +.wp-upcoming__title { + font-weight: 600; + color: #2a3b52; + font-size: .85rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.wp-upcoming__meta { + font-size: .72rem; + color: #7b8aa0; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.wp-upcoming__when { + flex: 0 0 auto; + font-size: .72rem; + color: #5b6b82; + padding: .15rem .45rem; + background: #eef1f6; + border-radius: 6px; + white-space: nowrap; +} + +.wp-upcoming__empty { color: #9aa6b8; padding: .3rem; } + +.wp-upcoming__more { + display: inline-block; + margin-top: .55rem; + font-size: .8rem; + font-weight: 600; + color: #0e7c93; + text-decoration: none; +} + +.wp-upcoming__more:hover { text-decoration: underline; } + +/* ---- Chart container ---- */ +.wp-card .chart-container { + position: relative; + width: 100%; + height: 280px; +} + +/* ---- Empty widgets (): keep the card height so the grid doesn't jump ---- */ +.wp-empty--widget { + min-height: 240px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +#dashboardContent.wp-loading { + opacity: .5; + pointer-events: none; + transition: opacity .15s ease; +} + +/* ---- My code widget ---- */ +.my-code__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: .75rem 1.25rem; } +.my-code__col { min-width: 0; } +.my-code__label { display: flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #768192; padding: .25rem 0 .35rem; border-bottom: 1px solid #eef1f5; margin-bottom: .25rem; } +.my-code__count { background: #eef1f5; color: #4f5d73; border-radius: 1rem; padding: 0 .45rem; font-size: .7rem; } +.my-code__more { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 500; text-decoration: none; } +.my-code__row { display: flex; align-items: center; gap: .55rem; padding: .4rem 0; border-bottom: 1px dashed #eef1f5; } +.my-code__row:last-child { border-bottom: 0; } +.my-code__main { flex: 1 1 auto; min-width: 0; } +.my-code__title { display: block; font-size: .85rem; font-weight: 500; color: #2a3b52; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; } +a.my-code__title:hover { color: #1f5fa8; text-decoration: underline; } +.my-code__title--branch { font-family: SFMono-Regular, Consolas, monospace; font-size: .8rem; } +.my-code__meta { display: flex; flex-wrap: wrap; gap: 0 .6rem; font-size: .74rem; color: #8a93a2; } +.my-code__meta a { color: inherit; } +.my-code__status { flex: 0 0 .6rem; width: .6rem; height: .6rem; border-radius: 50%; background: #c4c9d0; } +.my-code__status--mergeable { background: #2eb85c; } +.my-code__status--conflict, .my-code__status--needs-rebase { background: #e55353; } +.my-code__status--draft { background: #9da5b1; } +.my-code__status--blocked { background: #f9b115; } +.my-code__status--checking, .my-code__status--not-checked { background: #3399ff; } +.my-code__status--branch { background: transparent; border: 2px solid #9da5b1; } +.my-code__task { flex: 0 0 auto; font-size: .72rem; font-weight: 600; padding: .05rem .4rem; border-radius: .3rem; background: #eaf1f8; color: #1f5fa8; text-decoration: none; } +.my-code__create-mr { flex: 0 0 auto; background: #e24329; border-color: #e24329; color: #fff; font-size: .74rem; padding: .15rem .5rem; } +.my-code__create-mr:hover, .my-code__create-mr:focus { background: #c93a23; border-color: #c93a23; color: #fff; } +.my-code__none { font-size: .8rem; color: #8a93a2; padding: .35rem 0; } +.my-code__foot { font-size: .7rem; color: #a0a8b4; text-align: right; margin-top: .35rem; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/employeerole/access.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/employeerole/access.css new file mode 100644 index 0000000..f9e954a --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/employeerole/access.css @@ -0,0 +1,33 @@ +.ea-group { + border: 1px solid #e3eaf2; + border-radius: 6px; + margin-bottom: 0.75rem; + overflow: hidden; +} + +.ea-group__header { + display: flex; + align-items: center; + justify-content: space-between; + background: #e7e9fb; + padding: 0.4rem 0.6rem; + font-weight: 600; + font-size: 0.85rem; + color: #3a3f8f; + border-bottom: 1px solid #d4d8f3; + border-left: 3px solid #6f78e6; +} + +.ea-group__count { + font-size: 0.72rem; + font-weight: 600; + color: #6b7a90; + background: #fff; + border: 1px solid #d8e0ea; + border-radius: 999px; + padding: 0 0.45rem; +} + +.ea-group__body { + padding: 0.55rem 0.6rem; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/employeerole/permission.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/employeerole/permission.css new file mode 100644 index 0000000..4fff9ca --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/employeerole/permission.css @@ -0,0 +1,122 @@ +#pdOffCanvas.pd-offcanvas--wide { + width: 760px; + max-width: 96vw; +} + +.offcanvas-body:has(#permGroups) { + display: flex; + flex-direction: column; + overflow: hidden; +} + +.offcanvas-body:has(#permGroups) > form { + display: flex; + flex-direction: column; + flex: 1 1 auto; + min-height: 0; +} + +.perm-groups { + flex: 1 1 auto; + overflow-y: auto; + min-height: 0; + padding-right: .25rem; +} + +.perm-toolbar { + display: flex; + flex-wrap: wrap; + gap: .5rem; + align-items: center; + justify-content: space-between; + padding: .25rem 0 .75rem; + background: #fff; + border-bottom: 1px solid #e3e8ef; + margin-bottom: .75rem; +} + +.perm-search { + position: relative; + flex: 1 1 240px; + min-width: 200px; +} + +.perm-search__icon { + position: absolute; + left: .65rem; + top: 50%; + transform: translateY(-50%); + color: #9aa5b1; + pointer-events: none; +} + +.perm-search .form-control { + padding-left: 2rem; +} + +.perm-toolbar__actions { + display: flex; + gap: .35rem; + flex-wrap: wrap; +} + +.perm-group { + border: 1px solid #e3e8ef; + border-radius: .5rem; + margin-bottom: .6rem; + overflow: hidden; +} + +.perm-group__head { + display: flex; + align-items: center; + gap: .5rem; + padding: .5rem .75rem; + background: #f4f7fb; +} + +.perm-group__all-wrap { + margin: 0; +} + +.perm-group__toggle { + flex: 1 1 auto; + display: flex; + align-items: center; + justify-content: space-between; + text-decoration: none; + color: #2c3e50; + font-weight: 600; + cursor: pointer; +} + +.perm-group__toggle:hover { + color: #0d6efd; +} + +.perm-chevron { + margin-right: .5rem; + transition: transform .2s ease; +} + +.perm-group__toggle.collapsed .perm-chevron { + transform: rotate(-90deg); +} + +.perm-group__badge { + background: #e3e8ef; + color: #44525f; + font-weight: 600; +} + +.perm-group__body { + padding: .65rem .75rem .25rem; +} + +.perm-footer { + flex: 0 0 auto; + background: #fff; + border-top: 1px solid #e3e8ef; + padding-top: .75rem; + margin-top: .5rem; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/filter-panel.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/filter-panel.css new file mode 100644 index 0000000..a7d2e95 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/filter-panel.css @@ -0,0 +1,55 @@ +/* ============================================================================ + Shared collapsible filter panel — one mechanism across all list/report pages. + Markup: a "Filters" toggle button (.wp-filter-btn) with a count badge + (.wp-filter-count) toggles a Bootstrap .collapse card, collapsed by default. + Legacy .tlr-filter-* classes are aliased so existing pages keep working. + ============================================================================ */ + +/* Toggle button: distinct when the panel is open, and when filters are applied */ +.wp-filter-btn[aria-expanded="true"], +.tlr-filter-btn[aria-expanded="true"] { + background: #eef2ff; + border-color: #6f78e6; + color: #4c56c0; +} +.wp-filter-btn--active, +.tlr-filter-btn--active { + background: #eaf1ff; + border-color: #3b82f6; + color: #1d4ed8; + font-weight: 600; +} +.wp-filter-btn--active[aria-expanded="true"], +.tlr-filter-btn--active[aria-expanded="true"] { + background: #dbe6ff; +} + +.wp-filter-count, +.tlr-filter-count { + display: inline-block; + margin-left: 6px; + min-width: 16px; + padding: 0 5px; + border-radius: 999px; + background: #3b82f6; + color: #fff; + font-size: .66rem; + font-weight: 700; + line-height: 16px; + text-align: center; +} + +/* Consistent select2 sizing inside any shared filter panel */ +.wp-filter .select2-container { width: 100% !important; } +.wp-filter .form-control, +.wp-filter .select2-container--default .select2-selection--multiple { min-height: 31px; } +.wp-filter .select2-container--default .select2-selection--multiple { + max-height: 76px; + overflow-y: auto; +} + +.wp-filter .select2-container--default.select2-summary .select2-selection--multiple { + min-height: 31px; + max-height: 31px; + font-size: .875rem; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/log.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/log.css new file mode 100644 index 0000000..ed6ce2b --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/log.css @@ -0,0 +1,94 @@ +.log-day { + font-weight: 600; + color: #384b66; + margin: 0.75rem 0 0.35rem; +} + +.log-timeline { + list-style: none; + margin: 0 0 0.5rem; + padding: 0; +} + +.log-item { + display: flex; + gap: 0.6rem; + padding: 0.35rem 0; + align-items: flex-start; + border-bottom: 1px solid #f2f5f9; +} + +.log-dot { + flex: 0 0 auto; + width: 26px; + height: 26px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 50%; + font-size: 0.72rem; +} + +.log-body { + flex: 1 1 auto; +} + +.log-meta { + font-size: 0.72rem; + color: #8a93a2; +} + +.log-diff pre { + background: #f6f8fb; + border: 1px solid #e3eaf2; + border-radius: 4px; + padding: 0.4rem; + font-size: 0.72rem; + white-space: pre-wrap; + margin: 0.2rem 0 0.4rem; + max-height: 200px; + overflow: auto; +} + +/* ===== Audit detail (friendly diff) ===== */ +.audit-detail-head { + padding-bottom: 8px; + border-bottom: 1px solid #eef1f5; + margin-bottom: 8px; +} + +.audit-detail-action { + display: inline-block; + padding: 1px 8px; + border-radius: 10px; + background: #eef2f8; + color: #51607a; + font-size: 0.7rem; + font-weight: 700; +} + +.audit-diff td, .audit-diff th { + font-size: 0.82rem; +} + +.audit-diff-field { + font-weight: 600; + color: #2b3a4f; + white-space: nowrap; +} + +.audit-diff-old { color: #a23b3b; } +.audit-diff-new { color: #2e7d46; } +.audit-diff--changed { background: #fffaf0; } + +.audit-raw pre { + background: #f6f8fb; + border: 1px solid #e3eaf2; + border-radius: 4px; + padding: 0.4rem; + font-size: 0.72rem; + white-space: pre-wrap; + max-height: 160px; + overflow: auto; + margin: 0.2rem 0 0.4rem; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/login.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/login.css new file mode 100644 index 0000000..533cd8a --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/login.css @@ -0,0 +1,401 @@ +/* Split-screen login */ + +.login-card { + display: flex; + width: 100%; + max-width: 940px; + min-height: 560px; + margin: 0 auto; + background: #fff; + border-radius: 20px; + box-shadow: 0 24px 70px rgba(16, 42, 67, 0.20); + overflow: hidden; + animation: loginIn .5s ease; +} + +@keyframes loginIn { + from { opacity: 0; transform: translateY(14px); } + to { opacity: 1; transform: none; } +} + +/* Brand panel */ +.login-brand { + position: relative; + flex: 1 1 47%; + flex-direction: column; + justify-content: space-between; + padding: 44px 46px; + color: #fff; + background: linear-gradient(135deg, #2fc6d6 0%, #1ba8bd 55%, #1690a6 100%); + overflow: hidden; +} + +.login-brand-content { + position: relative; + z-index: 2; +} + +.login-eyebrow { + position: relative; + z-index: 2; + font-size: 0.72rem; + font-weight: 600; + letter-spacing: 0.18em; + text-transform: uppercase; + opacity: 0.85; +} + +.login-brand-footer { + position: relative; + z-index: 2; + display: flex; + align-items: center; + justify-content: space-between; + gap: 14px; + font-size: 0.8rem; + opacity: 0.88; + border-top: 1px solid rgba(255, 255, 255, 0.18); + padding-top: 16px; +} + +.login-brand-footer a { + color: #ffd27a; + text-decoration: none; +} + +.login-brand-footer a:hover { + text-decoration: underline; +} + +.login-brand-version { + opacity: 0.7; + white-space: nowrap; +} + +.login-beta-chip { + display: inline-block; + margin-left: 6px; + padding: 1px 7px; + font-size: 0.6rem; + font-weight: 700; + letter-spacing: 0.08em; + border-radius: 10px; + background: #ffd27a; + color: #3a2f00; + opacity: 1; +} + +.login-form-logo { + margin-bottom: 24px; +} + +.login-form-logo img { + height: 48px; +} + +.login-brand-title { + font-size: 1.95rem; + font-weight: 700; + line-height: 1.2; + margin-bottom: 10px; +} + +.login-brand-tagline { + font-size: 1rem; + opacity: 0.9; + margin-bottom: 30px; +} + +.login-features { + list-style: none; + padding: 0; + margin: 0; +} + +.login-features li { + display: flex; + align-items: center; + gap: 13px; + padding: 9px 0; + font-size: 0.95rem; + opacity: 0.96; +} + +.login-features li i { + flex: 0 0 36px; + width: 36px; + height: 36px; + display: inline-flex; + align-items: center; + justify-content: center; + background: rgba(255, 255, 255, 0.18); + border-radius: 10px; + color: #ffd27a; +} + +.login-brand-blob { + position: absolute; + border-radius: 50%; + z-index: 1; +} + +.login-brand-blob-1 { + width: 240px; + height: 240px; + right: -70px; + top: -70px; + background: radial-gradient(circle, rgba(245, 166, 35, 0.38), transparent 70%); +} + +.login-brand-blob-2 { + width: 280px; + height: 280px; + left: -90px; + bottom: -100px; + background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 70%); +} + +/* Form panel */ +.login-form { + flex: 1 1 53%; + display: flex; + align-items: center; + justify-content: center; + padding: 40px 46px; +} + +.login-form-inner { + width: 100%; + max-width: 360px; +} + +.login-form-header h2 { + font-weight: 600; + color: #3a4a5b; + margin-bottom: 4px; +} + +.login-form-header p { + color: #7a8699; + font-size: 0.9rem; + margin-bottom: 26px; +} + +.login-form .form-label { + font-weight: 600; + font-size: 0.85rem; + color: #44505f; +} + +.login-input { + position: relative; +} + +.login-input-icon { + position: absolute; + left: 15px; + top: 50%; + transform: translateY(-50%); + color: #9aa6b8; + font-size: 0.9rem; + pointer-events: none; +} + +.login-input .form-control { + height: 47px; + padding-left: 42px; + border-radius: 11px; + border-color: #e2e7ee; + background: #f7f9fc; +} + +.login-input .form-control:focus { + border-color: #18b5c4; + background: #fff; + box-shadow: 0 0 0 0.2rem rgba(24, 181, 196, 0.18); +} + +.login-toggle { + position: absolute; + right: 6px; + top: 50%; + transform: translateY(-50%); + border: none; + background: transparent; + color: #9aa6b8; + padding: 6px 11px; + cursor: pointer; +} + +.login-toggle:hover { + color: #18b5c4; +} + +.login-caps { + display: none; + align-items: center; + gap: 6px; + color: #d9822b; + font-size: 0.8rem; + margin-top: 6px; +} + +.login-form-row { + display: flex; + justify-content: space-between; + align-items: center; + margin: 8px 0 22px; +} + +.login-forgot { + font-size: 0.85rem; + color: #6c757d; + text-decoration: none; +} + +.login-forgot:hover { + color: #0e7c93; + text-decoration: underline; +} + +/* Standard Bootstrap btn-primary look (consistent with the rest of the app) — full width only */ +.login-submit { + width: 100%; + height: 42px; + font-weight: 600; +} + +.login-error:not(:empty) { + background: #fde8e8; + color: #b42318; + border-radius: 9px; + padding: 10px 14px; + font-size: 0.85rem; + margin-bottom: 18px; +} + +/* ===== Professional polish: brand-aligned palette + calm backdrop ===== */ + +/* Calm, brand-tinted background with a mild dot texture (overrides login-bg.png) */ +.bg-login { + background-color: #e7edf4 !important; + background-image: + radial-gradient(rgba(13, 110, 130, 0.14) 1.6px, transparent 1.8px), + radial-gradient(1100px 560px at 18% 12%, rgba(24, 181, 196, 0.10), transparent 60%), + radial-gradient(900px 520px at 100% 100%, rgba(14, 124, 147, 0.08), transparent 60%), + linear-gradient(135deg, #eef2f7 0%, #e3e9f1 100%) !important; + background-size: 20px 20px, auto, auto, auto !important; + background-repeat: repeat, no-repeat, no-repeat, no-repeat !important; + background-attachment: fixed !important; +} + +/* Sign-in button uses the brand teal, not the global purple */ +.login-submit.btn-primary, +.login-submit.btn-primary:focus { + background: linear-gradient(135deg, #18b5c4 0%, #0e7c93 100%); + border: none; + box-shadow: 0 6px 16px rgba(14, 124, 147, 0.28); +} + +.login-submit.btn-primary:hover, +.login-submit.btn-primary:active { + background: linear-gradient(135deg, #15a6b4 0%, #0c6e83 100%); + box-shadow: 0 8px 20px rgba(14, 124, 147, 0.34); +} + +.login-submit.btn-primary:focus-visible { + outline: none; + box-shadow: 0 0 0 0.2rem rgba(24, 181, 196, 0.4); +} + +/* Remember-me + accents in brand teal (not purple) */ +.login-form .form-check-input:checked { + background-color: #0e7c93; + border-color: #0e7c93; +} + +.login-form .form-check-input:focus { + border-color: #18b5c4; + box-shadow: 0 0 0 0.2rem rgba(24, 181, 196, 0.22); +} + +/* Footer note under the form */ +.login-copy { + margin: 22px 0 0; + text-align: center; + font-size: 0.78rem; + color: #9aa6b8; +} + +/* Single sign-on button, "or" divider and the administrator sign-in link */ +.login-sso { + margin-bottom: 4px; +} + +.login-sso-button { + width: 100%; + height: 42px; + font-weight: 600; +} + +.login-divider { + display: flex; + align-items: center; + gap: 12px; + margin: 18px 0; + font-size: 0.8rem; + color: #9aa6b8; + text-transform: uppercase; + letter-spacing: 0.04em; +} + +.login-divider::before, +.login-divider::after { + content: ""; + flex: 1; + border-top: 1px solid #dfe5ec; +} + +.login-local-link { + margin: 18px 0 0; + text-align: center; + font-size: 0.85rem; +} + +.login-local-link a { + color: #6c757d; + text-decoration: none; +} + +.login-local-link a:hover { + color: #0e7c93; + text-decoration: underline; +} + +/* Two-factor step: single-column card and a wide, spaced code field */ +.login-card--narrow { + max-width: 460px; + min-height: auto; +} + +.login-card--narrow .login-form { + flex: 1; +} + +.login-code-input { + font-size: 1.25rem; + letter-spacing: 0.25em; + font-variant-numeric: tabular-nums; +} + +/* Responsive: single column, brand panel hidden (handled by d-none/d-lg-flex) */ +@media (max-width: 991.98px) { + .login-card { + max-width: 430px; + min-height: auto; + } + + .login-form { + padding: 36px 30px; + } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/profile.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/profile.css new file mode 100644 index 0000000..975b1f2 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/profile.css @@ -0,0 +1,158 @@ +/* ============================================================================ + My Profile page — avatar + photo upload. + ============================================================================ */ +.profile-photo { + position: relative; + display: inline-block; +} + +.profile-photo img { + width: 130px; + height: 130px; + border-radius: 50%; + object-fit: cover; + border: 3px solid #fff; + box-shadow: 0 2px 10px rgba(16, 24, 40, .14); + background: #f4f7fb; +} + +.profile-photo__edit { + position: absolute; + bottom: 4px; + right: 4px; + width: 34px; + height: 34px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: var(--wp-teal); + color: #fff; + border: 2px solid #fff; + cursor: pointer; + transition: filter .12s ease; +} + +.profile-photo__edit:hover { filter: brightness(1.08); } + +/* ===== Photo crop / zoom modal ===== */ +.crop-stage { + width: 100%; + height: 340px; + background: #1f2430; + border-radius: 8px; + overflow: hidden; +} +/* Cropper replaces this img with its own canvas; constrain for layout. */ +.crop-stage > img { max-width: 100%; display: block; } + +.crop-controls { + display: flex; + align-items: center; + gap: 8px; + margin-top: 12px; +} +.crop-controls .crop-zoom { flex: 1 1 auto; } + +/* Round the crop preview so users see the final circular avatar shape. */ +#photoCropModal .cropper-view-box, +#photoCropModal .cropper-face { border-radius: 50%; } + +/* ===== Settings-style layout: identity + section list on the left, one section on the right ===== */ +.profile-side { + position: sticky; + top: 1rem; +} + +.profile-identity .profile-photo img { + width: 104px; + height: 104px; +} + +.profile-nav { + display: flex; + flex-direction: column; + gap: 2px; + padding: .5rem; + border-top: 1px solid var(--cui-border-color); +} + +.profile-nav__link { + display: flex; + align-items: center; + gap: .6rem; + padding: .55rem .75rem; + border-radius: .375rem; + color: var(--cui-body-color); + text-decoration: none; + font-size: .9rem; +} + +.profile-nav__link > i { + width: 1.1rem; + text-align: center; + color: var(--cui-secondary-color); +} + +.profile-nav__link:hover { + background: var(--cui-tertiary-bg); + color: var(--cui-body-color); +} + +.profile-nav__link.is-active { + background: var(--app-accent-subtle, var(--cui-primary-bg-subtle)); + color: var(--app-accent-text, var(--cui-primary)); + font-weight: 600; +} + +.profile-nav__link.is-active > i { color: inherit; } + +.profile-nav__dirty { + display: none; + width: 8px; + height: 8px; + border-radius: 50%; + background: var(--wp-amber); + margin-left: auto; +} + +.profile-nav__link.has-changes .profile-nav__dirty { display: inline-block; } + +.profile-section { display: none; } +.profile-section.is-active { display: block; } + +@media (max-width: 991.98px) { + .profile-side { position: static; } + + .profile-identity { + display: grid; + grid-template-columns: auto 1fr; + column-gap: 1rem; + align-items: center; + text-align: left !important; + } + + .profile-identity .profile-photo { grid-row: span 3; } + .profile-identity .profile-photo img { width: 72px; height: 72px; } + .profile-identity .profile-photo__edit { width: 28px; height: 28px; bottom: 0; right: 0; } + .profile-identity h5 { margin-top: 0 !important; } + .profile-identity .mt-2 { margin-top: .25rem !important; } + + .profile-nav { + flex-direction: row; + overflow-x: auto; + scrollbar-width: none; + } + + .profile-nav::-webkit-scrollbar { display: none; } + .profile-nav__link { flex: 0 0 auto; white-space: nowrap; } +} + +/* Two-factor setup dialog. The QR image carries its own white quiet zone, so it stays scannable in dark mode. */ +.twofactor-setup__steps { padding-left: 1.25rem; margin: 0; } +.twofactor-setup__steps > li { margin-bottom: 1.25rem; } +.twofactor-setup__qr { display: block; border-radius: .5rem; image-rendering: pixelated; } +.twofactor-setup__key { display: inline-block; font-size: .95rem; letter-spacing: .05em; word-break: break-all; } +.twofactor-setup__code { max-width: 10rem; font-size: 1.15rem; letter-spacing: .2em; } +.twofactor-codes { columns: 2; list-style: none; padding: 0; margin: 1rem 0; font-family: var(--cui-font-monospace, monospace); font-size: 1rem; } +.twofactor-codes li { padding: .15rem 0; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/release-plan.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/release-plan.css new file mode 100644 index 0000000..9611726 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/release-plan.css @@ -0,0 +1,168 @@ +.release-projects { + cursor: default; +} + +.release-projects-tooltip .tooltip-inner { + max-width: 320px; +} + +.release-projects-tip { + text-align: left; + line-height: 1.5; +} + +.release-projects-tip strong { + display: block; + margin-bottom: 2px; +} + +.release-progress-toggle { + text-decoration: none; + font-size: 0.75rem; +} + +.release-progress-breakdown { + padding: 6px 12px; + max-width: 560px; +} + +.release-progress-row { + display: flex; + align-items: center; + gap: 10px; + padding: 3px 0; + font-size: 0.82rem; +} + +.release-progress-name { + flex: 0 0 180px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.release-progress-bar { + flex: 1 1 auto; + height: 8px; +} + +.release-progress-count { + flex: 0 0 auto; + color: #64748b; + white-space: nowrap; +} + +#pdOffCanvas:has(.release-mismatch) { + --bs-offcanvas-width: min(720px, 100vw); +} + +.release-mismatch-intro { + font-size: 0.82rem; + color: #64748b; + margin-bottom: 14px; +} + +.release-mismatch-group { + border: 1px solid #e3e9f1; + border-left: 3px solid #f59e0b; + border-radius: 8px; + padding: 12px 14px; + margin-bottom: 12px; + background: #fff; +} + +.release-mismatch-head { + display: grid; + gap: 4px; + margin-bottom: 10px; +} + +.release-mismatch-title { + font-size: 0.95rem; + word-break: break-word; +} + +.release-mismatch-meta { + font-size: 0.78rem; + color: #64748b; +} + +.release-mismatch-meta span { + color: #33455c; +} + +.release-mismatch-summary { + font-size: 0.85rem; +} + +.release-mismatch-actions { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 8px; +} + +.release-mismatch-toggle { + font-size: 0.8rem; + text-decoration: none; +} + +.release-mismatch-tasks { + margin-top: 10px; + border-top: 1px solid #eef2f7; + padding-top: 6px; + max-height: 320px; + overflow-y: auto; +} + +.release-mismatch-task { + display: flex; + align-items: center; + gap: 8px; + padding: 5px 4px; + border-radius: 4px; + font-size: 0.83rem; + cursor: pointer; + margin: 0; +} + +.release-mismatch-task:hover { + background: #f8fafc; +} + +.release-mismatch-task .form-check-input { + margin: 0; + flex: 0 0 auto; +} + +.release-mismatch-id { + flex: 0 0 auto; + min-width: 48px; +} + +.release-mismatch-task-title { + flex: 1 1 auto; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.release-mismatch-status { + flex: 0 0 auto; + font-size: 0.75rem; + color: #64748b; + background: #f1f5f9; + border-radius: 8px; + padding: 1px 8px; +} + +.release-version.is-auto .release-version-auto { + color: var(--cui-primary); + background: var(--cui-primary-bg-subtle); + border-color: var(--cui-primary-border-subtle); +} + +.release-version-hint code { + font-size: 0.75rem; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/report.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/report.css new file mode 100644 index 0000000..35e54b6 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/report.css @@ -0,0 +1,48 @@ +/* Analytics report charts */ +.report-chart { + position: relative; + height: 300px; +} + +.report-card-body { + min-height: 320px; +} + +/* Stage-duration drill-down: proportional bar ranking */ +.stage-rank { display: flex; flex-direction: column; gap: 12px; } +.stage-rank-row { display: flex; flex-direction: column; gap: 3px; } +.stage-rank-head { display: flex; align-items: baseline; gap: 8px; } +.stage-rank-id { flex: 0 0 auto; font-weight: 600; font-size: .82rem; text-decoration: none; } +.stage-rank-title { + flex: 1 1 auto; + min-width: 0; + font-size: .88rem; + color: #33455c; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.stage-rank-val { + flex: 0 0 auto; + font-weight: 700; + font-size: .82rem; + color: #1b2e4a; + font-variant-numeric: tabular-nums; +} +.stage-rank-bar-track { + height: 8px; + background: #eef2f7; + border-radius: 999px; + overflow: hidden; +} +.stage-rank-bar { + height: 100%; + border-radius: 999px; + transition: width .4s ease; + min-width: 4px; +} +.stage-rank-bar.is-fast { background: #22c55e; } +.stage-rank-bar.is-normal { background: #84cc16; } +.stage-rank-bar.is-slow { background: #f59e0b; } +.stage-rank-bar.is-critical { background: #ef4444; } +.stage-rank-meta { font-size: .72rem; color: #7b8aa0; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/resource-load.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/resource-load.css new file mode 100644 index 0000000..253e6c0 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/resource-load.css @@ -0,0 +1,92 @@ +.rl-filters .form-label { + font-size: .78rem; + font-weight: 600; + color: #5b6b7c; + margin-bottom: .15rem; +} + +.rl-filters > [class*="col-"] { + min-width: 0; + position: relative; +} + +.rl-filters .select2-container { + max-width: 100%; +} + +.rl-filters .select2-container--open .select2-dropdown { + max-width: 100%; +} + +.rl-summary .rl-stat { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: .65rem .5rem; + border-radius: .5rem; + border: 1px solid #e3e8ef; + background: #fff; +} + +.rl-stat__value { + font-size: 1.5rem; + font-weight: 700; + line-height: 1; +} + +.rl-stat__label { + font-size: .72rem; + text-transform: uppercase; + letter-spacing: .04em; + color: #6c7a89; + margin-top: .25rem; +} + +.rl-stat--free { border-top: 3px solid #2eb85c; } +.rl-stat--light { border-top: 3px solid #3399ff; } +.rl-stat--balanced { border-top: 3px solid #f9b115; } +.rl-stat--overloaded { border-top: 3px solid #e55353; } +.rl-stat--unavailable { border-top: 3px solid #8a93a2; } + +.rl-chart { + position: relative; + height: 420px; +} + +.rl-collapse-toggle { + cursor: pointer; + user-select: none; +} + +.rl-collapse-toggle .rl-chevron { + transition: transform .2s ease; +} + +.rl-collapse-toggle.collapsed .rl-chevron { + transform: rotate(-90deg); +} + +.rl-filter-header { + background: #eef4fb; + color: #2b4a73; + border-bottom: 1px solid #dbe7f4; +} + +.rl-filter-header:hover { + background: #e6eef9; +} + +.rl-band { + display: inline-block; + padding: .15rem .5rem; + border-radius: 1rem; + font-size: .72rem; + font-weight: 600; + color: #fff; +} + +.rl-band--free { background: #2eb85c; } +.rl-band--light { background: #3399ff; } +.rl-band--balanced { background: #f9b115; color: #3a2f00; } +.rl-band--overloaded { background: #e55353; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/review.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/review.css new file mode 100644 index 0000000..9260549 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/review.css @@ -0,0 +1,342 @@ +/* ---- Reviews page ---- */ +.review-connect-banner { + display: flex; + align-items: center; + gap: .9rem; + padding: .8rem 1rem; + margin-bottom: 1rem; + border-radius: .75rem; + background: linear-gradient(110deg, #fff7ed, #fef3c7); + border: 1px solid #fde68a; + color: #78350f; +} +.review-connect-banner > i { font-size: 1.8rem; color: #e24329; } +.review-connect-banner--compact { padding: .5rem .75rem; margin-bottom: .75rem; } +.review-connect-banner--compact > i { font-size: 1.3rem; } + +.review-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; } +@media (max-width: 767.98px) { .review-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } } +.review-tile { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: .15rem; + padding: .8rem 1rem; + border-radius: .75rem; + border: 1px solid #e2e8f0; + background: #fff; + text-align: left; + cursor: pointer; + transition: transform .12s, box-shadow .12s, border-color .12s; + border-left: 4px solid var(--tile, #64748b); +} +.review-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, .08); } +.review-tile.is-active { border-color: var(--tile); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tile) 20%, transparent); } +.review-tile__count { font-size: 1.6rem; font-weight: 700; line-height: 1; color: var(--tile); } +.review-tile__label { font-size: .8rem; color: #475569; font-weight: 600; } +.review-tile--waiting { --tile: #6366f1; } +.review-tile--ready { --tile: #16a34a; } +.review-tile--conflict { --tile: #dc2626; } +.review-tile--stale { --tile: #d97706; } + +.review-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; } +.review-toolbar .review-filter { width: auto; max-width: 200px; } +.review-toolbar .review-search { width: 220px; } +.review-tile-filter { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; padding: .2rem .5rem; border-radius: 999px; background: #eef2ff; color: #3730a3; } +.review-tile-filter .btn-close { font-size: .55rem; } + +.review-loading { padding: 1.5rem; color: #64748b; text-align: center; } +.review-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; font-weight: 600; background: #f8fafc; } +.review-row { cursor: pointer; } +.review-row:focus { outline: 2px solid #a5b4fc; outline-offset: -2px; } +.review-cell-title { max-width: 420px; } +.review-title { display: flex; align-items: center; gap: .4rem; min-width: 0; } +.review-iid { font-weight: 700; color: #4f46e5; white-space: nowrap; } +.review-title__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: #0f172a; } +.review-sub { font-size: .74rem; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.review-task-chip { display: inline-block; font-size: .74rem; font-weight: 600; padding: .05rem .4rem; margin: 0 .2rem .2rem 0; border-radius: .35rem; background: #eef2ff; color: #4338ca; text-decoration: none; } +.review-task-chip:hover { background: #4f46e5; color: #fff; } +.review-task-more { font-size: .72rem; color: #64748b; } +.review-tag { font-size: .66rem; font-weight: 700; padding: .05rem .4rem; border-radius: .35rem; white-space: nowrap; } +.review-tag--own { background: #f1f5f9; color: #475569; } +.review-tag--unassigned { background: #fff7ed; color: #c2410c; } + +.review-status { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; } +.review-status--mergeable { background: #dcfce7; color: #15803d; } +.review-status--conflict { background: #fee2e2; color: #b91c1c; } +.review-status--needs-rebase { background: #ffedd5; color: #c2410c; } +.review-status--draft { background: #f1f5f9; color: #475569; } +.review-status--checking { background: #e0f2fe; color: #0369a1; } +.review-status--blocked { background: #fef3c7; color: #92400e; } +.review-status--other { background: #f1f5f9; color: #64748b; } + +/* ---- Review drawer ---- */ +.review-drawer { text-align: left; } +.review-head { padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid #e2e8f0; } +.review-head__top { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; } +.review-head__state { font-size: .72rem; text-transform: uppercase; color: #64748b; font-weight: 600; } +.review-head__title { margin: 0 0 .35rem; font-weight: 600; color: #0f172a; } +.review-head__meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem; color: #475569; } +.review-branches code { font-size: .76rem; background: #f1f5f9; padding: .05rem .35rem; border-radius: .3rem; } +.review-head__row { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-top: .6rem; } +.review-head__tasks { flex: 1 1 360px; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; } +.review-head__approvals { flex: 0 1 auto; display: flex; align-items: center; gap: .4rem; } +.review-head__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: #94a3b8; font-weight: 700; margin-right: .1rem; } +.review-task-card { display: inline-flex; flex-direction: column; max-width: 260px; padding: .3rem .55rem; border: 1px solid #c7d2fe; border-radius: .5rem; background: #f8faff; text-decoration: none; line-height: 1.2; } +.review-task-card:hover { border-color: #6366f1; background: #eef2ff; } +.review-task-card__id { font-size: .72rem; font-weight: 700; color: #4f46e5; } +.review-task-card__title { font-size: .78rem; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.review-task-card__status { font-size: .68rem; color: #64748b; } +.review-approved { font-size: .8rem; color: #15803d; font-weight: 600; } + +.review-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .4rem; } +.review-merge-wrap { display: inline-block; } +.review-merge-reason { font-size: .78rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: .45rem; padding: .3rem .55rem; margin-bottom: .6rem; } + +.review-tabs { margin-top: .5rem; } +.review-tab-content { padding-top: .75rem; max-height: 60vh; overflow-y: auto; } +.review-description { white-space: pre-wrap; font-size: .88rem; color: #1e293b; overflow-wrap: anywhere; } +.review-commits { list-style: none; padding: 0; margin: 0; } +.review-commits li { display: flex; flex-wrap: wrap; gap: .25rem .6rem; padding: .4rem 0; border-bottom: 1px solid #f1f5f9; font-size: .84rem; } +.review-commits__title { flex: 1 1 auto; color: #0f172a; } +.review-commits__meta { font-size: .74rem; color: #64748b; } +.review-notes { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; } +.review-note { border: 1px solid #e2e8f0; border-radius: .55rem; padding: .5rem .7rem; background: #fff; } +.review-note__head { font-size: .78rem; margin-bottom: .2rem; } +.review-note__body { white-space: pre-wrap; font-size: .85rem; overflow-wrap: anywhere; } +.review-comment-box { border-top: 1px dashed #e2e8f0; padding-top: .6rem; } + +/* ---- Diff ---- */ +.review-diff-summary { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; font-size: .82rem; color: #475569; margin-bottom: .6rem; } +.review-diff-add { color: #15803d; font-weight: 700; } +.review-diff-del { color: #b91c1c; font-weight: 700; } +.review-file { border: 1px solid #e2e8f0; border-radius: .55rem; margin-bottom: .6rem; overflow: hidden; background: #fff; } +.review-file__head { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; background: #f8fafc; cursor: pointer; font-size: .82rem; list-style: none; } +.review-file__head::-webkit-details-marker { display: none; } +.review-file__head::before { content: "\25B8"; color: #94a3b8; transition: transform .12s; } +.review-file[open] > .review-file__head::before { transform: rotate(90deg); } +.review-file__path { font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; } +.review-file__stats { white-space: nowrap; font-size: .76rem; } +.review-file__badge { font-size: .64rem; font-weight: 700; padding: .05rem .4rem; border-radius: .3rem; text-transform: uppercase; } +.review-file__badge--new { background: #dcfce7; color: #15803d; } +.review-file__badge--deleted { background: #fee2e2; color: #b91c1c; } +.review-file__badge--renamed { background: #e0f2fe; color: #0369a1; } +.review-file__empty { padding: .6rem .8rem; font-size: .8rem; color: #64748b; } +.review-diff-wrap { overflow-x: auto; } +.review-diff { width: 100%; border-collapse: collapse; font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .76rem; } +.review-diff td { padding: 0 .5rem; vertical-align: top; } +.review-diff__num { width: 1%; min-width: 3rem; text-align: right; color: #94a3b8; user-select: none; border-right: 1px solid #f1f5f9; white-space: nowrap; } +.review-diff__code { white-space: pre; color: #1e293b; } +.review-diff__sign { display: inline-block; width: 1rem; color: #94a3b8; user-select: none; } +.review-diff__line--added { background: #ecfdf5; } +.review-diff__line--added .review-diff__sign { color: #15803d; } +.review-diff__line--removed { background: #fef2f2; } +.review-diff__line--removed .review-diff__sign { color: #b91c1c; } +.review-diff__hunk td { background: #f1f5f9; color: #6366f1; padding: .15rem .5rem; } +.review-diff__note td { color: #94a3b8; font-style: italic; } + +/* ---- Queue: layout refresh ---- */ +.review-table-wrap { max-height: calc(100vh - 320px); min-height: 220px; overflow: auto; } +.review-table thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 #e2e8f0; padding: .5rem .65rem; } +.review-table td { padding: .45rem .65rem; border-color: #f1f5f9; } +.review-table tbody .review-row:hover { background: #f8faff; } +.review-cell-title { max-width: none; width: 52%; } +.review-title { gap: .45rem; } +.review-title__text { font-weight: 600; } +.review-title__more { font-size: .7rem; font-weight: 700; color: #6366f1; background: #eef2ff; border-radius: .35rem; padding: 0 .35rem; } +.review-sub { display: flex; align-items: center; gap: .35rem; margin-top: .15rem; } +.review-sub__branch { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 60%; } +.review-sub__branch strong { color: #334155; font-weight: 600; } +.review-sub__sep { color: #cbd5e1; } +.review-single-project .review-sub__project { display: none; } + +.review-task-chip--bug { background: #fee2e2; color: #b91c1c; } +.review-task-chip--bug:hover { background: #dc2626; color: #fff; } +.review-task-chip--cr { background: #e0f2fe; color: #0369a1; } +.review-task-chip--cr:hover { background: #0284c7; color: #fff; } +.review-task-chip--todo { background: #f1f5f9; color: #475569; } +.review-task-chip--todo:hover { background: #475569; color: #fff; } +.review-muted { color: #94a3b8; font-size: .78rem; } + +.review-avatars { display: inline-flex; } +.review-avatar { + width: 26px; + height: 26px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: .66rem; + font-weight: 700; + color: #fff; + background: linear-gradient(135deg, #6366f1, #8b5cf6); + border: 2px solid #fff; + margin-left: -6px; +} +.review-avatar:first-child { margin-left: 0; } + +.review-status--not-checked { background: transparent; color: #94a3b8; border: 1px dashed #cbd5e1; font-weight: 600; } +.review-status--checking { background: #f0f9ff; color: #0369a1; } + +.review-age { display: inline-block; min-width: 2.6rem; text-align: center; font-size: .74rem; font-weight: 700; padding: .1rem .45rem; border-radius: .4rem; } +.review-age--fresh { color: #475569; background: transparent; } +.review-age--aging { color: #92400e; background: #fef3c7; } +.review-age--old { color: #9f1239; background: #ffe4e6; } + +.review-col-actions { width: 1%; white-space: nowrap; } +.review-row-actions { display: flex; gap: .3rem; justify-content: flex-end; opacity: 0; transition: opacity .12s; } +.review-row:hover .review-row-actions, +.review-row:focus-within .review-row-actions { opacity: 1; } +@media (hover: none) { .review-row-actions { opacity: 1; } } + +.review-chip-toggle { border: 1px dashed #cbd5e1; color: #475569; background: #fff; border-radius: 999px; } +.review-chip-toggle:hover { border-color: #94a3b8; } +.review-chip-toggle.is-active { border-style: solid; border-color: #c2410c; background: #fff7ed; color: #c2410c; } +.review-clear-filters { text-decoration: none; } +.review-sort { width: auto; } +.review-group-toggle.active { background: #4f46e5; border-color: #4f46e5; color: #fff; } + +.review-group td { background: #f8fafc; padding: .35rem .65rem; border-top: 1px solid #e2e8f0; } +.review-group__toggle { color: #334155; font-size: .82rem; display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; } +.review-group__toggle .fa-chevron-down, .review-group__toggle .fa-chevron-right { color: #94a3b8; font-size: .7rem; } +.review-group__count { margin-left: .6rem; font-size: .74rem; color: #64748b; font-weight: 500; } +.review-row.is-collapsed { display: none; } + +/* ---- Drawer: two-column layout ---- */ +.review-head { display: flex; flex-direction: column; gap: .5rem; } +.review-head__title { font-size: 1.15rem; } +.review-head__mrtitle { font-size: .78rem; color: #64748b; } +.review-head .review-actions { margin-bottom: 0; } + +.review-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 1rem; align-items: start; } +@media (max-width: 991.98px) { + .review-layout { grid-template-columns: minmax(0, 1fr); } + .review-side { order: -1; } +} +.review-main { min-width: 0; } +.review-tab-content { max-height: 64vh; } + +.review-side { display: flex; flex-direction: column; gap: .75rem; position: sticky; top: 0; } +.review-side__block, .review-ready { border: 1px solid #e2e8f0; border-radius: .7rem; padding: .7rem .8rem; background: #fff; } +.review-side__title { display: flex; align-items: center; gap: .35rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 700; margin-bottom: .5rem; } +.review-side__meta { font-size: .8rem; color: #475569; display: flex; flex-direction: column; gap: .3rem; } + +.review-ready { border-width: 1px 1px 1px 4px; } +.review-ready--ok { border-left-color: #16a34a; background: linear-gradient(#f0fdf4, #fff 70px); } +.review-ready--conflict { border-left-color: #dc2626; background: linear-gradient(#fef2f2, #fff 70px); } +.review-ready--wait { border-left-color: #d97706; } +.review-ready--closed { border-left-color: #94a3b8; } + +.review-checks { list-style: none; padding: 0; margin: 0 0 .6rem; display: flex; flex-direction: column; gap: .3rem; } +.review-checks li { display: flex; align-items: flex-start; gap: .45rem; font-size: .82rem; color: #334155; line-height: 1.3; } +.review-checks li > i { margin-top: .12rem; } +.review-checks .is-ok > i { color: #16a34a; } +.review-checks .is-bad { color: #991b1b; font-weight: 600; } +.review-checks .is-bad > i { color: #dc2626; } +.review-checks .is-warn { color: #92400e; } +.review-checks .is-warn > i { color: #d97706; } +.review-checks .is-info > i { color: #cbd5e1; } + +.review-conflict { border: 1px solid #fecaca; background: #fff; border-radius: .55rem; padding: .6rem .7rem; margin-bottom: .6rem; color: #7f1d1d; } +.review-commands { background: #0f172a; color: #e2e8f0; border-radius: .45rem; padding: .55rem .7rem; font-size: .74rem; margin-bottom: .5rem; white-space: pre; overflow-x: auto; } +.review-merge { border-top: 1px dashed #e2e8f0; padding-top: .6rem; } +.review-merge .btn-primary:disabled { opacity: .55; } + +.review-side-task { display: flex; flex-direction: column; padding: .4rem .55rem; border: 1px solid #e2e8f0; border-left: 4px solid #94a3b8; border-radius: .45rem; margin-bottom: .4rem; text-decoration: none; line-height: 1.25; } +.review-side-task:hover { background: #f8faff; } +.review-side-task--bug { border-left-color: #dc2626; } +.review-side-task--cr { border-left-color: #0284c7; } +.review-side-task--todo { border-left-color: #64748b; } +.review-side-task__id { font-size: .72rem; font-weight: 700; color: #4f46e5; } +.review-side-task__title { font-size: .82rem; color: #0f172a; } +.review-side-task__meta { font-size: .7rem; color: #64748b; } + +.review-branch-row { display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; min-width: 0; } +.review-branch-row__label { font-size: .7rem; color: #94a3b8; width: 3.6rem; flex: 0 0 auto; } +.review-branch-row code { font-size: .74rem; background: #f1f5f9; padding: .05rem .35rem; border-radius: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } + +.review-section-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #94a3b8; font-weight: 700; margin-bottom: .35rem; } +.review-rich { white-space: normal; } +.review-rich img { max-width: 100%; height: auto; } + +/* ---- Changes: file list beside the diff ---- */ +.review-changes-layout.has-nav { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: .75rem; align-items: start; } +@media (max-width: 767.98px) { .review-changes-layout.has-nav { grid-template-columns: minmax(0, 1fr); } .review-file-nav { display: none; } } +.review-file-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; max-height: 58vh; overflow-y: auto; } +.review-file-nav__item { display: flex; flex-direction: column; align-items: flex-start; border: 0; background: none; text-align: left; padding: .3rem .45rem; border-radius: .35rem; font-size: .76rem; } +.review-file-nav__item:hover, .review-file-nav__item.is-active { background: #eef2ff; } +.review-file-nav__name { color: #0f172a; font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; } +.review-file-nav__stats { font-size: .68rem; } +.review-files { min-width: 0; } + +/* ---- Branch cleanup panel ---- */ +.branch-cleanup__group { margin-bottom: 1rem; } +.branch-cleanup__group-head { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .85rem; color: #2a3b52; padding: .4rem .5rem; background: #f4f7fb; border-radius: .4rem; cursor: pointer; margin: 0; } +.branch-cleanup__group-head i { color: #768192; } +.branch-cleanup__count { margin-left: auto; font-size: .72rem; background: #e4e9f0; color: #4f5d73; border-radius: 1rem; padding: 0 .5rem; } +.branch-cleanup__hint { font-size: .75rem; color: #8a93a2; padding: .25rem .5rem .35rem; } +.branch-cleanup__row { display: flex; align-items: flex-start; gap: .55rem; padding: .45rem .5rem; border-bottom: 1px solid #eef1f5; cursor: pointer; margin: 0; } +.branch-cleanup__row:hover { background: #fafbfd; } +.branch-cleanup__row .form-check-input, .branch-cleanup__group-head .form-check-input { width: 1.1em; height: 1.1em; margin-top: .15em; flex: 0 0 auto; } +.branch-cleanup__main { flex: 1 1 auto; min-width: 0; } +.branch-cleanup__name { display: block; font-size: .8rem; color: #2a3b52; word-break: break-all; } +.branch-cleanup__meta { display: flex; flex-wrap: wrap; gap: 0 .6rem; font-size: .73rem; color: #8a93a2; } +.branch-cleanup__open { flex: 0 0 auto; color: #8a93a2; font-size: .8rem; } +.branch-cleanup__open:hover { color: #1f5fa8; } +.branch-cleanup__foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: .75rem; padding: .6rem 0; background: #fff; border-top: 1px solid #e4e9f0; } +.branch-cleanup__empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2rem 1rem; color: #8a93a2; font-size: .85rem; } +.branch-cleanup__empty i { font-size: 1.6rem; color: #2eb85c; } +.branch-cleanup__loading { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 2.5rem 1rem; color: #768192; font-size: .85rem; } +.review-conflict__actions { display: flex; gap: .4rem; } +.review-conflict__actions .btn { flex: 1 1 0; min-width: 0; padding: .25rem .45rem; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +@media (min-width: 992px) { + #reviewDrawer .review-side { max-height: 68vh; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; padding-right: 2px; } +} + +/* ---- Grouped queue ---- */ +.review-grouped .review-table-wrap { min-height: 0; } +.review-group { cursor: pointer; } +.review-group:hover td { background: #eef2ff; } +.review-group:focus { outline: 2px solid #a5b4fc; outline-offset: -2px; } +.review-group__chevron { width: .8rem; color: #94a3b8; font-size: .7rem; transition: transform .12s; } +.review-group__folder { color: #64748b; } +.review-group__chip { font-size: .7rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; background: #e2e8f0; color: #475569; white-space: nowrap; } +.review-group__chip--open { margin-left: .25rem; } +.review-group__chip--ready { background: #dcfce7; color: #15803d; } +.review-group__chip--conflict { background: #fee2e2; color: #b91c1c; } +.review-group__chip--unassigned { background: #ffedd5; color: #c2410c; } +.review-group-expand.d-none { display: none !important; } +.review-grouped .review-sub__project { display: none; } +.review-grouped .review-row > td:first-child { padding-left: 2.1rem; } +.review-grouped .review-title__text { font-weight: 500; } +.review-grouped .review-group td { padding-top: .55rem; padding-bottom: .55rem; border-top: 1px solid #e2e8f0; } +.review-grouped .review-group + .review-row > td, +.review-grouped .review-row + .review-row > td { border-top-color: #f1f5f9; } +.review-grouped tbody > .review-group:not(:first-child) td { border-top: 6px solid #f8fafc; box-shadow: inset 0 1px 0 #e2e8f0; } + +/* ---- Empty states ---- */ + +/* ---- Unlinked branches panel ---- */ +.unlinked-branch-row { border: 1px solid #e3e9f1; border-left: 3px solid #f59e0b; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; } +.unlinked-branch-name { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } +.unlinked-branch-meta { font-size: .75rem; color: #64748b; margin-top: 4px; } + +/* ---- Conflict: step-by-step local resolution ---- */ +.review-steps { list-style: none; counter-reset: rstep; padding: 0; margin: .4rem 0 .5rem; display: flex; flex-direction: column; gap: .55rem; } +.review-step { counter-increment: rstep; } +.review-step__label { font-size: .78rem; color: #334155; margin-bottom: .2rem; line-height: 1.3; } +.review-step__label::before { content: "Step " counter(rstep) ". "; font-weight: 700; color: #0f172a; } +.review-step__code { display: flex; align-items: flex-start; gap: .3rem; } +.review-step__code .review-commands { flex: 1 1 auto; min-width: 0; margin: 0; } +.review-step__copy { flex: 0 0 auto; padding: .2rem .4rem; color: #475569; border: 1px solid #e2e8f0; background: #fff; } +.review-step__copy:hover { color: #4f46e5; border-color: #c7d2fe; } + +/* ---- Check out & merge locally ---- */ +.review-local__summary { cursor: pointer; list-style: none; margin-bottom: 0; } +.review-local__summary::-webkit-details-marker { display: none; } +.review-local__chevron { font-size: .7rem; color: #94a3b8; transition: transform .15s; } +.review-local__details:not([open]) .review-local__chevron { transform: rotate(-90deg); } +.review-local__details[open] .review-local__summary { margin-bottom: .5rem; } +.review-step__label a { font-size: .76rem; } +.review-local__tip { font-size: .76rem; color: #334155; margin-top: .25rem; } +.review-step__copy.is-copied { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/task-explorer.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/task-explorer.css new file mode 100644 index 0000000..79101ce --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/task-explorer.css @@ -0,0 +1,49 @@ +/* Task Explorer */ +.tx-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; } +.tx-preset.active { font-weight: 600; } +.tx-preset-toggle { min-width: 150px; text-align: left; } +.tx-help { cursor: help; } +.tx-project { width: 200px; max-width: 100%; } + +@media (max-width: 575.98px) { + .tx-project { width: 100%; } + .tx-preset-toggle { min-width: 0; } +} +.pivot { overflow-x: auto; } + +/* ===== On-theme pivottable chrome (scoped to #pivot) ===== */ +/* Headers + totals: app grid-header tint */ +#pivot .pvtTable thead tr th, +#pivot .pvtTable tbody tr th, +#pivot .pvtAxisLabel, +#pivot .pvtColLabel, +#pivot .pvtRowLabel, +#pivot .pvtTotalLabel, +#pivot .pvtGrandTotal, +#pivot .pvtTotal { + background: #eef6f6; + color: #2a3b52; + border-color: #dfe4ea; +} +#pivot .pvtTable td, +#pivot .pvtTable th { border-color: #dfe4ea; } + +/* Drag-field boxes / axis chips: neutral app-grey pills */ +.pvtUi .pvtAttr, +.pvtUi .pvtAxisContainer li span.pvtAttr { + background: #f2f5f9; + border: 1px solid #e2e8f0; + border-radius: 6px; + color: #2a3b52; +} +.pvtUi .pvtAxisContainer, +.pvtUi .pvtVals, +.pvtUi .pvtRenderers { background: #f8fafc; border-color: #e2e8f0; } +.pvtUi select { border: 1px solid #d8dbe0; border-radius: 4px; } + +/* Sort arrows / triangles + drop-target highlight in brand teal */ +.pvtUi .pvtTriangle { color: #1cc7c9; } +.pvtUi .pvtPlaceholder { border-color: #1cc7c9; } + +/* Clickable value cells: teal hover (matches app grid) */ +#pivot .pvtTable td.pvtVal:hover { outline: 2px solid #1cc7c9; cursor: pointer; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/team-availability.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/team-availability.css new file mode 100644 index 0000000..642c7a5 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/team-availability.css @@ -0,0 +1,115 @@ +/* Team Availability board */ + +/* KPI tiles */ +.tav-kpi { + background: #fff; + border: 1px solid #e6ecf3; + border-radius: 10px; + padding: 12px 14px; + display: flex; + flex-direction: column; + gap: 2px; + height: 100%; +} +.tav-kpi__val { font-size: 1.5rem; font-weight: 700; color: #1b2e4a; line-height: 1; } +.tav-kpi__lbl { font-size: .75rem; color: #7b8aa0; } +.tav-kpi--warn { border-color: #f6dba8; background: #fff9ef; } +.tav-kpi--warn .tav-kpi__val { color: #b45309; } +.tav-kpi--danger { border-color: #f3b6b6; background: #fef4f4; } +.tav-kpi--danger .tav-kpi__val { color: #dc2626; } + +/* Legend chips */ +.tav-chip { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 11px; margin-right: 6px; } +.tav-chip--approved { background: #6f78e6; color: #fff; } +.tav-chip--pending { + background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 4px, #eef2f7 4px, #eef2f7 8px); + color: #334155; + border: 1px solid #cbd5e1; +} + +/* Swimlane gantt */ +.tav-gantt { font-size: 12px; overflow-x: auto; max-width: 100%; } +.tav-axis, .tav-row { display: flex; align-items: center; } +.tav-axis-label, .tav-row-label { + flex: 0 0 150px; + width: 150px; + padding-right: 10px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.tav-row-label { font-weight: 600; color: #33455c; } +.tav-axis-track, .tav-track { + position: relative; + flex: 1 1 auto; + min-width: 0; + height: 26px; + overflow: hidden; +} +/* Small screens: keep a readable track width and scroll horizontally */ +@media (max-width: 767.98px) { + .tav-axis-track, .tav-track { min-width: 520px; } +} +.tav-axis-track { height: 20px; border-bottom: 1px solid #e6ecf3; } +.tav-tick { + position: absolute; + transform: translateX(-50%); + font-size: 10px; + color: #9aa7b8; + white-space: nowrap; +} +.tav-tick--end { transform: translateX(-100%); } +.tav-today, .tav-today-line { + position: absolute; + top: 0; bottom: 0; + width: 2px; + background: #ef4444; + opacity: .7; +} +.tav-row { border-bottom: 1px solid #f1f5f9; } +.tav-row:hover { background: #f8fbff; } +.tav-bar { + position: absolute; + top: 4px; + height: 20px; + border-radius: 4px; + cursor: default; + box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); + display: flex; + align-items: center; + gap: 4px; + padding: 0 6px; + overflow: hidden; + color: #fff; + font-size: 11px; + font-weight: 600; + white-space: nowrap; + text-shadow: 0 1px 1px rgba(0,0,0,.35); +} +.tav-bar__icon { flex: 0 0 auto; font-size: 10px; } +.tav-bar__label { + flex: 1 1 auto; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; +} +.tav-bar--pending { + opacity: .95; + background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.4), rgba(255,255,255,.4) 3px, transparent 3px, transparent 6px) !important; + box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); +} + +/* Calendar pending events: striped overlay */ +.tav-ev-pending { opacity: .9; } +.tav-ev-pending .fc-event-title::after { content: " (pending)"; font-style: italic; opacity: .8; } + +/* Calendar toolbar responsiveness */ +#tavCalendar .fc-toolbar { flex-wrap: wrap; gap: 6px; } +#tavCalendar .fc-toolbar-title { font-size: 1.1rem; } +@media (max-width: 575.98px) { + #tavCalendar .fc-header-toolbar { margin-bottom: .5rem; justify-content: center; } + #tavCalendar .fc-footer-toolbar { margin-top: .5rem; } + #tavCalendar .fc-toolbar-chunk { display: flex; flex-wrap: wrap; gap: 4px; } + #tavCalendar .fc .fc-button { padding: .28em .55em; font-size: .8rem; } + #tavCalendar .fc-toolbar-title { font-size: 1rem; text-align: center; width: 100%; } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/user-list.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/user-list.css new file mode 100644 index 0000000..928c426 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/user-list.css @@ -0,0 +1,3 @@ +.emp-filter .select2-container { font-size: .875rem; } +.emp-filter .select2-container--default .select2-selection--multiple { min-height: calc(1.5em + .5rem + 2px); border-color: #d8dbe0; } +.emp-filter label { font-weight: 500; } diff --git a/src/Presentation/Taskist.Web/wwwroot/css/pages/wiki.css b/src/Presentation/Taskist.Web/wwwroot/css/pages/wiki.css new file mode 100644 index 0000000..76fe86d --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/pages/wiki.css @@ -0,0 +1,68 @@ +/* Wiki page layout */ +.wiki-tree-pane { + max-height: calc(100vh - 240px); + overflow-y: auto; +} + +.wiki-content-pane { + min-height: calc(100vh - 240px); +} + +@media (min-width: 768px) { + .wiki-tree-pane { + border-right: 1px solid var(--cui-border-color, #e3eaf2); + } +} + +#wikiTree { + font-size: .9rem; +} + +.wiki-tag-badge { + background: #eaf1f8; + border: 1px solid #cddcec; + color: #2c3e50; + border-radius: 14px; + padding: 2px 10px; + font-size: .78rem; + margin-right: 6px; + display: inline-flex; + align-items: center; +} + +.wiki-tag-badge i { + color: #18b5c4; + margin-right: 5px; +} + +#wikiLinkedTasks .wiki-linked-title { + font-weight: 600; + font-size: .8rem; + color: #3b4a5a; + margin-right: 8px; +} + +.wiki-linked-task { + display: inline-flex; + align-items: center; + background: #f4f7fb; + border: 1px solid #e3eaf2; + border-radius: 12px; + padding: 2px 10px; + font-size: .78rem; + margin: 0 6px 6px 0; + text-decoration: none; + color: #2c3e50; +} + +.wiki-version-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 8px 4px; + border-bottom: 1px solid #eef2f7; +} + +.wiki-version-row:last-child { + border-bottom: none; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/site.css b/src/Presentation/Taskist.Web/wwwroot/css/site.css index 6fc54a8..7527010 100644 --- a/src/Presentation/Taskist.Web/wwwroot/css/site.css +++ b/src/Presentation/Taskist.Web/wwwroot/css/site.css @@ -1,4 +1,26 @@ -.bg-login { +:root { + --app-font-size: 0.90rem; + --app-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + /* Logo palette (available app-wide, not just the sidebar) */ + --wp-teal: #1cc7c9; + --wp-amber: #ffc21a; + --wp-accent-gradient: linear-gradient(90deg, var(--wp-teal) 0%, var(--wp-amber) 100%); + /* Grid tints */ + --wp-grid-header: #eef6f6; + --wp-grid-stripe: rgba(28, 199, 201, .06); + --wp-grid-hover: linear-gradient(90deg, rgba(28, 199, 201, .16) 0%, rgba(255, 194, 26, .13) 100%); + --wp-grid-header-height: 28px; /* matches the card/Filter header bar height */ +} + +html { + font-size: var(--app-font-size); +} + +body { + font-family: var(--app-font); +} + +.bg-login { background: url(../../images/login-bg.png) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; @@ -12,8 +34,77 @@ } } -.nav-group.show .nav-group-toggle { - background-color: rgb(49 65 96) !important; +/* Brand-accented sidebar (logo palette: teal -> amber) */ +.sidebar-dark { + --wp-teal: #1cc7c9; + --wp-amber: #ffc21a; + --wp-accent-gradient: linear-gradient(90deg, var(--wp-teal) 0%, var(--wp-amber) 100%); +} + +/* Full-width background image for the sidebar. + The colour wash sits ON TOP of the image; its alpha controls how faint + the image is (0.85 => ~15% visible). Swap --wp-sidebar-image or the alpha to taste. */ +.sidebar.sidebar-dark { + --wp-sidebar-bg: #1b2e4a; + --wp-sidebar-image: url(../../images/sidenav-bg.jpg); + background-color: var(--wp-sidebar-bg); + background-image: linear-gradient(rgba(27, 46, 74, .80), rgba(27, 46, 74, .80)), var(--wp-sidebar-image); + background-repeat: no-repeat; + background-position: center, center; + background-size: cover, cover; +} + +.sidebar-nav .nav-link { + border-radius: 6px; + transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; +} + + .sidebar-nav .nav-link:hover { + color: #fff; + background-color: rgba(255, 255, 255, .06); + } + + /* Active leaf / child item: gradient TEXT that echoes the logo (no background) */ + .sidebar-nav .nav-link.active, + .sidebar-nav .nav-link.active:hover { + font-weight: 700; + background: linear-gradient(90deg, #5fe6e8 0%, #ffd24d 100%); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; + color: transparent; + box-shadow: none; + } + + .sidebar-nav .nav-link.active .nav-icon-bullet { + background-color: var(--wp-teal); + } + +/* Active parent group header (collapsed or expanded): logo-gradient left bar + very mild gradient wash */ +.nav-group.active-parent > .nav-group-toggle { + position: relative; + color: #fff !important; + background: linear-gradient(90deg, rgba(28, 199, 201, .12) 0%, rgba(255, 194, 26, .10) 100%) !important; +} + + .nav-group.active-parent > .nav-group-toggle::before { + content: ""; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 3px; + border-radius: 0; + background: linear-gradient(180deg, var(--wp-teal) 0%, var(--wp-amber) 100%); + } + + .nav-group.active-parent > .nav-group-toggle .nav-icon { + color: var(--wp-teal); + } + +/* Manually expanded (non-active) group stays subtle */ +.nav-group.show:not(.active-parent) > .nav-group-toggle { + background-color: rgba(255, 255, 255, .04) !important; } .simplebar-content { @@ -22,6 +113,12 @@ min-height: 100%; } +.sidebar-dark { + --cui-body-bg: #1b2e4a; + line-height: 1; + font-size: 0.95rem; +} + .dataTable a { text-decoration: none; } @@ -30,20 +127,335 @@ color: #0c09f7 !important; } +/* ---- Grid theme (ALL DataTables grids) ------------------------------------- + `table.dataTable` only matches DataTables-initialised tables, so this themes + every grid — the shared DataTable.cshtml AND custom pages like Backlog — + without touching ordinary tables. ---------------------------------------- */ + +/* Header: tint + ONE full-width gradient underline painted on the thead + background (cells transparent), so it's a single continuous gradient. */ +table.dataTable thead { + background-image: linear-gradient(var(--wp-grid-header), var(--wp-grid-header)), var(--wp-accent-gradient); + background-repeat: no-repeat; + background-position: top, bottom; + background-size: 100% calc(100% - 2px), 100% 2px; +} + + table.dataTable thead tr, + table.dataTable thead th { + background-color: transparent; + } + + table.dataTable thead th { + font-weight: 600; + color: #2a3b52; + vertical-align: middle; + border: 0; + height: var(--wp-grid-header-height); + padding-top: .25rem; + padding-bottom: .25rem; + } + +/* Neutralise Bootstrap's own striped/hover/active cell fills (background + box-shadow, + across BS5 versions) so the row-level zebra/hover below render as one smooth band. + Per-cell borders set in JS (e.g. Backlog status colours) are unaffected. */ +table.dataTable > tbody > tr > td, +table.dataTable > tbody > tr > th { + --bs-table-bg-type: transparent; + --bs-table-accent-bg: transparent; + background-color: transparent !important; + background-image: none !important; + box-shadow: none !important; +} + +table.dataTable > tbody > tr { + transition: background .12s ease; +} + + table.dataTable > tbody > tr:nth-of-type(even) { + background-color: var(--wp-grid-stripe); + } + + table.dataTable > tbody > tr:hover { + background: var(--wp-grid-hover); + } + +/* Compact pager sized to match the dense grids, with a brand-teal active page. */ +.dataTables_paginate { + margin-top: .5rem; +} + + .dataTables_paginate .pagination { + margin-bottom: 0; + } + + .dataTables_paginate .page-link { + padding: .15rem .5rem; + font-size: .82rem; + line-height: 1.5; + } + + .dataTables_paginate .page-item.active .page-link { + background-color: var(--wp-teal); + border-color: var(--wp-teal); + color: #fff; + } + + .dataTables_paginate .page-link:focus { + box-shadow: none; + } + .mandatory-symbol { color: red; - font-size: 12px; + font-size: .83rem; +} + +/* ---- Teal text utility ---- */ +.text-teal { + color: var(--wp-teal); +} + +/* ---- Duration segmented toggle (Full Day / Morning / Afternoon) ---- */ +.duration-toggle { + flex-wrap: nowrap; + max-width: 100%; } +.duration-toggle .btn { + white-space: nowrap; + --cui-btn-color: #6b7280; + --cui-btn-border-color: #d1d5db; + --cui-btn-hover-bg: #f1f5f9; + --cui-btn-hover-border-color: var(--wp-teal); + --cui-btn-hover-color: var(--wp-teal); + --cui-btn-active-bg: var(--wp-teal); + --cui-btn-active-border-color: var(--wp-teal); + --cui-btn-active-color: #fff; + --cui-btn-checked-bg: var(--wp-teal); + --cui-btn-checked-border-color: var(--wp-teal); + --cui-btn-checked-color: #fff; + font-weight: 500; +} +.duration-toggle .btn-check:disabled + .btn, +.duration-toggle .btn-check[disabled] + .btn { + opacity: .5; +} + +.badge-session { + display: inline-block; + margin-left: .35rem; + padding: .05rem .35rem; + font-size: .68rem; + font-weight: 600; + line-height: 1.3; + color: var(--wp-teal); + background: rgba(28, 199, 201, 0.12); + border: 1px solid rgba(28, 199, 201, 0.35); + border-radius: 5px; +} + +.lt-rules { + display: flex; + flex-wrap: wrap; + gap: .4rem; +} + +.lt-chip { + font-weight: 500; + padding: .42em .6em; + border: 1px solid transparent; +} + +.lt-chip-ok { + background: rgba(28, 199, 201, .12); + color: #0f7c7e; + border-color: rgba(28, 199, 201, .3); +} + +.lt-chip-no { + background: rgba(220, 53, 69, .10); + color: #b02a37; + border-color: rgba(220, 53, 69, .25); +} + +.lt-chip-info { + background: rgba(28, 199, 201, .08); + color: #2a3b52; + border-color: rgba(28, 199, 201, .2); +} + +.lt-chip-muted { + background: #eef1f5; + color: #5b6b82; + border-color: #e0e5ec; +} + +.lt-tiles { + display: flex; + gap: .6rem; +} + +.lt-tile { + flex: 1; + text-align: center; + padding: .6rem .4rem; + border-radius: 8px; + background: #f6f8fa; + border: 1px solid #eceff3; +} + +.lt-tile-value { + font-size: 1.25rem; + font-weight: 700; + line-height: 1.1; + color: #2a3b52; +} + +.lt-tile-label { + font-size: .72rem; + text-transform: uppercase; + letter-spacing: .03em; + color: #7b8aa0; +} + +.lt-tile-ok .lt-tile-value { + color: #0f7c7e; +} + +.lt-tile-warn .lt-tile-value { + color: #b8860b; +} + +.lt-tile-danger .lt-tile-value { + color: #b02a37; +} + +.lt-tile-muted .lt-tile-value { + color: #7b8aa0; +} + +.lt-progress { + height: 6px; + background: #eceff3; + border-radius: 4px; + margin-top: .5rem; + overflow: hidden; +} + +.lt-progress-bar { + height: 100%; + background: var(--wp-accent-gradient); +} + +.lt-daycount { + font-size: .95rem; +} + + .lt-daycount .text-muted { + font-size: .8rem; + margin-left: .4rem; + } .subheader-title { + display: flex; + align-items: center; + gap: .5rem; padding: var(--cui-header-toggler-padding-y) var(--cui-header-toggler-padding-x); - font-size: 1.25rem; - color: #4770dc; background-color: var(--cui-header-toggler-bg); border: 0; border-radius: var(--cui-header-toggler-border-radius); } +/* Flat line icon + bold title (modern, no filled chip) */ +.subheader-title .page-icon { + color: var(--wp-teal); + font-size: 1.05rem; + flex: 0 0 auto; +} + +.subheader-title #pageTitle { + font-weight: 600; + font-size: 1.05rem; + color: #2a3b52; +} + +/* ---- horizontal form: align wc-label used as a column label ---- */ +.label-wrapper.col-form-label { + font-weight: 500; +} + + .label-wrapper.col-form-label .form-label { + margin-bottom: 0; + } + +/* ---- Configuration settings switches ---- */ +.cfg-switches { + display: flex; + flex-direction: column; + gap: .6rem; + padding-top: .25rem; +} + + .cfg-switches .form-switch { + margin-bottom: 0; + } + +/* ---- smart date suggestions ---- */ +.lt-suggest { + border: 1px solid #e6e9ef; + border-radius: .45rem; + padding: .5rem .65rem; + background: linear-gradient(180deg, rgba(28, 199, 201, .06), rgba(255, 194, 26, .05)); +} + +.lt-suggest-head { + font-weight: 600; + font-size: .82rem; + color: #2a3b52; + margin-bottom: .4rem; +} + +.lt-suggest-item { + display: flex; + align-items: center; + justify-content: space-between; + gap: .5rem; + padding: .35rem 0; + border-top: 1px solid #eef1f6; +} + + .lt-suggest-item:first-of-type { + border-top: 0; + } + +.lt-suggest-meta { + display: flex; + flex-direction: column; + line-height: 1.2; +} + +.lt-suggest-dates { + font-weight: 600; + color: #2a3b52; + font-size: .82rem; +} + +.lt-suggest-info { + font-size: .74rem; + color: #6c757d; +} + +.lt-suggest-ok { + color: #1f8f53; +} + +.lt-suggest-warn { + color: #c47f00; +} + +.lt-suggest-pick { + flex: 0 0 auto; +} + .offcanvas-header { display: flex; align-items: center; @@ -76,7 +488,7 @@ border-radius: 6px; text-align: center; margin-bottom: 0.5rem; - font-size: 13px; + font-size: .9rem; } .validation-summary-errors ul { @@ -105,8 +517,18 @@ font-size: 1rem !important; font-weight: 400; line-height: 1.5; + display: flex; + align-items: center; } + /* vertically centre the rendered value (select2 default top-aligns it) */ + .select2-container--default .select2-selection--single .select2-selection__rendered { + flex: 1 1 auto; + line-height: 1.5; + padding-left: 0.25rem; + padding-right: 1.5rem; + } + .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; right: 0.75rem; @@ -116,6 +538,106 @@ width: 100% !important; } +.select2-container--open { + z-index: 100000000; +} + +.jconfirm .jconfirm-box, +.jconfirm .jconfirm-box div.jconfirm-content-pane, +.jconfirm .jconfirm-box div.jconfirm-content-pane .jconfirm-content { + overflow: visible !important; +} + +/* Tall form modals (ModalSize "... jc-form-scroll"): let the content pane scroll inside the window and keep Save/Cancel in view */ +.jconfirm .jc-form-scroll .jconfirm-box div.jconfirm-content-pane { + overflow-x: hidden !important; + overflow-y: auto !important; +} + +.jconfirm .form-modal-actions { + display: flex; + justify-content: flex-end; + gap: 0.25rem; +} + +.jconfirm .jc-form-scroll .form-modal-actions { + position: sticky; + bottom: 0; + z-index: 2; + margin-top: 0.5rem; + padding: 0.75rem 0 0.25rem; + background: #fff; + border-top: 1px solid #e9ecef; +} + +/* App-wide multi-select summary (select2-summary.js): one line, same height/typography as a single select, + showing the picked item's name or "N selected" as plain text instead of a tag per item. */ +.select2-container--default.select2-summary .select2-selection--multiple { + min-height: calc(2.3rem + 2px); + display: flex; + align-items: center; + padding: 0 1.75rem 0 0.25rem; + font-size: 1rem; + overflow: hidden; + cursor: pointer; +} + +.select2-container--default.select2-summary .select2-selection--multiple .select2-selection__rendered { + display: flex; + flex: 1 1 auto; + flex-wrap: nowrap; + align-items: center; + min-width: 0; + margin: 0; + padding: 0 0 0 0.25rem; + overflow: hidden; + list-style: none; +} + +.select2-container--default.select2-summary .select2-selection--multiple .select2-selection__choice:not(.select2-summary__chip) { + display: none; +} + +.select2-container--default.select2-summary .select2-selection--multiple .select2-selection__choice.select2-summary__chip { + flex: 0 1 auto; + min-width: 0; + margin: 0 0.25rem 0 0 !important; + padding: 0; + border: 0 !important; + background: transparent !important; + color: var(--cui-body-color); + font-size: inherit; + line-height: 1.5; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + cursor: pointer; +} + +.select2-container--default.select2-summary .select2-search--inline { + flex: 1 1 auto; + min-width: 2rem; +} + +.select2-container--default.select2-summary .select2-search--inline .select2-search__field { + width: 100% !important; + margin: 0; + font-size: inherit; + line-height: 1.5; +} + +.select2-container--default.select2-summary .select2-selection__clear { + position: absolute; + right: 0.75rem; + top: 50%; + transform: translateY(-50%); + margin: 0; + float: none; + color: var(--cui-secondary-color); + font-size: 1.1rem; + line-height: 1; +} + .select2-container--default .select2-selection--multiple { min-height: 38px; border: 1px solid #ced4da; @@ -134,6 +656,10 @@ z-index: 1050 !important; } +.datepicker.datepicker-dropdown { + z-index: 100000001 !important; +} + #canvas-3 { width: 100%; height: 300px; @@ -168,219 +694,1992 @@ color: #6c757d; } -.timeline { - display: flex; - flex-direction: column; - margin: 0; - padding: 0; +.timeline-container { + position: relative; + margin-bottom: 32px } + .timeline-container:last-child { + margin-bottom: 0; + } + /*.timeline-container:before { + content: ""; + display: block; + position: absolute; + left: 28px; + top: 0; + bottom: 0; + border: 1px dotted #E2E3E7; + border-width: 0 1px + }*/ + + .timeline-container:first-child:before { + border-top-width: 1px + } + + .timeline-container:last-child:before { + border-bottom-width: 1px + } + .timeline-item { position: relative; - padding: 10px 10px 10px 20px; - border-left: 2px solid #007bff; - margin: 0; } - .timeline-item:before { - content: ''; - position: absolute; - left: -6px; - top: 0; - width: 12px; - height: 12px; - background-color: #007bff; - border-radius: 50%; + .timeline-item .widget-box { + background-color: #F2F6F9; + color: #595C66; } - .timeline-item .time { - font-size: 0.8rem; - color: #6c757d; - margin: 0; + .timeline-item .transparent.widget-box { + border-left: 3px solid #DAE1E5; + /*margin-bottom: 8px;*/ } - .timeline-item .username { - font-size: 0.9rem; - font-weight: bold; - margin: 0; + .timeline-item .transparent .widget-header { + background-color: #ECF1F4; + border-bottom-width: 0 } - .timeline-item .details { - font-size: 0.9rem; - margin-top: 4px; + .timeline-item .transparent .widget-header > .widget-title { + margin-left: 8px + } + + .timeline-item:nth-child(even) .widget-box { + background-color: #F3F3F3; + color: #616161 } -.backlog-history .tab-pane { - max-height: calc(100vh - 108px); - overflow-y: auto; -} + .timeline-item:nth-child(even) .widget-box.transparent { + border-left-color: #DBDBDB !important + } -.comment-box-container { - position: sticky; - bottom: 0; - background-color: #ffffff; - padding: 0.6rem; - border-top: 1px solid #dee2e6; -} + .timeline-item:nth-child(even) .widget-box.transparent .widget-header { + background-color: #EEE !important + } -.thumbnail-container { - display: flex; - overflow-x: auto; - white-space: nowrap; - padding: 0.5rem; - margin-bottom: 1rem; - gap: 1rem; - border: 1px dashed #dee2e6; -} + .timeline-item .widget-box { + /*margin: 0 0 0 60px;*/ + position: relative; + max-width: none + } - .thumbnail-container::-webkit-scrollbar { - height: 8px; + .timeline-item .widget-main { + margin: 0; + position: relative; + max-width: none; + border-bottom-width: 0 } - .thumbnail-container::-webkit-scrollbar-thumb { - background: #888; - border-radius: 4px; + .timeline-item .widget-body { + background-color: transparent + } + + .timeline-item .widget-toolbox { + padding: 4px 8px 0 !important; + background-color: transparent !important; + border-width: 0 !important; + margin: 0 !important + } + +.timeline-info { + float: left; + width: 60px; + text-align: center; + position: relative +} + + .timeline-info img { + border-radius: 100%; + max-width: 42px + } + + .timeline-info .badge, + .timeline-info .label { + font-size: .83rem + } + +.timeline-container:not(.timeline-style2) .timeline-indicator { + opacity: 1; + border-radius: 100%; + display: inline-block; + font-size: 1.11rem; + height: 36px; + line-height: 30px; + width: 36px; + text-align: center; + text-shadow: none !important; + padding: 0; + cursor: default; + border: 3px solid #FFF !important +} + +.timeline-label { + display: block; + clear: both; + margin: 0 0 18px 34px +} + +.timeline-item img { + border: 1px solid #AAA; + padding: 2px; + background-color: #FFF +} + +.timeline-style2:before { + display: none +} + +.timeline-style2 .timeline-item { + padding-bottom: 22px; + margin-bottom: 0 +} + + .timeline-style2 .timeline-item:last-child { + padding-bottom: 0 + } + + .timeline-style2 .timeline-item:before { + content: ""; + display: block; + position: absolute; + left: 90px; + top: 5px; + bottom: -5px; + border-width: 0; + background-color: #DDD; + width: 2px; + max-width: 2px + } + + .timeline-style2 .timeline-item:last-child:before { + display: none + } + + .timeline-style2 .timeline-item:first-child:before { + display: block + } + + .timeline-style2 .timeline-item .transparent .widget-header { + background-color: transparent !important + } + + .timeline-style2 .timeline-item .transparent.widget-box { + background-color: transparent !important; + border-left: none !important + } + +.timeline-style2 .timeline-info { + width: 100px +} + +.timeline-style2 .timeline-indicator { + font-size: 0; + height: 12px; + line-height: 12px; + width: 12px; + border-width: 1px !important; + background-color: #FFF !important; + position: absolute; + left: 85px; + top: 3px; + opacity: 1; + border-radius: 100%; + display: inline-block; + padding: 0 +} + +.timeline-style2 .timeline-date { + display: inline-block; + width: 72px; + text-align: right; + margin-right: 25px; + color: #777 +} + +.timeline-style2 .timeline-item .widget-box { + margin-left: 112px +} + +.timeline-style2 .timeline-label { + width: 75px; + margin-left: 0; + margin-bottom: 10px; + text-align: right; + color: #666; + font-size: .97rem +} + +.timeline-time { + text-align: center; + position: static +} + + +.widget-box { + padding: 0; + box-shadow: none; + margin: 3px 0; + border: 1px solid #CCC +} + +@media only screen and (max-width:767px) { + .widget-box { + margin-top: 7px; + margin-bottom: 7px + } +} + +.widget-header { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + position: relative; + min-height: 38px; + background: repeat-x #f7f7f7; + background-image: -webkit-linear-gradient(top, #FFF 0, #EEE 100%); + background-image: -o-linear-gradient(top, #FFF 0, #EEE 100%); + background-image: linear-gradient(to bottom, #FFF 0, #EEE 100%); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + color: #669FC7; + border-bottom: 1px solid #DDD; + padding-left: 12px +} + +.widget-box.transparent > .widget-header, +.widget-header-flat { + filter: progid: DXImageTransform.Microsoft.gradient(enabled=false) +} + +.widget-header:after, +.widget-header:before { + content: ""; + display: table; + line-height: 0 +} + +.widget-header:after { + clear: right +} + +.widget-box.collapsed > .widget-header { + border-bottom-width: 0 +} + +.collapsed.fullscreen > .widget-header { + border-bottom-width: 1px +} + +.collapsed > .widget-body { + display: none +} + +.widget-header-flat { + background: #F7F7F7 +} + +.widget-header-large { + min-height: 49px; + padding-left: 18px +} + +.widget-header-small { + min-height: 31px; + padding-left: 10px +} + +.widget-header > .widget-title { + line-height: 36px; + padding: 0; + margin: 0; + display: inline +} + + .widget-header > .widget-title > .ace-icon { + margin-right: 5px; + font-weight: 400; + display: inline-block + } + +.infobox .infobox-content:first-child, +.infobox > .badge, +.infobox > .stat, +.percentage { + font-weight: 700 +} + +.widget-header-large > .widget-title { + line-height: 48px +} + +.widget-header-small > .widget-title { + line-height: 30px +} + +.widget-toolbar { + display: inline-block; + padding: 0 10px; + line-height: 37px; + float: right; + position: relative; + font-size: .83rem; + font-weight: bold; + color: #6e98b9; +} + +.widget-header-large > .widget-toolbar { + line-height: 48px +} + +.widget-header-small > .widget-toolbar { + line-height: 29px +} + +.widget-toolbar.no-padding { + padding: 0 +} + +.widget-toolbar.padding-5 { + padding: 0 5px +} + +.widget-toolbar:before { + display: inline-block; + content: ""; + position: absolute; + top: 3px; + bottom: 3px; + left: -1px; + border: 1px solid #D9D9D9; + border-width: 0 1px 0 0 +} + +.popover-notitle + .popover .popover-title, +.popover.popover-notitle .popover-title, +.widget-toolbar.no-border:before { + display: none +} + +.widget-header-large > .widget-toolbar:before { + top: 6px; + bottom: 6px +} + +[class*=widget-color-] > .widget-header > .widget-toolbar:before { + border-color: #EEE +} + +.widget-color-orange > .widget-header > .widget-toolbar:before { + border-color: #FEA +} + +.widget-color-dark > .widget-header > .widget-toolbar:before { + border-color: #222; + box-shadow: -1px 0 0 rgba(255, 255, 255, .2), inset 1px 0 0 rgba(255, 255, 255, .1) +} + +.widget-toolbar label { + display: inline-block; + vertical-align: middle; + margin-bottom: 0 +} + +.widget-toolbar > .widget-menu > a, +.widget-toolbar > a { + font-size: .97rem; + margin: 0 1px; + display: inline-block; + padding: 0; + line-height: 24px +} + + .widget-toolbar > .widget-menu > a:hover, + .widget-toolbar > a:hover { + text-decoration: none + } + +.widget-header-large > .widget-toolbar > .widget-menu > a, +.widget-header-large > .widget-toolbar > a { + font-size: 1.04rem; + margin: 0 1px +} + +.widget-toolbar > .btn { + line-height: 27px; + margin-top: -2px +} + + .widget-toolbar > .btn.smaller { + line-height: 26px + } + + .widget-toolbar > .btn.bigger { + line-height: 28px + } + +.widget-toolbar > .btn-sm { + line-height: 24px +} + + .widget-toolbar > .btn-sm.smaller { + line-height: 23px + } + + .widget-toolbar > .btn-sm.bigger { + line-height: 25px + } + +.widget-toolbar > .btn-xs { + line-height: 22px +} + + .widget-toolbar > .btn-xs.smaller { + line-height: 21px + } + + .widget-toolbar > .btn-xs.bigger { + line-height: 23px + } + +.widget-toolbar > .btn-minier { + line-height: 18px +} + + .widget-toolbar > .btn-minier.smaller { + line-height: 17px + } + + .widget-toolbar > .btn-minier.bigger { + line-height: 19px + } + +.widget-toolbar > .btn-lg { + line-height: 36px +} + + .widget-toolbar > .btn-lg.smaller { + line-height: 34px + } + + .widget-toolbar > .btn-lg.bigger { + line-height: 38px + } + +.widget-toolbar-dark { + background: #444 +} + +.widget-toolbar-light { + background: rgba(255, 255, 255, .85) +} + +.widget-toolbar > .widget-menu { + display: inline-block; + position: relative +} + + .widget-toolbar > .widget-menu > a[data-action], + .widget-toolbar > a[data-action] { + -webkit-transition: transform .1s; + -o-transition: transform .1s; + transition: transform .1s + } + + .widget-toolbar > .widget-menu > a[data-action] > .ace-icon, + .widget-toolbar > a[data-action] > .ace-icon { + margin-right: 0 + } + + .widget-toolbar > .widget-menu > a[data-action]:focus, + .widget-toolbar > a[data-action]:focus { + text-decoration: none; + outline: 0 + } + + .widget-toolbar > .widget-menu > a[data-action]:hover, + .widget-toolbar > a[data-action]:hover { + -moz-transform: scale(1.2); + -webkit-transform: scale(1.2); + -o-transform: scale(1.2); + -ms-transform: scale(1.2); + transform: scale(1.2) + } + +.widget-body { + background-color: #FFF +} + +.widget-main { + padding: 5px +} + + .widget-main.padding-32 { + padding: 32px + } + + .widget-main.padding-30 { + padding: 30px + } + + .widget-main.padding-28 { + padding: 28px + } + + .widget-main.padding-26 { + padding: 26px + } + + .widget-main.padding-24 { + padding: 24px + } + + .widget-main.padding-22 { + padding: 22px + } + + .widget-main.padding-20 { + padding: 20px + } + + .widget-main.padding-18 { + padding: 18px + } + + .widget-main.padding-16 { + padding: 16px + } + + .widget-main.padding-14 { + padding: 14px + } + + .widget-main.padding-12 { + padding: 12px + } + + .widget-main.padding-10 { + padding: 10px + } + + .widget-main.padding-8 { + padding: 8px + } + + .widget-main.padding-6 { + padding: 6px + } + + .widget-main.padding-4 { + padding: 4px + } + + .widget-main.padding-2 { + padding: 2px + } + + .widget-main.no-padding, + .widget-main.padding-0 { + padding: 0 + } + +.widget-toolbar .progress { + vertical-align: middle; + display: inline-block; + margin: 0 +} + +.widget-toolbar > .dropdown, +.widget-toolbar > .dropup { + display: inline-block +} + +.widget-toolbox.toolbox-vertical, +.widget-toolbox.toolbox-vertical + .widget-main { + display: table-cell; + vertical-align: top +} + +.widget-box > .widget-header > .widget-toolbar > .widget-menu > [data-action=settings], +.widget-box > .widget-header > .widget-toolbar > [data-action=settings], +.widget-color-dark > .widget-header > .widget-toolbar > .widget-menu > [data-action=settings], +.widget-color-dark > .widget-header > .widget-toolbar > [data-action=settings] { + color: #99CADB +} + +.widget-box > .widget-header > .widget-toolbar > .widget-menu > [data-action=reload], +.widget-box > .widget-header > .widget-toolbar > [data-action=reload], +.widget-color-dark > .widget-header > .widget-toolbar > .widget-menu > [data-action=reload], +.widget-color-dark > .widget-header > .widget-toolbar > [data-action=reload] { + color: #ACD392 +} + +.widget-box > .widget-header > .widget-toolbar > .widget-menu > [data-action=collapse], +.widget-box > .widget-header > .widget-toolbar > [data-action=collapse], +.widget-color-dark > .widget-header > .widget-toolbar > .widget-menu > [data-action=collapse], +.widget-color-dark > .widget-header > .widget-toolbar > [data-action=collapse] { + color: #AAA +} + +.widget-box > .widget-header > .widget-toolbar > .widget-menu > [data-action=close], +.widget-box > .widget-header > .widget-toolbar > [data-action=close], +.widget-color-dark > .widget-header > .widget-toolbar > .widget-menu > [data-action=close], +.widget-color-dark > .widget-header > .widget-toolbar > [data-action=close] { + color: #E09E96 +} + +.widget-box[class*=widget-color-] > .widget-header { + color: #FFF; + filter: progid: DXImageTransform.Microsoft.gradient(enabled=false) +} + +.widget-color-blue { + border-color: #307ECC +} + + .widget-color-blue > .widget-header { + background: #307ECC; + border-color: #307ECC + } + +.widget-color-blue2 { + border-color: #5090C1 +} + + .widget-color-blue2 > .widget-header { + background: #5090C1; + border-color: #5090C1 + } + +.widget-color-blue3 { + border-color: #6379AA +} + + .widget-color-blue3 > .widget-header { + background: #6379AA; + border-color: #6379AA + } + +.widget-color-green { + border-color: #82AF6F +} + + .widget-color-green > .widget-header { + background: #82AF6F; + border-color: #82AF6F + } + +.widget-color-green2 { + border-color: #2E8965 +} + + .widget-color-green2 > .widget-header { + background: #2E8965; + border-color: #2E8965 + } + +.widget-color-green3 { + border-color: #4EBC30 +} + + .widget-color-green3 > .widget-header { + background: #4EBC30; + border-color: #4EBC30 + } + +.widget-color-red { + border-color: #E2755F +} + + .widget-color-red > .widget-header { + background: #E2755F; + border-color: #E2755F + } + +.widget-color-red2 { + border-color: #E04141 +} + + .widget-color-red2 > .widget-header { + background: #E04141; + border-color: #E04141 + } + +.widget-color-red3 { + border-color: #D15B47 +} + + .widget-color-red3 > .widget-header { + background: #D15B47; + border-color: #D15B47 + } + +.widget-color-purple { + border-color: #7E6EB0 +} + + .widget-color-purple > .widget-header { + background: #7E6EB0; + border-color: #7E6EB0 + } + +.widget-color-pink { + border-color: #CE6F9E +} + + .widget-color-pink > .widget-header { + background: #CE6F9E; + border-color: #CE6F9E + } + +.widget-color-orange { + border-color: #E8B10D +} + + .widget-color-orange > .widget-header { + color: #855D10 !important; + border-color: #E8B10D; + background: #FFC657 + } + +.widget-color-dark { + border-color: #5a5a5a +} + + .widget-color-dark > .widget-header { + border-color: #666; + background: #404040 + } + +.widget-color-grey { + border-color: #9e9e9e +} + + .widget-color-grey > .widget-header { + border-color: #aaa; + background: #848484 + } + +.widget-box.transparent { + border-width: 0 +} + + .widget-box.transparent > .widget-header { + background: 0 0; + border-width: 0; + border-bottom: 1px solid #DCE8F1; + color: #4383B4; + padding-left: 3px + } + + .widget-box.transparent > .widget-header-large { + padding-left: 5px + } + + .widget-box.transparent > .widget-header-small { + padding-left: 1px + } + + .widget-box.transparent > .widget-body { + border-width: 0; + background-color: transparent + } + +[class*=widget-color-] > .widget-header > .widget-toolbar > .widget-menu > [data-action], +[class*=widget-color-] > .widget-header > .widget-toolbar > [data-action] { + text-shadow: 0 1px 1px rgba(0, 0, 0, .2) +} + +[class*=widget-color-] > .widget-header > .widget-toolbar > .widget-menu > [data-action=settings], +[class*=widget-color-] > .widget-header > .widget-toolbar > [data-action=settings] { + color: #D3E4ED +} + +[class*=widget-color-] > .widget-header > .widget-toolbar > .widget-menu > [data-action=reload], +[class*=widget-color-] > .widget-header > .widget-toolbar > [data-action=reload] { + color: #DEEAD3 +} + +[class*=widget-color-] > .widget-header > .widget-toolbar > .widget-menu > [data-action=collapse], +[class*=widget-color-] > .widget-header > .widget-toolbar > [data-action=collapse] { + color: #E2E2E2 +} + +[class*=widget-color-] > .widget-header > .widget-toolbar > .widget-menu > [data-action=close], +[class*=widget-color-] > .widget-header > .widget-toolbar > [data-action=close] { + color: #FFD9D5 +} + +.widget-color-orange > .widget-header > .widget-toolbar > .widget-menu > [data-action], +.widget-color-orange > .widget-header > .widget-toolbar > [data-action] { + text-shadow: none +} + +.widget-color-orange > .widget-header > .widget-toolbar > .widget-menu > [data-action=settings], +.widget-color-orange > .widget-header > .widget-toolbar > [data-action=settings] { + color: #559AAB +} + +.widget-color-orange > .widget-header > .widget-toolbar > .widget-menu > [data-action=reload], +.widget-color-orange > .widget-header > .widget-toolbar > [data-action=reload] { + color: #7CA362 +} + +.widget-color-orange > .widget-header > .widget-toolbar > .widget-menu > [data-action=collapse], +.widget-color-orange > .widget-header > .widget-toolbar > [data-action=collapse] { + color: #777 +} + +.widget-color-orange > .widget-header > .widget-toolbar > .widget-menu > [data-action=close], +.widget-color-orange > .widget-header > .widget-toolbar > [data-action=close] { + color: #A05656 +} + +.widget-box.light-border[class*=widget-color-]:not(.fullscreen) { + border-width: 0 +} + + .widget-box.light-border[class*=widget-color-]:not(.fullscreen) > .widget-header { + border: 1px solid; + border-color: inherit + } + + .widget-box.light-border[class*=widget-color-]:not(.fullscreen) > .widget-body { + border: 1px solid #D6D6D6; + border-width: 0 1px 1px + } + +.widget-box.no-border { + border-width: 0 +} + +.widget-box.fullscreen { + position: fixed; + margin: 0; + top: 0; + bottom: 0; + left: 0; + right: 0; + background-color: #FFF; + border-width: 3px; + z-index: 1040 !important +} + + .widget-box.fullscreen:not([class*=widget-color-]) { + border-color: #AAA + } + +.widget-body .table { + border-top: 1px solid #E5E5E5 +} + + .widget-body .table thead:first-child tr { + background: #FFF + } + +.comment-box-container { + position: sticky; + bottom: 0; + background-color: #ffffff; + padding: 0.6rem; + border-top: 1px solid #dee2e6; +} + +.thumbnail-container { + display: flex; + overflow-x: auto; + white-space: nowrap; + padding: 0.5rem; + margin-bottom: 1rem; + gap: 1rem; + border: 1px dashed #dee2e6; +} + + .thumbnail-container::-webkit-scrollbar { + height: 8px; + } + + .thumbnail-container::-webkit-scrollbar-thumb { + background: #888; + border-radius: 4px; } .thumbnail-container::-webkit-scrollbar-thumb:hover { background: #555; } -.file-icon-delete { - text-align: center; - color: #8b8e90; - cursor: pointer; - font-size: 0.75rem; +.file-icon-delete { + text-align: center; + color: #8b8e90; + cursor: pointer; + font-size: 0.75rem; +} + + .file-icon-delete:hover { + color: #f72828; + } + +.file-icon { + width: 70px; + height: 70px; + display: flex; + align-items: center; + justify-content: center; + font-size: 2.78rem; + color: #fff; + border-radius: 8px; + text-align: center; + flex-shrink: 0; +} + + .file-icon a { + color: #fff; + text-decoration: none !important; + } + + .file-icon.pdf { + background-color: #e74c3c; + } + + .file-icon.doc { + background-color: #3498db; + } + + .file-icon.xls { + background-color: #2ecc71; + } + + .file-icon.img { + background-color: #f39c12; + } + + .file-icon.txt { + background-color: #95a5a6; + } + + .file-icon.other { + background-color: #8e44ad; + } + +.alert-info { + display: flex; + align-items: center; + justify-content: space-between; + padding: 10px 20px; +} + +.avatar-card { + width: 40px; + height: 40px; + border-radius: 50%; + margin-right: 10px; +} + +.greeting-container { + display: flex; + align-items: center; +} + +.greeting-text { + margin: 0; + font-weight: bold; +} + +#sidebar .sidebar-brand { + margin-left: auto; + margin-right: auto; +} + +.sidebar-brand-full { + margin-left: 0; +} + +.text-line-container { + display: flex; + align-items: center; + text-align: center; + width: 100%; +} + + .text-line-container::before, + .text-line-container::after { + content: ''; + flex: 1; + border-bottom: 1px dashed #6c757d; + /* Adjust color and thickness */ + margin: 0 10px; + } + +.text-line { + white-space: nowrap; +} + +.card-count a { + text-decoration: none; + color: #fff; + cursor: pointer; +} + +.chart-container { + width: 100%; + height: 300px; +} + +@keyframes blink { + 0% { + opacity: 1; + } + + 50% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} + +.blinking { + animation: blink 0.35s linear infinite; +} + +.badge-counter .badge { + padding-top: 0.15em; + padding-right: 0.45em; + padding-bottom: 0.15em; + padding-left: 0.45em; +} + +.form-control-color { + width: 100% !important; +} + +.pvtFilterBox { + z-index: 100000 !important; +} + +.pivot { + max-height: 60vh; + overflow: auto; +} + +.jconfirm-title-c { + margin-bottom: 8px; + border-bottom: solid 1px #ddd; +} + +.title-author { + font-size: .83rem; +} + +.alert-status-log { + padding: 5px; + background: #e5e5e5; + border-radius: 5px; + margin-bottom: 5px; + border: 1px solid #fae594; + text-align: center; +} + +.custom-tooltip .tooltip-inner { + background-color: #f1f5c8; + border: 1px solid #dae193; + color: #1f2937; + text-align: left; +} +.custom-tooltip .tooltip-inner b { color: #0f172a; } +.custom-tooltip .tooltip-inner div { color: #475569; } + +.custom-tooltip.bs-tooltip-top .tooltip-arrow::before { + border-top-color: #dae193; +} + +/* Field hint (?) next to wc-label: styled Bootstrap tooltip, wide enough for token lists. */ +.tooltip.hint-tooltip { + --cui-tooltip-max-width: 320px; + --cui-tooltip-padding-x: 0.65rem; + --cui-tooltip-padding-y: 0.4rem; + --cui-tooltip-opacity: 0.95; +} +.tooltip.hint-tooltip .tooltip-inner { + text-align: left; + white-space: normal; + overflow-wrap: anywhere; + line-height: 1.45; +} +.icon-hint { + cursor: help; + border-radius: 50%; +} +.icon-hint:focus { + outline: none; +} +.icon-hint:focus-visible { + outline: 2px solid var(--cui-primary, #5856d6); + outline-offset: 2px; +} + +.datepicker-z { + z-index: 1000 !important; +} + +.tox-promotion { + display: none !important; +} + +.diagram-wrapper { + height: 90vh; + display: flex; + justify-content: center; + align-items: center; + background: #f4f6f8; + overflow: hidden; +} + +.diagram-container { + width: 100%; + height: 100%; + background: white; + border: 1px solid #ddd; + position: relative; +} + +.mermaid { + height: calc(100% - 45px); + display: flex; + justify-content: center; + align-items: center; +} + + .mermaid .badge { + font-size: .83rem; + } + +.validation-errors li { + display: block !important; +} + +/* ===== BEGIN: App-wide sleek scrollbar (theme-oriented) ===================== + To REVERT: delete everything between this BEGIN marker and the END marker + below. No other files reference it; removing it restores default browser + scrollbars everywhere. + ========================================================================== */ + +/* Firefox */ +* { + scrollbar-width: thin; + scrollbar-color: #c2ccd6 transparent; +} + +/* WebKit / Chromium / Edge */ +*::-webkit-scrollbar { + width: 9px; + height: 9px; +} + +*::-webkit-scrollbar-track { + background: transparent; +} + +*::-webkit-scrollbar-thumb { + background-color: #c2ccd6; + border-radius: 8px; + border: 2px solid transparent; + background-clip: content-box; +} + +*::-webkit-scrollbar-thumb:hover { + background-color: #18b5c4; +} + +*::-webkit-scrollbar-corner { + background: transparent; +} + +/* ===== END: App-wide sleek scrollbar ====================================== */ + +/* ===== Report column layout builder (Configuration > Report Columns) ===== */ +.report-columns { + max-width: 680px; + max-height: calc(100vh - 320px); + min-height: 180px; + overflow-y: auto; + padding-right: 6px; +} + +.report-col-row { + background: #f8fafc; + border: 1px solid #e3eaf2; + border-radius: 6px; + padding: 6px 10px; +} + +.report-col-handle { + cursor: grab; +} + +.report-col-handle:active { + cursor: grabbing; } - .file-icon-delete:hover { - color: #f72828; - } +.report-col-key { + min-width: 120px; + flex: 0 0 auto; +} -.file-icon { - width: 70px; - height: 70px; +.report-col-title { + max-width: 280px; +} + +.report-col-placeholder { + border: 1px dashed #9bb4cc; + background: #eaf1f8; + border-radius: 6px; + margin-bottom: 8px; +} + +.report-col-name { + flex: 1 1 auto; + min-width: 0; +} + +.report-layout-editor .report-columns { + max-width: none; + max-height: 55vh; +} + +/* ============================================================================ + Header tools — global navbar search / quick-create / alerts. + ============================================================================ */ +.header-tools { display: flex; align-items: center; - justify-content: center; - font-size: 40px; + gap: .6rem; + flex: 1 1 auto; + min-width: 0; + padding: 0 .5rem; +} + +.header-search { + position: relative; + flex: 1 1 auto; + max-width: 520px; +} + +.header-search__icon { + position: absolute; + left: .7rem; + top: 50%; + transform: translateY(-50%); + color: #9aa6b8; + font-size: .8rem; + pointer-events: none; +} + +.header-search .form-control { + padding-left: 2rem; + height: 36px; + border-radius: 20px; + background: #f4f7fb; + border: 1px solid #e6e9ef; +} + +.header-search .form-control:focus { + background: #fff; + border-color: var(--wp-teal); + box-shadow: 0 0 0 .15rem rgba(28, 199, 201, .15); +} + +.header-search__kbd { + position: absolute; + right: .6rem; + top: 50%; + transform: translateY(-50%); + font-size: .62rem; + line-height: 1; + padding: .2rem .35rem; + color: #9aa6b8; + background: #eef1f6; + border: 1px solid #e0e5ec; + border-radius: 5px; + pointer-events: none; +} + +.header-search .form-control:focus ~ .header-search__kbd { display: none; } + +.header-search .form-control { padding-right: 3rem; } + +.wp-menu .dropdown-item:has(.wp-menu__kbd) { display: flex; align-items: center; } + +.wp-menu__kbd { + margin-left: auto; + font-size: .62rem; + line-height: 1; + padding: .18rem .35rem; + color: #9aa6b8; + background: #eef1f6; + border: 1px solid #e0e5ec; + border-radius: 5px; +} + +.header-search__results { + position: absolute; + top: calc(100% + 6px); + left: 0; + right: 0; + display: none; + z-index: 1050; + max-height: 380px; + overflow-y: auto; + padding: .25rem; + background: #fff; + border: 1px solid #e6e9ef; + border-radius: 10px; + box-shadow: 0 8px 24px rgba(16, 24, 40, .12); +} + +.header-search__results.show { display: block; } + +.header-search__group { + padding: .4rem .6rem .2rem; + font-size: .68rem; + text-transform: uppercase; + letter-spacing: .03em; + color: #9aa6b8; +} + +.header-search__item { + display: flex; + align-items: center; + gap: .5rem; + padding: .45rem .6rem; + border-radius: 8px; + text-decoration: none; + color: #2a3b52; +} + +.header-search__item:hover, +.header-search__item.active { background: rgba(28, 199, 201, .12); } +.header-search__item i { width: 18px; text-align: center; color: var(--wp-teal); } +.header-search__item .hs-label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.header-search__item .hs-sub { color: #9aa6b8; font-size: .78rem; white-space: nowrap; } +.header-search__empty { padding: .6rem; color: #9aa6b8; text-align: center; } + +.header-tools__right { + display: flex; + align-items: center; + gap: .4rem; + margin-left: auto; +} + +.header-create { + border-radius: 8px; + border: none; + color: #fff; + background-image: var(--wp-accent-gradient); + box-shadow: 0 1px 3px rgba(28, 199, 201, .35); +} + +.header-create:hover, +.header-create:focus, +.header-create:active, +.header-create.show { color: #fff; + background-image: var(--wp-accent-gradient); + filter: brightness(1.06); +} + +.header-bell { + position: relative; + background: #f4f7fb; + border: 1px solid #e6e9ef; border-radius: 8px; - text-align: center; - flex-shrink: 0; + color: #2a3b52; } - .file-icon a { - color: #fff; - text-decoration: none !important; - } +.header-bell:hover, +.header-bell.show { + color: var(--wp-teal); + background: rgba(28, 199, 201, .12); + border-color: rgba(28, 199, 201, .35); +} - .file-icon.pdf { - background-color: #e74c3c; - } +.header-bell__badge { + position: absolute; + top: -7px; + right: -6px; + min-width: 16px; + height: 16px; + padding: 0 4px; + font-size: .62rem; + line-height: 16px; + text-align: center; + background: #e55353; + color: #fff; + border-radius: 9px; +} - .file-icon.doc { - background-color: #3498db; - } +.header-alerts { min-width: 240px; } - .file-icon.xls { - background-color: #2ecc71; - } +@media (max-width: 575.98px) { + .header-search { display: none; } +} - .file-icon.img { - background-color: #f39c12; - } +/* ============================================================================ + Modern header dropdown menus (quick-create / alerts / user). + ============================================================================ */ +.wp-menu.dropdown-menu { + border: 1px solid #e6e9ef; + border-radius: 14px; + box-shadow: 0 12px 32px rgba(16, 24, 40, .14); + padding: .35rem; + min-width: 220px; + margin-top: .45rem; +} - .file-icon.txt { - background-color: #95a5a6; - } +.wp-menu.dropdown-menu.wp-menu--compact { min-width: 184px; } - .file-icon.other { - background-color: #8e44ad; - } +.wp-menu.dropdown-menu.show { animation: wpMenuIn .18s cubic-bezier(.2, .8, .2, 1); } -.alert-info { +@keyframes wpMenuIn { + from { opacity: 0; translate: 0 -7px; } + to { opacity: 1; translate: 0 0; } +} + +.wp-menu .dropdown-item { display: flex; align-items: center; - justify-content: space-between; - padding: 10px 20px; + gap: .6rem; + padding: .5rem .6rem; + border-radius: 9px; + font-size: .88rem; + color: #2a3b52; } -.avatar-card { - width: 40px; - height: 40px; - border-radius: 50%; - margin-right: 10px; +.wp-menu .dropdown-item:hover, +.wp-menu .dropdown-item:focus { + background: rgba(28, 199, 201, .12); + color: #2a3b52; } -.greeting-container { +.wp-menu__label { display: flex; align-items: center; + justify-content: space-between; + padding: .35rem .6rem .3rem; + font-size: .66rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: .04em; + color: #9aa6b8; } -.greeting-text { - margin: 0; - font-weight: bold; +.wp-menu__chip { + flex: 0 0 auto; + width: 30px; + height: 30px; + display: inline-flex; + align-items: center; + justify-content: center; + border-radius: 8px; + font-size: .8rem; + background: rgba(28, 199, 201, .12); + color: var(--wp-teal); } -.sidebar-brand-full { - margin-left: 3rem; +.wp-menu__chip--teal { background: rgba(28, 199, 201, .12); color: var(--wp-teal); } +.wp-menu__chip--blue { background: rgba(51, 153, 255, .14); color: #3399ff; } +.wp-menu__chip--green { background: rgba(46, 184, 92, .14); color: #2eb85c; } +.wp-menu__chip--amber { background: rgba(255, 194, 26, .18); color: #c47f00; } +.wp-menu__chip--red { background: rgba(229, 83, 83, .14); color: #e55353; } + +.wp-menu__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; } +.wp-menu__title { font-weight: 600; } +.wp-menu__chevron { margin-left: auto; color: #c2cad6; font-size: .72rem; } + +.wp-menu__divider { height: 1px; margin: .3rem .2rem; border: 0; background: #eef1f6; } + +.wp-menu__identity { + display: flex; + align-items: center; + gap: .6rem; + padding: .6rem; + margin-bottom: .2rem; + border-radius: 10px; + background: linear-gradient(90deg, rgba(28, 199, 201, .10), rgba(255, 194, 26, .08)); } -.text-line-container { +.wp-menu__identity img { width: 40px; height: 40px; border-radius: 50%; } +.wp-menu__identity .wp-id-name { font-weight: 700; color: #2a3b52; line-height: 1.15; } +.wp-menu__identity .wp-id-mail { font-size: .74rem; color: #7b8aa0; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + +.wp-menu .dropdown-item.wp-menu__danger { color: #e55353; } +.wp-menu .dropdown-item.wp-menu__danger:hover { background: rgba(229, 83, 83, .12); color: #e55353; } + +.wp-menu__empty { display: flex; + flex-direction: column; align-items: center; + gap: .35rem; + padding: 1.1rem .6rem; + color: #9aa6b8; text-align: center; - width: 100%; } - .text-line-container::before, - .text-line-container::after { - content: ''; - flex: 1; - border-bottom: 1px dashed #6c757d; - /* Adjust color and thickness */ - margin: 0 10px; - } +.wp-menu__empty i { font-size: 1.4rem; color: #2eb85c; } -.text-line { - white-space: nowrap; +.tp-wrap { + position: relative; } -.card-count a { - text-decoration: none; +.tp-wrap .form-control { + padding-right: 2rem; +} + +.tp-wrap .tp-icon { + position: absolute; + right: 0.75rem; + top: 50%; + transform: translateY(-50%); + color: #768192; + cursor: pointer; + pointer-events: auto; +} + +.tp-menu { + position: absolute; + z-index: 1080; + top: 100%; + left: 0; + right: 0; + max-height: 200px; + overflow-y: auto; + margin-top: 2px; + background: #fff; + border: 1px solid #d8dbe0; + border-radius: 0.375rem; + box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); +} + +.tp-option { + padding: 0.35rem 0.75rem; + font-size: 0.875rem; + cursor: pointer; +} + +.tp-option:hover { + background: #ebedef; +} + +/* Release plan filter card: uniform control height across select2 + datepicker inputs */ +#releaseFilterCard .form-control, +#releaseFilterCard .select2-container--default .select2-selection--single, +#releaseFilterCard .select2-container--default .select2-selection--multiple { + min-height: 38px; + height: auto; +} +#releaseFilterCard .form-label { font-weight: 500; } + +/* Team availability filter: uniform control height across select2 + inputs */ +#tavFilter .form-control, +#tavFilter .select2-container--default .select2-selection--single, +#tavFilter .select2-container--default .select2-selection--multiple { + min-height: 38px; + height: auto; +} + +/* ---- Closing pop-up (task page + board) ---- */ +.closing-hero { + display: flex; + align-items: center; + gap: 12px; + padding: 12px 14px; + margin-bottom: 12px; + border-radius: 12px; + background: linear-gradient(120deg, #eef2ff 0%, #f5f3ff 55%, #ecfdf5 100%); + border: 1px solid #e0e7ff; +} +.closing-hero__icon { + flex: 0 0 auto; + width: 42px; + height: 42px; + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + background: #4f46e5; color: #fff; + font-size: 1.1rem; + box-shadow: 0 6px 14px rgba(79, 70, 229, .3); +} +.closing-hero__text { min-width: 0; } +.closing-hero__title { font-weight: 600; color: #1e1b4b; } +.closing-hero__status { display: inline-block; padding: 0 8px; border-radius: 6px; background: #4f46e5; color: #fff; font-size: .85em; } +.closing-hero__task { font-size: .8rem; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } + +.closing-steps { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; } +.closing-steps__item { + display: inline-flex; + align-items: center; + gap: 6px; + padding: 4px 10px; + border-radius: 999px; + font-size: .8rem; + font-weight: 600; + border: 1px solid transparent; +} +.closing-steps__item span { font-weight: 400; opacity: .85; } +.closing-steps__item.is-done { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; } +.closing-steps__item.is-missing { background: #fef2f2; border-color: #fecaca; color: #b91c1c; } + +.closing-field { + border: 1px solid #e5e7eb; + border-left: 4px solid var(--closing-accent, #64748b); + border-radius: 10px; + padding: 10px 12px; + margin-bottom: 12px; + background: #fff; +} +.closing-field--cause { --closing-accent: #f59e0b; } +.closing-field--fix { --closing-accent: #10b981; } +.closing-field--mr { --closing-accent: #7c3aed; } +.closing-field__label { display: block; font-weight: 600; color: #0f172a; margin-bottom: 2px; } +.closing-field__label i { color: var(--closing-accent); } +.closing-field__hint { font-size: .78rem; color: #64748b; margin-bottom: 8px; } + +.closing-mr-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; } +.closing-mr { + display: flex; + align-items: flex-start; + gap: 10px; + margin: 0; + padding: 8px 10px; + border: 1px solid #e5e7eb; + border-radius: 8px; cursor: pointer; + transition: border-color .15s, background .15s; +} +.closing-mr:hover { border-color: #c4b5fd; } +.closing-mr.is-selected { border-color: #7c3aed; background: #f5f3ff; } +.closing-mr input[type="radio"] { margin-top: 3px; accent-color: #7c3aed; } +.closing-mr__body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; } +.closing-mr__title { font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.closing-mr__meta { font-size: .74rem; color: #64748b; display: flex; flex-wrap: wrap; gap: 6px; } +.closing-mr__tag { color: #6d28d9; font-weight: 600; } +.closing-mr__manual { margin-top: 6px; max-width: 200px; } +.closing-mr--manual { border-style: dashed; } + +.closing-actions { display: flex; justify-content: flex-end; gap: 6px; } + +/* ---- Closing summary (read-only) ---- */ +.closing-view { display: flex; flex-direction: column; gap: 10px; } +.closing-view__block { + border: 1px solid #e5e7eb; + border-left: 4px solid var(--closing-accent, #64748b); + border-radius: 10px; + padding: 10px 12px; + background: #fff; +} +.closing-view__block--cause { --closing-accent: #f59e0b; } +.closing-view__block--fix { --closing-accent: #10b981; } +.closing-view__block--mr { --closing-accent: #7c3aed; } +.closing-view__title { font-weight: 600; margin-bottom: 6px; color: #0f172a; } +.closing-view__title i { color: var(--closing-accent); } +.closing-view__body { font-size: .88rem; overflow-wrap: anywhere; } +.closing-view__body img { max-width: 100%; height: auto; } +.closing-view__body p:last-child { margin-bottom: 0; } + +/* ---- Status master: closing requirements grid ---- */ +.closing-rules { border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; } +.closing-rules__head { padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; } +.closing-rules__title { font-weight: 600; color: #0f172a; } +.closing-rules__sub { font-size: .78rem; color: #64748b; } +.closing-rules__grid { width: 100%; border-collapse: collapse; } +.closing-rules__grid th, .closing-rules__grid td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; } +.closing-rules__grid thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #64748b; text-align: center; } +.closing-rules__grid thead th:first-child { text-align: left; } +.closing-rules__grid tbody th { font-weight: 500; color: #334155; } +.closing-rules__grid tbody th i { color: #94a3b8; width: 16px; } +.closing-rules__grid td { text-align: center; width: 90px; } +.closing-rules__grid td .form-check-input { float: none; margin: 0; width: 1.15em; height: 1.15em; cursor: pointer; } +.closing-rules__grid tbody tr:hover { background: #f8fafc; } +.closing-rules__foot { padding: 8px 12px; font-size: .74rem; color: #64748b; background: #fcfcfd; } + +.member-perm-group { margin: 0 0 .9rem; padding: .55rem .75rem .65rem; border: 1px solid #e2e8f0; border-radius: .5rem; } +.member-perm-group .form-check { margin-bottom: 0; } +.member-perm-title { float: none; width: auto; margin: 0 0 .45rem; padding: 0; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #64748b; } +.integration-section-title { margin: 1.25rem 0 .75rem; padding-top: .75rem; border-top: 1px solid #e2e8f0; font-weight: 600; color: #334155; } +.closing-gitlab-detail { margin-top: 2px; font-size: .74rem; opacity: .85; overflow-wrap: anywhere; } + +/* SweetAlert must sit above jquery-confirm dialogs (z-index 99999999), or errors raised from an open dialog are hidden behind it. */ +.swal2-container { z-index: 100000010 !important; } + +/* Tooltips are appended to ; Bootstrap's default z-index (1080) puts them behind jquery-confirm dialogs. */ +.tooltip { z-index: 100000005; } + +/* ---- GitLab connection (profile pop-up + branch dialogs) ---- */ +.branch-connect { text-align: left; } +.branch-connect__text { padding: .6rem .75rem; border-radius: .5rem; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; } +.gitlab-connection__status { display: flex; gap: .75rem; align-items: center; padding: .65rem .8rem; border-radius: .6rem; margin-bottom: 1rem; border: 1px solid; } +.gitlab-connection__status > i { font-size: 1.6rem; } +.gitlab-connection__status.is-ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; } +.gitlab-connection__status.is-expiring { background: #fffbeb; border-color: #fde68a; color: #92400e; } +.gitlab-connection__status.is-expired { background: #fef2f2; border-color: #fecaca; color: #991b1b; } +.gitlab-guide { counter-reset: gl-step; list-style: none; padding: 0; margin: 0 0 1rem; } +.gitlab-guide > li { position: relative; padding: .55rem .75rem .55rem 2.6rem; border: 1px solid #e2e8f0; border-radius: .55rem; margin-bottom: .5rem; background: #fff; } +.gitlab-guide > li::before { counter-increment: gl-step; content: counter(gl-step); position: absolute; left: .7rem; top: .55rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #6366f1; color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; } +.gitlab-guide__title { font-weight: 600; color: #0f172a; } +.gitlab-guide__text { font-size: .82rem; color: #475569; } +.gitlab-guide__scopes { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; } +.gitlab-scope { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; padding: .15rem .5rem; border-radius: .4rem; border: 1px solid #e2e8f0; background: #f8fafc; color: #64748b; } +.gitlab-scope--on { background: #eef2ff; border-color: #a5b4fc; color: #3730a3; font-weight: 600; } +.gitlab-guide__note { font-size: .78rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: .4rem; padding: .3rem .5rem; margin-top: .35rem; } + +/* ---- Create merge request dialog ---- */ +.mr-dialog__branches { display: flex; align-items: flex-end; gap: .6rem; margin: .75rem 0; } +.mr-dialog__branches code { display: inline-block; font-size: .78rem; background: #f1f5f9; padding: .3rem .5rem; border-radius: .35rem; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; } +.mr-dialog__branches > i { margin-bottom: .45rem; } +.mr-dialog__label { display: block; font-size: .72rem; color: #64748b; margin-bottom: .2rem; } +.mr-dialog__meta { font-size: .8rem; color: #475569; margin-top: .6rem; } +.mr-dialog__note { margin-top: .6rem; font-size: .8rem; padding: .4rem .6rem; border-radius: .45rem; background: #eef2ff; color: #3730a3; transition: opacity .15s; } +.mr-dialog__note.is-muted { opacity: .4; text-decoration: line-through; } + +/* ---- Create branch: tasks that already have a branch / are in review ---- */ +.branch-existing { border: 1px solid #c7d2fe; background: #eef2ff; color: #312e81; border-radius: .5rem; padding: .5rem .7rem; font-size: .82rem; margin-bottom: .6rem; } +.branch-existing--all { border-color: #fde68a; background: #fffbeb; color: #78350f; } + +/* Tick boxes in dialogs sit inside small text and shrink with it; give them a fixed, easy-to-hit size. */ +.jconfirm .form-check, +.review-merge .form-check { display: flex; align-items: center; gap: .45rem; padding-left: 0; min-height: 1.5rem; } +.jconfirm .form-check .form-check-input, +.review-merge .form-check .form-check-input { float: none; flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: 0; cursor: pointer; } +.jconfirm .form-check .form-check-label, +.review-merge .form-check .form-check-label { cursor: pointer; } +.branch-existing .form-check-label { font-weight: 600; } +.jconfirm .form-check-inline, +.review-merge .form-check-inline { display: inline-flex; margin-right: 1rem; } + +/* File tiles inside a side panel or pop-up: there is plenty of height, so wrap into a grid instead of one scrolling row. */ +.offcanvas .thumbnail-container, +.jconfirm .thumbnail-container { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + gap: .9rem .75rem; + overflow-x: visible; + flex-wrap: wrap; +} +.offcanvas .thumbnail-container .file-tile, +.jconfirm .thumbnail-container .file-tile { width: auto; } +.offcanvas .thumbnail-container, +.jconfirm .thumbnail-container { white-space: normal; } + +/* File tiles: keep the Open / Delete buttons out of the picture so a click on the picture always opens the preview. */ +.file-tile .file-tile-actions { + position: static; + display: flex; + justify-content: center; + gap: 6px; + margin-top: 4px; + opacity: 0; + transition: opacity .12s; +} +.file-tile:hover .file-tile-actions, +.file-tile:focus-within .file-tile-actions { opacity: 1; } +@media (hover: none) { .file-tile .file-tile-actions { opacity: 1; } } +.file-tile .file-tile-link { cursor: zoom-in; } +.file-tile .file-tile-link[target="_blank"] { cursor: pointer; } + +/* ---- Header activity notifications ---- */ +.header-alerts { min-width: 340px; } +.header-notif__head { display: flex; align-items: center; gap: .4rem; padding: .5rem .9rem .3rem; border-top: 1px solid #eef1f5; margin-top: .25rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #768192; } +.header-notif__readall { font-size: .72rem; text-transform: none; letter-spacing: 0; text-decoration: none; } +.header-notif { max-height: 360px; overflow-y: auto; } +.header-notif__loading, .header-notif__empty { padding: .6rem .9rem; font-size: .8rem; color: #8a93a2; } +.header-notif__item { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem .9rem; color: #2a3b52; text-decoration: none; position: relative; } +.header-notif__item:hover { background: #f4f7fb; color: #2a3b52; } +.header-notif__item.is-unread { background: #f3f8ff; } +.header-notif__item.is-unread::before { content: ""; position: absolute; left: .3rem; top: 1rem; width: .4rem; height: .4rem; border-radius: 50%; background: #3399ff; } +.header-notif__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; } +.header-notif__title { font-size: .8rem; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } +.header-notif__item.is-unread .header-notif__title { font-weight: 600; } +.header-notif__msg { font-size: .74rem; color: #8a93a2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.header-notif__age { flex: 0 0 auto; font-size: .7rem; color: #a0a8b4; } +.wp-menu__chip--grey { background: #eef1f5; color: #768192; } +@media (max-width: 575.98px) { .header-alerts { min-width: 290px; } } + +/* ===== Empty / setup / error states (, EmptyStateTagHelper) ===== + Theme-aware: colours come from CoreUI variables and the user's accent, so light/dark/accents need no extra rules. */ +.wp-empty { + --wp-empty-tint: var(--app-accent, var(--cui-primary)); + --wp-empty-tint-rgb: var(--app-accent-rgb, var(--cui-primary-rgb)); + max-width: 560px; + margin: 2.5rem auto; + padding: 2.25rem 2rem; + text-align: center; + background: var(--cui-body-bg); + border: 1px solid var(--cui-border-color); + border-radius: .75rem; + box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06); + animation: wp-empty-in .25s ease-out both; +} + +.wp-empty--info { --wp-empty-tint: var(--cui-info); --wp-empty-tint-rgb: var(--cui-info-rgb); } +.wp-empty--warning { --wp-empty-tint: #d39e00; --wp-empty-tint-rgb: 211, 158, 0; } +.wp-empty--danger { --wp-empty-tint: var(--cui-danger); --wp-empty-tint-rgb: var(--cui-danger-rgb); } + +.wp-empty__icon { + width: 72px; + height: 72px; + margin: 0 auto 1.1rem; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + font-size: 1.75rem; + color: var(--wp-empty-tint); + background: rgba(var(--wp-empty-tint-rgb), .12); + box-shadow: 0 0 0 8px rgba(var(--wp-empty-tint-rgb), .06); +} + +.wp-empty__title { + margin-bottom: .4rem; + font-weight: 600; + color: var(--cui-emphasis-color, var(--cui-body-color)); +} + +.wp-empty__text { + max-width: 440px; + margin: 0 auto; + color: var(--cui-secondary-color); + line-height: 1.55; +} + +.wp-empty__extra { margin-top: 1.25rem; } + +.wp-empty__steps { + display: grid; + gap: .5rem; + max-width: 420px; + margin: 0 auto; + padding: 0; + list-style: none; + counter-reset: wp-empty-step; + text-align: left; } -.hr-text { - line-height: 1em; +.wp-empty__steps li { position: relative; - outline: 0; + padding: .55rem .75rem .55rem 2.6rem; + border: 1px solid var(--cui-border-color); + border-radius: .5rem; + background: var(--cui-tertiary-bg); + font-size: .875rem; + counter-increment: wp-empty-step; +} + +.wp-empty__steps li::before { + content: counter(wp-empty-step); + position: absolute; + left: .7rem; + top: 50%; + transform: translateY(-50%); + width: 1.35rem; + height: 1.35rem; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + font-size: .75rem; + font-weight: 600; + color: #fff; + background: var(--wp-empty-tint); +} + +.wp-empty__actions { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + gap: .5rem 1rem; + margin-top: 1.5rem; +} + +.wp-empty__link { + font-size: .875rem; + text-decoration: none; +} + +.wp-empty__link:hover { text-decoration: underline; } + +.wp-empty__note { + font-size: .85rem; + color: var(--cui-secondary-color); +} + +/* Compact: inside cards, tabs, grids and dashboard widgets */ +.wp-empty--compact { + max-width: none; + margin: 0; + padding: 1.75rem 1rem; + background: transparent; border: 0; - color: black; - text-align: center; - height: 1.5em; - opacity: 0.8; + box-shadow: none; } - .hr-text:before { - content: ""; - background: linear-gradient(to right, transparent, #0062bf, transparent); - position: absolute; - left: 0; - top: 50%; - width: 100%; - height: 1px; - } +.wp-empty--compact .wp-empty__icon { + width: 52px; + height: 52px; + margin-bottom: .75rem; + font-size: 1.25rem; + box-shadow: 0 0 0 6px rgba(var(--wp-empty-tint-rgb), .06); +} - .hr-text:after { - content: attr(data-content); - position: relative; - display: inline-block; - color: black; - padding: 0 0.5em; - line-height: 1.5em; - color: #818078; - background-color: #fcfcfa; - } +.wp-empty--compact .wp-empty__title { font-size: 1rem; } +.wp-empty--compact .wp-empty__text { font-size: .875rem; } +.wp-empty--compact .wp-empty__actions { margin-top: 1rem; } + +/* Full-page: error / access pages */ +.wp-empty--page { + margin-top: 8vh; +} + +.wp-empty--page .wp-empty__icon { + width: 96px; + height: 96px; + font-size: 2.4rem; +} + +@keyframes wp-empty-in { + from { opacity: 0; transform: translateY(6px); } + to { opacity: 1; transform: none; } +} + +@media (prefers-reduced-motion: reduce) { + .wp-empty { animation: none; } +} + +@media (max-width: 575.98px) { + .wp-empty { margin: 1rem auto; padding: 1.5rem 1rem; } +} + +.wp-empty__details { + max-width: 480px; + margin: 1rem auto 0; + text-align: left; + font-size: .8rem; +} + +.wp-empty__details summary { + cursor: pointer; + color: var(--cui-secondary-color); + text-align: center; +} + +.wp-empty__details pre { + margin-top: .5rem; + padding: .75rem; + max-height: 200px; + overflow: auto; + white-space: pre-wrap; + border-radius: .375rem; + background: var(--cui-tertiary-bg); + color: var(--cui-body-color); +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/theme-dark.css b/src/Presentation/Taskist.Web/wwwroot/css/theme-dark.css new file mode 100644 index 0000000..adcbda1 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/theme-dark.css @@ -0,0 +1,261 @@ +/* Hand-made dark-mode styles: third-party widgets that ship light-only CSS, and fixes the generator can't infer. + Everything is scoped to [data-coreui-theme=dark]. Generated twins of our own rules live in theme-dark.generated.css. */ + +[data-coreui-theme=dark] { + --app-dark-surface: var(--cui-body-bg); + --app-dark-raised: var(--cui-tertiary-bg); + --app-dark-border: var(--cui-border-color); + --app-dark-text: var(--cui-body-color); + --app-dark-muted: var(--cui-secondary-color); + color-scheme: dark; +} + +/* CoreUI 5.1 keeps the light "subtle" palette in dark mode (alerts, subtle badges, list-group variants) */ +[data-coreui-theme=dark] { + --cui-secondary-text-emphasis: #a7acb1; + --cui-secondary-bg-subtle: #161719; + --cui-secondary-border-subtle: #41464b; + --cui-success-text-emphasis: #75b798; + --cui-success-bg-subtle: #051b11; + --cui-success-border-subtle: #0f5132; + --cui-info-text-emphasis: #6edff6; + --cui-info-bg-subtle: #032830; + --cui-info-border-subtle: #087990; + --cui-warning-text-emphasis: #ffda6a; + --cui-warning-bg-subtle: #332701; + --cui-warning-border-subtle: #997404; + --cui-danger-text-emphasis: #ea868f; + --cui-danger-bg-subtle: #2c0b0e; + --cui-danger-border-subtle: #842029; + --cui-light-text-emphasis: #f8f9fa; + --cui-light-bg-subtle: #343a40; + --cui-light-border-subtle: #495057; + --cui-dark-text-emphasis: #dee2e6; + --cui-dark-bg-subtle: #1a1d20; + --cui-dark-border-subtle: #343a40; +} + +/* select2 */ +[data-coreui-theme=dark] .select2-container--default .select2-selection--single, +[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple, +[data-coreui-theme=dark] .select2-dropdown { + background-color: var(--app-dark-surface); + border-color: var(--app-dark-border); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .select2-container--default .select2-selection--single .select2-selection__rendered, +[data-coreui-theme=dark] .select2-container--default .select2-results__option, +[data-coreui-theme=dark] .select2-container--default .select2-search--inline .select2-search__field { + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .select2-container--default .select2-selection--single .select2-selection__placeholder, +[data-coreui-theme=dark] .select2-container--default .select2-search--inline .select2-search__field::placeholder { + color: var(--app-dark-muted); +} + +[data-coreui-theme=dark] .select2-container--default .select2-selection--single .select2-selection__arrow b { + border-color: var(--app-dark-muted) transparent transparent transparent; +} + +[data-coreui-theme=dark] .select2-container--default .select2-search--dropdown .select2-search__field { + background-color: var(--app-dark-raised); + border-color: var(--app-dark-border); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .select2-container--default .select2-results__option[aria-selected=true], +[data-coreui-theme=dark] .select2-container--default .select2-results__option--selected { + background-color: var(--app-dark-raised); +} + +[data-coreui-theme=dark] .select2-container--default.select2-container--disabled .select2-selection--single, +[data-coreui-theme=dark] .select2-container--default.select2-container--disabled .select2-selection--multiple { + background-color: var(--cui-secondary-bg); +} + +[data-coreui-theme=dark] .select2-container--default .select2-selection__clear, +[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { + color: var(--app-dark-muted); +} + +/* DataTables */ +[data-coreui-theme=dark] table.dataTable, +[data-coreui-theme=dark] .dataTables_wrapper { + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .dataTables_wrapper .dataTables_length select, +[data-coreui-theme=dark] .dataTables_wrapper .dataTables_filter input { + background-color: var(--app-dark-surface); + border-color: var(--app-dark-border); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] table.dataTable > tbody > tr.selected > * { + box-shadow: inset 0 0 0 9999px rgba(var(--app-accent-rgb), .25); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] div.dataTables_processing, +[data-coreui-theme=dark] div.dt-processing { + background-color: var(--app-dark-raised); + color: var(--app-dark-text); +} + +/* jquery-confirm */ +[data-coreui-theme=dark] .jconfirm.jconfirm-bootstrap .jconfirm-box, +[data-coreui-theme=dark] .jconfirm.jconfirm-light .jconfirm-box, +[data-coreui-theme=dark] .jconfirm .jconfirm-box { + background: var(--app-dark-surface); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .jconfirm .jconfirm-box div.jconfirm-title-c, +[data-coreui-theme=dark] .jconfirm .jconfirm-box div.jconfirm-content { + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .jconfirm .jconfirm-box div.jconfirm-closeIcon { + color: var(--app-dark-muted); +} + +[data-coreui-theme=dark] .jconfirm .jconfirm-bg { + background-color: #000; +} + +[data-coreui-theme=dark] .jconfirm .jc-form-scroll .form-modal-actions { + background: var(--app-dark-surface); + border-top-color: var(--app-dark-border); +} + +/* SweetAlert2 */ +[data-coreui-theme=dark] .swal2-popup { + background: var(--app-dark-surface); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .swal2-title, +[data-coreui-theme=dark] .swal2-html-container { + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .swal2-input, +[data-coreui-theme=dark] .swal2-textarea, +[data-coreui-theme=dark] .swal2-select { + background: var(--app-dark-raised); + border-color: var(--app-dark-border); + color: var(--app-dark-text); +} + +/* bootstrap-datepicker */ +[data-coreui-theme=dark] .datepicker.dropdown-menu, +[data-coreui-theme=dark] .datepicker-dropdown { + background-color: var(--app-dark-surface); + border-color: var(--app-dark-border); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .datepicker-dropdown.datepicker-orient-bottom:after { border-bottom-color: var(--app-dark-surface); } +[data-coreui-theme=dark] .datepicker-dropdown.datepicker-orient-top:after { border-top-color: var(--app-dark-surface); } + +[data-coreui-theme=dark] .datepicker table tr td.day:hover, +[data-coreui-theme=dark] .datepicker table tr td.focused, +[data-coreui-theme=dark] .datepicker table tr td span:hover, +[data-coreui-theme=dark] .datepicker table tr td span.focused, +[data-coreui-theme=dark] .datepicker .datepicker-switch:hover, +[data-coreui-theme=dark] .datepicker .prev:hover, +[data-coreui-theme=dark] .datepicker .next:hover, +[data-coreui-theme=dark] .datepicker tfoot tr th:hover { + background: var(--app-dark-raised); +} + +[data-coreui-theme=dark] .datepicker table tr td.old, +[data-coreui-theme=dark] .datepicker table tr td.new { + color: var(--app-dark-muted); +} + +[data-coreui-theme=dark] .datepicker table tr td.today { + background: rgba(255, 194, 26, .25); + color: var(--app-dark-text); +} + +/* Dropzone */ +[data-coreui-theme=dark] .dropzone { + background: var(--app-dark-surface); + border-color: var(--app-dark-border); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .dropzone .dz-preview.dz-image-preview { + background: transparent; +} + +/* Native form controls and scrollbars */ +[data-coreui-theme=dark] input[type=date], +[data-coreui-theme=dark] input[type=time], +[data-coreui-theme=dark] input[type=number] { + color-scheme: dark; +} + +[data-coreui-theme=dark] .simplebar-scrollbar:before { + background: rgba(255, 255, 255, .5); +} + +/* Bootstrap/CoreUI utility classes our markup uses for light surfaces */ +[data-coreui-theme=dark] .bg-white, +[data-coreui-theme=dark] .bg-light { + background-color: var(--app-dark-raised) !important; +} + +[data-coreui-theme=dark] .text-dark { + color: var(--app-dark-text) !important; +} + +[data-coreui-theme=dark] .badge.text-dark, +[data-coreui-theme=dark] .bg-warning.text-dark, +[data-coreui-theme=dark] .text-bg-warning, +[data-coreui-theme=dark] .text-bg-light { + color: #212631 !important; +} + +[data-coreui-theme=dark] .btn-light { + --cui-btn-color: var(--app-dark-text); + --cui-btn-bg: var(--app-dark-raised); + --cui-btn-border-color: var(--app-dark-border); + --cui-btn-hover-color: var(--app-dark-text); + --cui-btn-hover-bg: var(--cui-secondary-bg); + --cui-btn-hover-border-color: var(--app-dark-border); +} + +/* FullCalendar (timeline, team availability) */ +[data-coreui-theme=dark] .fc { + --fc-page-bg-color: var(--app-dark-surface); + --fc-neutral-bg-color: var(--app-dark-raised); + --fc-neutral-text-color: var(--app-dark-muted); + --fc-border-color: var(--app-dark-border); + --fc-today-bg-color: rgba(255, 194, 26, .12); + --fc-list-event-hover-bg-color: var(--app-dark-raised); + --fc-highlight-color: rgba(var(--app-accent-rgb), .2); + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .fc .fc-col-header, +[data-coreui-theme=dark] .fc .fc-col-header-cell, +[data-coreui-theme=dark] .fc .fc-scrollgrid-section-header > th, +[data-coreui-theme=dark] .fc .fc-list-day-cushion, +[data-coreui-theme=dark] .fc .fc-timegrid-axis { + background-color: var(--app-dark-raised); +} + +[data-coreui-theme=dark] .fc .fc-col-header-cell-cushion, +[data-coreui-theme=dark] .fc .fc-daygrid-day-number, +[data-coreui-theme=dark] .fc .fc-list-day-text, +[data-coreui-theme=dark] .fc .fc-list-day-side-text { + color: var(--app-dark-text); +} + +[data-coreui-theme=dark] .fc .fc-day-other .fc-daygrid-day-number { + color: var(--app-dark-muted); +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/theme-dark.generated.css b/src/Presentation/Taskist.Web/wwwroot/css/theme-dark.generated.css new file mode 100644 index 0000000..872f327 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/theme-dark.generated.css @@ -0,0 +1,1741 @@ +/* GENERATED by tools/theme/generate-dark-css.py - do not edit. Hand-made dark fixes go in theme-dark.css. */ + +/* announcement.css */ +[data-coreui-theme=dark] .ann-banner { + border-bottom: 1px solid rgba(255, 255, 255, 0.06); +} +[data-coreui-theme=dark] .ann-banner__mega { + background: rgba(33, 38, 49, 0.7); +} +[data-coreui-theme=dark] .ann-banner__ack { + background: rgba(33, 38, 49, 0.65); + border: 1px solid rgba(255, 255, 255, 0.12); +} +[data-coreui-theme=dark] .ann-banner__ack:hover { + background: #212631; +} +[data-coreui-theme=dark] .ann-banner--info { + background: #203753; + color: #a2c1e2; +} +[data-coreui-theme=dark] .ann-banner--success { + background: #2f513d; + color: #b5e2c8; +} +[data-coreui-theme=dark] .ann-banner--success .ann-banner__icon, +[data-coreui-theme=dark] .ann-banner--success .ann-banner__mega { + color: #99e0b3; +} +[data-coreui-theme=dark] .ann-banner--warning { + background: #625224; + color: #f0dea8; +} +[data-coreui-theme=dark] .ann-banner--warning .ann-banner__icon, +[data-coreui-theme=dark] .ann-banner--warning .ann-banner__mega { + color: #e9ca81; +} +[data-coreui-theme=dark] .ann-banner--critical { + background: #52232b; + color: #dd9ca7; +} +[data-coreui-theme=dark] .ann-modal__body { + color: #bcc5d2; +} +[data-coreui-theme=dark] .ann-modal__footer { + border-top: 1px solid #3b4755; +} + +/* beta.css */ +[data-coreui-theme=dark] .beta-pill { + color: #f1e1af; + background: #52421b; + border: 1px solid #927e42; +} +[data-coreui-theme=dark] .beta-pill > i { + color: #eacb87; +} +[data-coreui-theme=dark] .beta-pill__report { + color: #f1e1af; +} +[data-coreui-theme=dark] .beta-pill__report:hover { + color: #f3e6bd; +} + +/* site.css */ +:root[data-coreui-theme=dark] { + --wp-grid-header: #2c3d3d; +} +[data-coreui-theme=dark] table.dataTable thead th { + color: #c0cad7; +} +[data-coreui-theme=dark] .duration-toggle .btn { + --cui-btn-border-color: #4f5c75; + --cui-btn-hover-bg: #28323c; +} +[data-coreui-theme=dark] .lt-chip-muted { + background: #2e343c; + color: #aab2bd; + border-color: #4a525e; +} +[data-coreui-theme=dark] .lt-tile { + background: #282f36; + border: 1px solid #434a54; +} +[data-coreui-theme=dark] .lt-tile-value { + color: #c0cad7; +} +[data-coreui-theme=dark] .lt-tile-ok .lt-tile-value { + color: #a9e5e6; +} +[data-coreui-theme=dark] .lt-tile-warn .lt-tile-value { + color: #e5cc8f; +} +[data-coreui-theme=dark] .lt-tile-danger .lt-tile-value { + color: #d4949a; +} +[data-coreui-theme=dark] .lt-progress { + background: #31363d; +} +[data-coreui-theme=dark] .subheader-title #pageTitle { + color: #c0cad7; +} +[data-coreui-theme=dark] .lt-suggest { + border: 1px solid #474d58; +} +[data-coreui-theme=dark] .lt-suggest-head { + color: #c0cad7; +} +[data-coreui-theme=dark] .lt-suggest-item { + border-top: 1px solid #3e4654; +} +[data-coreui-theme=dark] .lt-suggest-dates { + color: #c0cad7; +} +[data-coreui-theme=dark] .lt-suggest-ok { + color: #a2dcbd; +} +[data-coreui-theme=dark] .lt-suggest-warn { + color: #eac889; +} +[data-coreui-theme=dark] .btn-close { + color: #e8eaed; +} +[data-coreui-theme=dark] .validation-summary-errors { + background-color: #61552e; +} +[data-coreui-theme=dark] .select2-container .select2-selection--single { + border: 1px solid #515d77; +} +[data-coreui-theme=dark] .jconfirm .jc-form-scroll .form-modal-actions { + background: #212631; + border-top: 1px solid #484e54; +} +[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple { + border: 1px solid #515d77; +} +[data-coreui-theme=dark] .select2-container--default .select2-selection--multiple .select2-selection__choice { + background-color: #304271 !important; + color: #bbc0ca; + border: 1px solid #515d77; +} +[data-coreui-theme=dark] .timeline-item .widget-box { + background-color: #28333a; + color: #b3b8c3; +} +[data-coreui-theme=dark] .timeline-item .transparent.widget-box { + border-left: 3px solid #525c61; +} +[data-coreui-theme=dark] .timeline-item .transparent .widget-header { + background-color: #2f383e; +} +[data-coreui-theme=dark] .timeline-item:nth-child(even) .widget-box { + background-color: #2a303d; + color: #b2b7c2; +} +[data-coreui-theme=dark] .timeline-item:nth-child(even) .widget-box.transparent { + border-left-color: #4c576f !important; +} +[data-coreui-theme=dark] .timeline-item:nth-child(even) .widget-box.transparent .widget-header { + background-color: #2d3443 !important; +} +[data-coreui-theme=dark] .timeline-container:not(.timeline-style2) .timeline-indicator { + border: 3px solid #323949 !important; +} +[data-coreui-theme=dark] .timeline-item img { + border: 1px solid #7382a0; + background-color: #212631; +} +[data-coreui-theme=dark] .timeline-style2 .timeline-item:before { + background-color: #3a4355; +} +[data-coreui-theme=dark] .timeline-style2 .timeline-indicator { + background-color: #212631 !important; +} +[data-coreui-theme=dark] .timeline-style2 .timeline-label { + color: #afb5c0; +} +[data-coreui-theme=dark] .widget-box { + border: 1px solid #57647f; +} +[data-coreui-theme=dark] .widget-header { + background: repeat-x #272d39; + background-image: -webkit-linear-gradient(top, #212631 0, #2d3443 100%); + background-image: -o-linear-gradient(top, #212631 0, #2d3443 100%); + background-image: linear-gradient(to bottom, #212631 0, #2d3443 100%); + border-bottom: 1px solid #4a566d; +} +[data-coreui-theme=dark] .widget-header-flat { + background: #272d39; +} +[data-coreui-theme=dark] .widget-toolbar:before { + border: 1px solid #4d5972; +} +[data-coreui-theme=dark] [class*=widget-color-] > .widget-header > .widget-toolbar:before { + border-color: #3e475b; +} +[data-coreui-theme=dark] .widget-color-orange > .widget-header > .widget-toolbar:before { + border-color: #958132; +} +[data-coreui-theme=dark] .widget-toolbar-light { + background: rgba(33, 38, 49, 0.85); +} +[data-coreui-theme=dark] .widget-body { + background-color: #212631; +} +[data-coreui-theme=dark] .widget-color-red { + border-color: #b8796d; +} +[data-coreui-theme=dark] .widget-color-red > .widget-header { + background: #a96152; + border-color: #b8796d; +} +[data-coreui-theme=dark] .widget-color-pink { + border-color: #ae7a94; +} +[data-coreui-theme=dark] .widget-color-pink > .widget-header { + background: #9f607f; + border-color: #ae7a94; +} +[data-coreui-theme=dark] .widget-color-orange > .widget-header { + color: #e5cfa6 !important; + background: #af873a; +} +[data-coreui-theme=dark] .widget-color-grey > .widget-header { + border-color: #7382a0; +} +[data-coreui-theme=dark] .widget-box.transparent > .widget-header { + border-bottom: 1px solid #415665; +} +[data-coreui-theme=dark] .widget-box.light-border[class*=widget-color-]:not(.fullscreen) > .widget-body { + border: 1px solid #4f5c75; +} +[data-coreui-theme=dark] .widget-box.fullscreen { + background-color: #212631; +} +[data-coreui-theme=dark] .widget-box.fullscreen:not([class*=widget-color-]) { + border-color: #7382a0; +} +[data-coreui-theme=dark] .widget-body .table { + border-top: 1px solid #454f65; +} +[data-coreui-theme=dark] .widget-body .table thead:first-child tr { + background: #212631; +} +[data-coreui-theme=dark] .comment-box-container { + background-color: #212631; + border-top: 1px solid #475268; +} +[data-coreui-theme=dark] .thumbnail-container { + border: 1px dashed #475268; +} +[data-coreui-theme=dark] .jconfirm-title-c { + border-bottom: solid 1px #4a566d; +} +[data-coreui-theme=dark] .alert-status-log { + background: #343c4c; + border: 1px solid #a28d3d; +} +[data-coreui-theme=dark] .custom-tooltip .tooltip-inner { + background-color: #5a5e2e; + border: 1px solid #989e58; + color: #cdd4dd; +} +[data-coreui-theme=dark] .custom-tooltip .tooltip-inner b { + color: #d1d8e8; +} +[data-coreui-theme=dark] .custom-tooltip .tooltip-inner div { + color: #b6bdc7; +} +[data-coreui-theme=dark] .custom-tooltip.bs-tooltip-top .tooltip-arrow::before { + border-top-color: #989e58; +} +[data-coreui-theme=dark] .diagram-wrapper { + background: #2b3136; +} +[data-coreui-theme=dark] .diagram-container { + background: #212631; + border: 1px solid #4a566d; +} +[data-coreui-theme=dark] *::-webkit-scrollbar-thumb { + background-color: #4e575f; +} +[data-coreui-theme=dark] .report-col-row { + background: #242d36; + border: 1px solid #414f5e; +} +[data-coreui-theme=dark] .report-col-placeholder { + border: 1px dashed #6d8296; + background: #283543; +} +[data-coreui-theme=dark] .header-search .form-control { + background: #242e3b; + border: 1px solid #474d58; +} +[data-coreui-theme=dark] .header-search .form-control:focus { + background: #212631; +} +[data-coreui-theme=dark] .header-search__kbd { + background: #2c323d; + border: 1px solid #4a525e; +} +[data-coreui-theme=dark] .wp-menu__kbd { + background: #2c323d; + border: 1px solid #4a525e; +} +[data-coreui-theme=dark] .header-search__results { + background: #212631; + border: 1px solid #474d58; +} +[data-coreui-theme=dark] .header-search__item { + color: #c0cad7; +} +[data-coreui-theme=dark] .header-bell { + background: #242e3b; + border: 1px solid #474d58; + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-menu.dropdown-menu { + border: 1px solid #474d58; +} +[data-coreui-theme=dark] .wp-menu .dropdown-item { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-menu__divider { + background: #2c323d; +} +[data-coreui-theme=dark] .wp-menu__identity .wp-id-name { + color: #c0cad7; +} +[data-coreui-theme=dark] .tp-menu { + background: #212631; + border: 1px solid #4b576e; +} +[data-coreui-theme=dark] .tp-option:hover { + background: #2e3544; +} +[data-coreui-theme=dark] .closing-hero { + background: linear-gradient(120deg, #182449 0%, #1f1745 55%, #1e4733 100%); + border: 1px solid #263771; +} +[data-coreui-theme=dark] .closing-hero__title { + color: #c4c2e0; +} +[data-coreui-theme=dark] .closing-steps__item.is-done { + background: #1e4329; + border-color: #3a8554; + color: #a8e2be; +} +[data-coreui-theme=dark] .closing-steps__item.is-missing { + background: #431b1b; + border-color: #7f2c2c; + color: #db8f8f; +} +[data-coreui-theme=dark] .closing-field { + border: 1px solid #424d61; + background: #212631; +} +[data-coreui-theme=dark] .closing-field__label { + color: #d1d8e8; +} +[data-coreui-theme=dark] .closing-mr { + border: 1px solid #424d61; +} +[data-coreui-theme=dark] .closing-mr:hover { + border-color: #45328d; +} +[data-coreui-theme=dark] .closing-mr.is-selected { + background: #1f1745; +} +[data-coreui-theme=dark] .closing-view__block { + border: 1px solid #424d61; + background: #212631; +} +[data-coreui-theme=dark] .closing-view__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .closing-rules { + border: 1px solid #444f5e; +} +[data-coreui-theme=dark] .closing-rules__head { + background: #242d36; + border-bottom: 1px solid #444f5e; +} +[data-coreui-theme=dark] .closing-rules__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .closing-rules__grid th, +[data-coreui-theme=dark] .closing-rules__grid td { + border-bottom: 1px solid #384654; +} +[data-coreui-theme=dark] .closing-rules__grid tbody th { + color: #bfc7d2; +} +[data-coreui-theme=dark] .closing-rules__grid tbody tr:hover { + background: #242d36; +} +[data-coreui-theme=dark] .closing-rules__foot { + background: #27272f; +} +[data-coreui-theme=dark] .member-perm-group { + border: 1px solid #444f5e; +} +[data-coreui-theme=dark] .integration-section-title { + border-top: 1px solid #444f5e; + color: #bfc7d2; +} +[data-coreui-theme=dark] .branch-connect__text { + background: #493418; + border: 1px solid #956733; + color: #e3ae9d; +} +[data-coreui-theme=dark] .gitlab-connection__status.is-ok { + background: #1e4329; + border-color: #3a8554; + color: #b5e3c6; +} +[data-coreui-theme=dark] .gitlab-connection__status.is-expiring { + background: #4b4119; + border-color: #aa943b; + color: #e5baa0; +} +[data-coreui-theme=dark] .gitlab-connection__status.is-expired { + background: #431b1b; + border-color: #7f2c2c; + color: #de9e9e; +} +[data-coreui-theme=dark] .gitlab-guide > li { + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .gitlab-guide > li::before { + background: #4446a6; +} +[data-coreui-theme=dark] .gitlab-guide__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .gitlab-guide__text { + color: #b6bdc7; +} +[data-coreui-theme=dark] .gitlab-scope { + border: 1px solid #444f5e; + background: #242d36; +} +[data-coreui-theme=dark] .gitlab-scope--on { + background: #182449; + border-color: #374797; + color: #9d9ad2; +} +[data-coreui-theme=dark] .gitlab-guide__note { + color: #e5baa0; + background: #4b4119; + border: 1px solid #aa943b; +} +[data-coreui-theme=dark] .mr-dialog__branches code { + background: #28323c; +} +[data-coreui-theme=dark] .mr-dialog__meta { + color: #b6bdc7; +} +[data-coreui-theme=dark] .mr-dialog__note { + background: #182449; + color: #9d9ad2; +} +[data-coreui-theme=dark] .branch-existing { + border: 1px solid #2d3e81; + background: #182449; + color: #abaad4; +} +[data-coreui-theme=dark] .branch-existing--all { + border-color: #aa943b; + background: #4b4119; + color: #e6c1ab; +} +[data-coreui-theme=dark] .header-notif__head { + border-top: 1px solid #404853; +} +[data-coreui-theme=dark] .header-notif__item { + color: #c0cad7; +} +[data-coreui-theme=dark] .header-notif__item:hover { + background: #242e3b; + color: #c0cad7; +} +[data-coreui-theme=dark] .header-notif__item.is-unread { + background: #172a45; +} +[data-coreui-theme=dark] .wp-menu__chip--grey { + background: #2e343c; +} + +/* toast-theme.css */ +[data-coreui-theme=dark] #toast-container > .toast { + border: 1px solid #434e5d; + border-left: 4px solid #828b99; + background-color: #212631; + color: #bcc5d2; +} +[data-coreui-theme=dark] #toast-container > .toast-success::before { + color: #99e0b3; + background: #225232; +} +[data-coreui-theme=dark] #toast-container > .toast-error::before { + background: #501d1d; +} +[data-coreui-theme=dark] #toast-container > .toast-warning::before { + color: #e5b680; + background: #635622; +} +[data-coreui-theme=dark] #toast-container > .toast-info::before { + background: #1e3655; +} +[data-coreui-theme=dark] #toast-container .toast-title { + color: #cbd2de; +} +[data-coreui-theme=dark] #toast-container .toast-message { + color: #b6bdc7; +} +[data-coreui-theme=dark] #toast-container .toast-close-button:hover, +[data-coreui-theme=dark] #toast-container .toast-close-button:focus { + color: #b6bdc7; +} + +/* pages/backlog-task.css */ +[data-coreui-theme=dark] #dropzone-container { + background: #162942; +} +[data-coreui-theme=dark] #dropzone-container:hover { + background: #182f49; +} +[data-coreui-theme=dark] .file-thumb { + border: 1px solid #414f5e; + background: #282f36; +} +[data-coreui-theme=dark] .file-name { + color: #c2cfe0; +} +[data-coreui-theme=dark] .file-action { + background: rgba(33, 38, 49, 0.92); + border: 1px solid #414f5e; + color: #abb3bd; +} +[data-coreui-theme=dark] .file-action:hover { + color: #c2cfe0; +} +[data-coreui-theme=dark] .file-action.file-icon-delete:hover { + border-color: #874040; +} +[data-coreui-theme=dark] .task-activity-card .card-header { + border-bottom: 1px solid var(--cui-border-color, #515661); +} +[data-coreui-theme=dark] .task-activity-card .card-header-tabs .nav-link:hover { + color: var(--cui-body-color, #d1d4dc); +} +[data-coreui-theme=dark] .task-activity-card .activity-count { + background-color: var(--cui-secondary-bg, #363b40); +} +[data-coreui-theme=dark] .comment-body { + background: #282f36; + border: 1px solid #3f4b59; +} +[data-coreui-theme=dark] .comment-author { + color: #c2cfe0; +} +[data-coreui-theme=dark] .comment-text { + color: #bcc5d2; +} +[data-coreui-theme=dark] .comment-box { + background: #212631; + border-top: 1px solid #4a566d; +} +[data-coreui-theme=dark] .history-item::before { + background: #303b46; +} +[data-coreui-theme=dark] .history-dot { + border: 2px solid #323949; + box-shadow: 0 0 0 1px #335557; +} +[data-coreui-theme=dark] .history-author { + color: #c2cfe0; +} +[data-coreui-theme=dark] .history-text { + color: #bcc5d2; +} +[data-coreui-theme=dark] .history-collapsed::after { + background: linear-gradient(rgba(255, 255, 255, 0), #212631); +} +[data-coreui-theme=dark] .history-change-action { + background: #283543; + color: #bcc5d2; +} +[data-coreui-theme=dark] .history-change-action--added { + background: #2b4433; + color: #acddbc; +} +[data-coreui-theme=dark] .history-change-action--cleared { + background: #471e1e; + color: #de9791; +} +[data-coreui-theme=dark] .history-change-body { + border: 1px solid #434e5d; + background: #242d36; +} +[data-coreui-theme=dark] .history-diff-ins { + background: #225232; + color: #b5e3c6; +} +[data-coreui-theme=dark] .history-diff-del { + background: #501d1d; + color: #de9e9e; +} +[data-coreui-theme=dark] .backlog-fab { + background: linear-gradient(#212631, #212631) padding-box, + linear-gradient(90deg, #1cc7c9 0%, #ffc21a 100%) border-box; +} +[data-coreui-theme=dark] .backlog-fab-hint kbd { + color: #acb2be; + background: #2a313b; + border: 1px solid #4b5662; +} +[data-coreui-theme=dark] .env-panel { + border: 1px solid #444f5e; + background: #202b35; +} +[data-coreui-theme=dark] .env-head { + border-bottom: 1px solid #444f5e; +} +[data-coreui-theme=dark] .env-val { + color: #cdd4dd; +} +[data-coreui-theme=dark] .status-node:not(:last-of-type)::after { + background: #3d454e; +} +[data-coreui-theme=dark] .status-node__name { + color: #bfc7d2; +} +[data-coreui-theme=dark] .status-node.is-current .status-node__dot { + box-shadow: 0 0 0 2px #212631; +} +[data-coreui-theme=dark] .status-node.is-current .status-node__name { + color: #d1d8e8; +} +[data-coreui-theme=dark] .status-track__age { + border-left: 1px solid #444f5e; + color: #b6bdc7; +} +[data-coreui-theme=dark] .status-card-tooltip .tooltip-inner { + background: #212631; + border: 1px solid #444f5e; +} +[data-coreui-theme=dark] .status-card-tooltip .tooltip-arrow::before { + border-top-color: #444f5e !important; +} +[data-coreui-theme=dark] .stc__val { + color: #cdd4dd; +} +[data-coreui-theme=dark] .stc__dur { + border-top: 1px dashed #444f5e; + color: #ace6e2; +} +[data-coreui-theme=dark] .stage-chips { + border-left: 1px solid #495563; +} +[data-coreui-theme=dark] .stage-chip { + background: #24453f; + border: 1px solid #4f8277; + color: #ace6e2; +} +[data-coreui-theme=dark] .stage-chip__name { + color: #b7e6e3; +} +[data-coreui-theme=dark] .stage-chip__val { + color: #ace6e2; +} +[data-coreui-theme=dark] #pageTitle .bl-head-id { + color: #ace6e2; + background: #24453f; + border: 1px solid #4f8277; +} +[data-coreui-theme=dark] #pageTitle .bl-head-id:hover { + background: #2e544a; + border-color: #63a092; +} +[data-coreui-theme=dark] #pageTitle .bl-head-sep { + background: #414b57; +} +[data-coreui-theme=dark] #pageTitle .bl-head-owner { + background: #233142; + border: 1px solid #405369; + color: #bcc5d2; +} +[data-coreui-theme=dark] .similar-tasks { + border: 1px solid #ab8d39; + background: #4e421a; +} +[data-coreui-theme=dark] .similar-tasks--exact { + border-color: #964040; + background: #481e1e; +} +[data-coreui-theme=dark] .similar-head { + color: #f0dea8; +} +[data-coreui-theme=dark] .similar-tasks--exact .similar-head { + color: #d59b9b; +} +[data-coreui-theme=dark] .similar-item + .similar-item { + border-top: 1px dashed #7d704a; +} +[data-coreui-theme=dark] .task-code-section + .task-code-section { + border-top: 1px solid #3b4755; +} +[data-coreui-theme=dark] .task-code-state--open { + background: #1e3655; +} +[data-coreui-theme=dark] .task-code-state--merged { + background: #251c4b; +} +[data-coreui-theme=dark] .task-code-state--closed { + background: #501d1d; + color: #db8f8f; +} +[data-coreui-theme=dark] .task-code-state--draft { + background: #28323c; + color: #b6bdc7; +} +[data-coreui-theme=dark] .task-code-state--other { + background: #28323c; + color: #b6bdc7; +} +[data-coreui-theme=dark] .branch-result-list { + border: 1px solid #3b4755; +} +[data-coreui-theme=dark] .rcf-tab { + color: #e6b691; +} +[data-coreui-theme=dark] .rcf-tab.active { + color: #e5baa0; +} +[data-coreui-theme=dark] .rcf-tab-badge--done { + background: #225232; + color: #a8e2be; +} +[data-coreui-theme=dark] .rcf-tab-badge--partial { + background: #28323c; + color: #b6bdc7; +} +[data-coreui-theme=dark] .rcf-step:not(:last-child)::before { + background: linear-gradient(#b59a3f, #4b9f7d); +} +[data-coreui-theme=dark] .rcf-marker span { + background: #212631; +} +[data-coreui-theme=dark] .rcf-card { + border: 1px solid #424d61; + background: #212631; +} +[data-coreui-theme=dark] .rcf-step--alert .rcf-card { + border-color: #7f2c2c; + background: linear-gradient(#431616, #212631 60px); +} +[data-coreui-theme=dark] .rcf-step--alert .rcf-marker span { + box-shadow: 0 0 0 4px #501d1d; +} +[data-coreui-theme=dark] .rcf-title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .rcf-req--later { + background: #635622; + color: #e5baa0; +} +[data-coreui-theme=dark] .rcf-req--now { + background: #501d1d; + color: #db8f8f; +} +[data-coreui-theme=dark] .rcf-state--done { + background: #225232; + color: #a8e2be; +} +[data-coreui-theme=dark] .rcf-state--empty { + background: #28323c; +} +[data-coreui-theme=dark] .closing-checklist { + border: 1px dashed #55616f; + background: #242d36; +} +[data-coreui-theme=dark] .closing-checklist__head { + color: #b6bdc7; +} +[data-coreui-theme=dark] .closing-checklist__for { + color: #d1d8e8; +} +[data-coreui-theme=dark] .closing-chip { + background: #212631; +} +[data-coreui-theme=dark] .closing-chip--done { + border-color: #3a8554; + color: #a8e2be; + background: #1e4329; +} +[data-coreui-theme=dark] .closing-chip--missing { + border-color: #7f2c2c; + color: #db8f8f; + background: #431b1b; +} +[data-coreui-theme=dark] .closing-chip--pending { + border-color: #aa943b; + color: #e5baa0; + background: #4b4119; +} +[data-coreui-theme=dark] .closing-chip--optional { + border-color: #444f5e; +} +[data-coreui-theme=dark] .closing-chip--unknown { + border-color: #444f5e; +} +[data-coreui-theme=dark] .task-code-mr--closing { + background: linear-gradient(90deg, #1f1745, transparent); +} +[data-coreui-theme=dark] .task-code-deleted-badge { + background: #28323c; +} +[data-coreui-theme=dark] .task-code-branches .task-code-branch { + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .task-code-branches .task-code-branch:hover { + border-color: #2d3e81; +} +[data-coreui-theme=dark] .task-code-branches .task-code-branch-name { + color: #cbd2de; +} +[data-coreui-theme=dark] .task-code-branch__menu > .btn:hover { + color: #d1d8e8; +} +[data-coreui-theme=dark] .task-code-branch__meta strong { + color: #bfc7d2; +} +[data-coreui-theme=dark] .task-code-group-badge { + background: #182449; +} +[data-coreui-theme=dark] .task-code-empty { + background: #242d36; + border: 1px dashed #444f5e; +} +[data-coreui-theme=dark] .task-code-branches .task-code-create-mr { + background: #182449; + border: 1px solid #2d3e81; +} +[data-coreui-theme=dark] .task-code-group-badge { + background: #28323c; + color: #b6bdc7; + border: 1px solid #444f5e; +} +[data-coreui-theme=dark] .task-code-repo-badge { + background: #2b333d; + color: #b7bec7; +} +[data-coreui-theme=dark] .task-issue-link { + border-bottom: 1px solid #3b4755; +} + +/* pages/backlog.css */ +[data-coreui-theme=dark] .backlog-filter-offcanvas .filter-actions { + background: #212631; + border-top: 1px solid #414f5e; +} +[data-coreui-theme=dark] .filter-presets { + background: #242e3b; + border: 1px solid #414f5e; +} +[data-coreui-theme=dark] .filter-presets-title { + color: #bdc5ce; +} +[data-coreui-theme=dark] .filter-presets-title i { + color: #8ad6dd; +} +[data-coreui-theme=dark] .filter-chip { + background: #283543; + border: 1px solid #485c71; + color: #c1ccd6; +} +[data-coreui-theme=dark] .filter-chip-remove:hover { + background: #582929; +} +[data-coreui-theme=dark] .subtask-toggle:hover { + color: #88d9da; +} +[data-coreui-theme=dark] tr.subtask-open .subtask-toggle { + color: #88d9da; +} +[data-coreui-theme=dark] .subtask-panel { + background: #242d36; +} +[data-coreui-theme=dark] .subtask-row::before { + border-left: 1px solid #55616f; +} +[data-coreui-theme=dark] .subtask-row > .subtask-main::before { + border-top: 1px solid #55616f; +} +[data-coreui-theme=dark] .subtask-caret:hover { + color: #88d9da; +} +[data-coreui-theme=dark] .subtask-title { + color: #cdd4dd; +} +[data-coreui-theme=dark] .subtask-due--today { + color: #e5b680; +} +[data-coreui-theme=dark] .subtask-nested .subtask-panel { + border-left-color: #55616f; +} +[data-coreui-theme=dark] .backlog-age { + background: #28323c; + color: #bfc7d2; +} +[data-coreui-theme=dark] .backlog-age--orange { + background: #493418; +} +[data-coreui-theme=dark] .backlog-age--pink { + background: #411e31; +} +[data-coreui-theme=dark] .backlog-age--red { + background: #431b1b; + color: #db8f8f; +} +[data-coreui-theme=dark] .filter-presets-icon { + color: #8ad6dd; +} +[data-coreui-theme=dark] .backlog-filter-offcanvas .filter-scroll .form-label { + color: #b6bdc7; +} +[data-coreui-theme=dark] .filter-section { + border: 1px solid #414f5e; + background: #212631; +} +[data-coreui-theme=dark] .filter-section-head { + background: #242d36; + color: #bcc5d2; +} +[data-coreui-theme=dark] .filter-section.is-open .filter-section-head { + border-bottom: 1px solid #414f5e; +} +[data-coreui-theme=dark] .bulk-move-preview-summary.is-ok { + background: #1e4733; + color: #b5e3c6; +} +[data-coreui-theme=dark] .bulk-move-preview-summary.is-none { + background: #431b1b; + color: #de9e9e; +} +[data-coreui-theme=dark] .bulk-move-staying { + color: #94a5db; + background: #182d48; +} +[data-coreui-theme=dark] .grid-selection-bar { + background: linear-gradient(90deg, #182449, #1f1745); + border: 1px solid #2d3e81; +} +[data-coreui-theme=dark] .grid-selection-count { + color: #9d9ad2; +} +[data-coreui-theme=dark] .grid-selection-btn { + background: #212631; + border: 1px solid #2d3e81; + color: #9d9ad2; +} +[data-coreui-theme=dark] .dt-title-icon:hover { + background: #28323c; +} +[data-coreui-theme=dark] .dt-title-icon--branch:hover { + background: #182449; +} +[data-coreui-theme=dark] .dt-title-icon--closing { + color: #e5b680; +} +[data-coreui-theme=dark] .dt-title-icon--closing:hover { + color: #e6b691; + background: #4b4119; +} +[data-coreui-theme=dark] .dt-title-icon--files:hover { + color: #a8e2be; + background: #1e4329; +} +[data-coreui-theme=dark] .dt-title-icon--comments:hover { + color: #d1d8e8; +} + +/* pages/board.css */ +[data-coreui-theme=dark] .gantt-axis-track { + border-bottom: 1px solid #414f5e; +} +[data-coreui-theme=dark] .gantt-group { + color: #b7c1cf; + border-top: 1px solid #3b4755; +} +[data-coreui-theme=dark] .gantt-track { + border-bottom: 1px dashed #3a4454; +} +[data-coreui-theme=dark] .board-column { + background: #272d39; + border: 1px solid #414f5e; +} +[data-coreui-theme=dark] .board-column__header { + background: #212631; + border-top: 3px solid #6066b3; +} +[data-coreui-theme=dark] .board-column__count { + background: #292f3e; + color: #a9b1bd; +} +[data-coreui-theme=dark] .board-card { + background: #212631; + border: 1px solid #414f5e; +} +[data-coreui-theme=dark] .board-card:hover { + border-color: #4f5c74; +} +[data-coreui-theme=dark] .board-card--placeholder { + border: 1px dashed #5d6a82; + background: #29313e; +} + +/* pages/configuration.css */ +[data-coreui-theme=dark] .config-tabs .nav-link { + color: #b1b9c5; + background: #28303a; + border: 1px solid #444f5e; +} +[data-coreui-theme=dark] .config-tabs .nav-link:hover { + background: #2d3644; + color: #c0cad7; +} + +/* pages/dashboard.css */ +[data-coreui-theme=dark] .wp-filterbar { + background: #212631; + border: 1px solid #474d58; +} +[data-coreui-theme=dark] .wp-filterbar__title { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-stat { + background: #212631; + border: 1px solid #474d58; + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-stat:hover { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-card { + background: #212631; + border: 1px solid #474d58; +} +[data-coreui-theme=dark] .wp-card__head { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-due__tile { + background: #282f36; + border: 1px solid #434a54; +} +[data-coreui-theme=dark] .wp-due__value { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-due--soon .wp-due__icon { + color: #eac889; +} +[data-coreui-theme=dark] .wp-release__name { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-release__bar { + background: #2c323d; +} +[data-coreui-theme=dark] .wp-upcoming__chip { + background: #282f36; + border: 1px solid #434a54; + border-left: 3px solid #5b626d; +} +[data-coreui-theme=dark] .wp-upcoming__title { + color: #c0cad7; +} +[data-coreui-theme=dark] .wp-upcoming__when { + color: #aab2bd; + background: #2c323d; +} +[data-coreui-theme=dark] .wp-upcoming__more { + color: #9fd9e5; +} +[data-coreui-theme=dark] .my-code__label { + border-bottom: 1px solid #404853; +} +[data-coreui-theme=dark] .my-code__count { + background: #2e343c; + color: #b1b8c3; +} +[data-coreui-theme=dark] .my-code__row { + border-bottom: 1px dashed #404853; +} +[data-coreui-theme=dark] .my-code__title { + color: #c0cad7; +} +[data-coreui-theme=dark] a.my-code__title:hover { + color: #97b7db; +} +[data-coreui-theme=dark] .my-code__status { + background: #485369; +} +[data-coreui-theme=dark] .my-code__status--draft { + background: #61708f; +} +[data-coreui-theme=dark] .my-code__status--branch { + border: 2px solid #7785a2; +} +[data-coreui-theme=dark] .my-code__task { + background: #283543; + color: #97b7db; +} + +/* pages/employeerole/access.css */ +[data-coreui-theme=dark] .ea-group { + border: 1px solid #414f5e; +} +[data-coreui-theme=dark] .ea-group__header { + background: #222648; + color: #a3a6cd; + border-bottom: 1px solid #3e446e; + border-left: 3px solid #6066b3; +} +[data-coreui-theme=dark] .ea-group__count { + background: #212631; + border: 1px solid #4b5765; +} + +/* pages/employeerole/permission.css */ +[data-coreui-theme=dark] .perm-toolbar { + background: #212631; + border-bottom: 1px solid #464f5c; +} +[data-coreui-theme=dark] .perm-group { + border: 1px solid #464f5c; +} +[data-coreui-theme=dark] .perm-group__head { + background: #242e3b; +} +[data-coreui-theme=dark] .perm-group__toggle { + color: #c1ccd6; +} +[data-coreui-theme=dark] .perm-group__badge { + background: #343b45; + color: #bbc2c9; +} +[data-coreui-theme=dark] .perm-footer { + background: #212631; + border-top: 1px solid #464f5c; +} + +/* pages/filter-panel.css */ +[data-coreui-theme=dark] .wp-filter-btn[aria-expanded="true"], +[data-coreui-theme=dark] .tlr-filter-btn[aria-expanded="true"] { + background: #182449; + border-color: #6066b3; +} +[data-coreui-theme=dark] .wp-filter-btn--active, +[data-coreui-theme=dark] .tlr-filter-btn--active { + background: #192a4b; +} +[data-coreui-theme=dark] .wp-filter-btn--active[aria-expanded="true"], +[data-coreui-theme=dark] .tlr-filter-btn--active[aria-expanded="true"] { + background: #1c2e56; +} + +/* pages/log.css */ +[data-coreui-theme=dark] .log-day { + color: #b7c1cf; +} +[data-coreui-theme=dark] .log-item { + border-bottom: 1px solid #394453; +} +[data-coreui-theme=dark] .log-diff pre { + background: #262d38; + border: 1px solid #414f5e; +} +[data-coreui-theme=dark] .audit-detail-head { + border-bottom: 1px solid #404853; +} +[data-coreui-theme=dark] .audit-detail-action { + background: #29313e; + color: #aeb5c2; +} +[data-coreui-theme=dark] .audit-diff-field { + color: #c2cad7; +} +[data-coreui-theme=dark] .audit-diff-old { + color: #cc9b9b; +} +[data-coreui-theme=dark] .audit-diff-new { + color: #abd4b8; +} +[data-coreui-theme=dark] .audit-diff--changed { + background: #473718; +} +[data-coreui-theme=dark] .audit-raw pre { + background: #262d38; + border: 1px solid #414f5e; +} + +/* pages/profile.css */ +[data-coreui-theme=dark] .profile-photo img { + border: 3px solid #323949; + background: #242e3b; +} +[data-coreui-theme=dark] .profile-photo__edit { + border: 2px solid #323949; +} + +/* pages/release-plan.css */ +[data-coreui-theme=dark] .release-mismatch-group { + border: 1px solid #434e5d; + background: #212631; +} +[data-coreui-theme=dark] .release-mismatch-meta span { + color: #bcc5d2; +} +[data-coreui-theme=dark] .release-mismatch-tasks { + border-top: 1px solid #3b4755; +} +[data-coreui-theme=dark] .release-mismatch-task:hover { + background: #242d36; +} +[data-coreui-theme=dark] .release-mismatch-status { + background: #28323c; +} + +/* pages/report.css */ +[data-coreui-theme=dark] .stage-rank-title { + color: #bcc5d2; +} +[data-coreui-theme=dark] .stage-rank-val { + color: #c2cfe0; +} +[data-coreui-theme=dark] .stage-rank-bar-track { + background: #2b333d; +} + +/* pages/resource-load.css */ +[data-coreui-theme=dark] .rl-filters .form-label { + color: #adb5bd; +} +[data-coreui-theme=dark] .rl-summary .rl-stat { + border: 1px solid #464f5c; + background: #212631; +} +[data-coreui-theme=dark] .rl-filter-header { + background: #233142; + color: #b0c0d6; + border-bottom: 1px solid #3c5168; +} +[data-coreui-theme=dark] .rl-filter-header:hover { + background: #263448; +} + +/* pages/review.css */ +[data-coreui-theme=dark] .review-connect-banner { + background: linear-gradient(110deg, #493418, #635622); + border: 1px solid #aa943b; + color: #e6c1ab; +} +[data-coreui-theme=dark] .review-tile { + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .review-tile__label { + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-tile-filter { + background: #182449; + color: #9d9ad2; +} +[data-coreui-theme=dark] .review-table th { + background: #242d36; +} +[data-coreui-theme=dark] .review-row:focus { + outline: 2px solid #374797; +} +[data-coreui-theme=dark] .review-title__text { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-task-chip { + background: #182449; +} +[data-coreui-theme=dark] .review-tag--own { + background: #28323c; + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-tag--unassigned { + background: #493418; + color: #e4a58b; +} +[data-coreui-theme=dark] .review-status--mergeable { + background: #225232; + color: #a8e2be; +} +[data-coreui-theme=dark] .review-status--conflict { + background: #501d1d; + color: #db8f8f; +} +[data-coreui-theme=dark] .review-status--needs-rebase { + background: #5a401e; + color: #e4a58b; +} +[data-coreui-theme=dark] .review-status--draft { + background: #28323c; + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-status--checking { + background: #1d3c51; + color: #98ceeb; +} +[data-coreui-theme=dark] .review-status--blocked { + background: #635622; + color: #e5baa0; +} +[data-coreui-theme=dark] .review-status--other { + background: #28323c; +} +[data-coreui-theme=dark] .review-head { + border-bottom: 1px solid #444f5e; +} +[data-coreui-theme=dark] .review-head__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-head__meta { + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-branches code { + background: #28323c; +} +[data-coreui-theme=dark] .review-task-card { + border: 1px solid #2d3e81; + background: #162342; +} +[data-coreui-theme=dark] .review-task-card:hover { + border-color: #595bbb; + background: #182449; +} +[data-coreui-theme=dark] .review-task-card__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-approved { + color: #a8e2be; +} +[data-coreui-theme=dark] .review-merge-reason { + color: #e5baa0; + background: #4b4119; + border: 1px solid #aa943b; +} +[data-coreui-theme=dark] .review-description { + color: #cbd2de; +} +[data-coreui-theme=dark] .review-commits li { + border-bottom: 1px solid #384654; +} +[data-coreui-theme=dark] .review-commits__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-note { + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .review-comment-box { + border-top: 1px dashed #444f5e; +} +[data-coreui-theme=dark] .review-diff-summary { + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-diff-add { + color: #a8e2be; +} +[data-coreui-theme=dark] .review-diff-del { + color: #db8f8f; +} +[data-coreui-theme=dark] .review-file { + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .review-file__head { + background: #242d36; +} +[data-coreui-theme=dark] .review-file__path { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-file__badge--new { + background: #225232; + color: #a8e2be; +} +[data-coreui-theme=dark] .review-file__badge--deleted { + background: #501d1d; + color: #db8f8f; +} +[data-coreui-theme=dark] .review-file__badge--renamed { + background: #1d3c51; + color: #98ceeb; +} +[data-coreui-theme=dark] .review-diff__num { + border-right: 1px solid #384654; +} +[data-coreui-theme=dark] .review-diff__code { + color: #cbd2de; +} +[data-coreui-theme=dark] .review-diff__line--added { + background: #1e4733; +} +[data-coreui-theme=dark] .review-diff__line--added .review-diff__sign { + color: #a8e2be; +} +[data-coreui-theme=dark] .review-diff__line--removed { + background: #431b1b; +} +[data-coreui-theme=dark] .review-diff__line--removed .review-diff__sign { + color: #db8f8f; +} +[data-coreui-theme=dark] .review-diff__hunk td { + background: #28323c; +} +[data-coreui-theme=dark] .review-table thead th { + box-shadow: inset 0 -1px 0 #333b46; +} +[data-coreui-theme=dark] .review-table td { + border-color: #384654; +} +[data-coreui-theme=dark] .review-table tbody .review-row:hover { + background: #162342; +} +[data-coreui-theme=dark] .review-title__more { + background: #182449; +} +[data-coreui-theme=dark] .review-sub__branch strong { + color: #bfc7d2; +} +[data-coreui-theme=dark] .review-task-chip--bug { + background: #501d1d; + color: #db8f8f; +} +[data-coreui-theme=dark] .review-task-chip--cr { + background: #1d3c51; + color: #98ceeb; +} +[data-coreui-theme=dark] .review-task-chip--todo { + background: #28323c; + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-avatar { + background: linear-gradient(135deg, #4446a6, #6241ab); + border: 2px solid #323949; +} +[data-coreui-theme=dark] .review-status--not-checked { + border: 1px dashed #55616f; +} +[data-coreui-theme=dark] .review-status--checking { + background: #183447; + color: #98ceeb; +} +[data-coreui-theme=dark] .review-age--fresh { + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-age--aging { + color: #e5baa0; + background: #635622; +} +[data-coreui-theme=dark] .review-age--old { + color: #e29aae; + background: #4f1a1e; +} +[data-coreui-theme=dark] .review-chip-toggle { + border: 1px dashed #55616f; + color: #b6bdc7; + background: #212631; +} +[data-coreui-theme=dark] .review-chip-toggle:hover { + border-color: #828b99; +} +[data-coreui-theme=dark] .review-chip-toggle.is-active { + background: #493418; + color: #e4a58b; +} +[data-coreui-theme=dark] .review-group td { + background: #242d36; + border-top: 1px solid #444f5e; +} +[data-coreui-theme=dark] .review-group__toggle { + color: #bfc7d2; +} +[data-coreui-theme=dark] .review-side__block, +[data-coreui-theme=dark] .review-ready { + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .review-side__meta { + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-ready--ok { + background: linear-gradient(#1e4329, #212631 70px); +} +[data-coreui-theme=dark] .review-ready--conflict { + background: linear-gradient(#431b1b, #212631 70px); +} +[data-coreui-theme=dark] .review-ready--closed { + border-left-color: #828b99; +} +[data-coreui-theme=dark] .review-checks li { + color: #bfc7d2; +} +[data-coreui-theme=dark] .review-checks .is-ok > i { + color: #99e0b3; +} +[data-coreui-theme=dark] .review-checks .is-bad { + color: #de9e9e; +} +[data-coreui-theme=dark] .review-checks .is-warn { + color: #e5baa0; +} +[data-coreui-theme=dark] .review-checks .is-warn > i { + color: #e5b680; +} +[data-coreui-theme=dark] .review-conflict { + border: 1px solid #7f2c2c; + background: #212631; + color: #dea9a9; +} +[data-coreui-theme=dark] .review-merge { + border-top: 1px dashed #444f5e; +} +[data-coreui-theme=dark] .review-side-task { + border: 1px solid #444f5e; + border-left: 4px solid #828b99; +} +[data-coreui-theme=dark] .review-side-task:hover { + background: #162342; +} +[data-coreui-theme=dark] .review-side-task__title { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-branch-row code { + background: #28323c; +} +[data-coreui-theme=dark] .review-file-nav__item:hover, +[data-coreui-theme=dark] .review-file-nav__item.is-active { + background: #182449; +} +[data-coreui-theme=dark] .review-file-nav__name { + color: #d1d8e8; +} +[data-coreui-theme=dark] .branch-cleanup__group-head { + color: #c0cad7; + background: #242e3b; +} +[data-coreui-theme=dark] .branch-cleanup__count { + background: #333a44; + color: #b1b8c3; +} +[data-coreui-theme=dark] .branch-cleanup__row { + border-bottom: 1px solid #404853; +} +[data-coreui-theme=dark] .branch-cleanup__row:hover { + background: #232935; +} +[data-coreui-theme=dark] .branch-cleanup__name { + color: #c0cad7; +} +[data-coreui-theme=dark] .branch-cleanup__open:hover { + color: #97b7db; +} +[data-coreui-theme=dark] .branch-cleanup__foot { + background: #212631; + border-top: 1px solid #454e5c; +} +[data-coreui-theme=dark] .review-group:hover td { + background: #182449; +} +[data-coreui-theme=dark] .review-group:focus { + outline: 2px solid #374797; +} +[data-coreui-theme=dark] .review-group__chip { + background: #333b46; + color: #b6bdc7; +} +[data-coreui-theme=dark] .review-group__chip--ready { + background: #225232; + color: #a8e2be; +} +[data-coreui-theme=dark] .review-group__chip--conflict { + background: #501d1d; + color: #db8f8f; +} +[data-coreui-theme=dark] .review-group__chip--unassigned { + background: #5a401e; + color: #e4a58b; +} +[data-coreui-theme=dark] .review-grouped .review-group td { + border-top: 1px solid #444f5e; +} +[data-coreui-theme=dark] .review-grouped .review-group + .review-row > td, +[data-coreui-theme=dark] .review-grouped .review-row + .review-row > td { + border-top-color: #384654; +} +[data-coreui-theme=dark] .review-grouped tbody > .review-group:not(:first-child) td { + border-top: 6px solid #35424f; + box-shadow: inset 0 1px 0 #333b46; +} +[data-coreui-theme=dark] .unlinked-branch-row { + border: 1px solid #434e5d; +} +[data-coreui-theme=dark] .review-step__label { + color: #bfc7d2; +} +[data-coreui-theme=dark] .review-step__label::before { + color: #d1d8e8; +} +[data-coreui-theme=dark] .review-step__copy { + color: #b6bdc7; + border: 1px solid #444f5e; + background: #212631; +} +[data-coreui-theme=dark] .review-step__copy:hover { + border-color: #2d3e81; +} +[data-coreui-theme=dark] .review-local__tip { + color: #bfc7d2; +} +[data-coreui-theme=dark] .review-step__copy.is-copied { + color: #a8e2be; + border-color: #3a8554; + background: #1e4329; +} + +/* pages/task-explorer.css */ +[data-coreui-theme=dark] #pivot .pvtTable thead tr th, +[data-coreui-theme=dark] #pivot .pvtTable tbody tr th, +[data-coreui-theme=dark] #pivot .pvtAxisLabel, +[data-coreui-theme=dark] #pivot .pvtColLabel, +[data-coreui-theme=dark] #pivot .pvtRowLabel, +[data-coreui-theme=dark] #pivot .pvtTotalLabel, +[data-coreui-theme=dark] #pivot .pvtGrandTotal, +[data-coreui-theme=dark] #pivot .pvtTotal { + background: #2c3d3d; + color: #c0cad7; + border-color: #4c545e; +} +[data-coreui-theme=dark] #pivot .pvtTable td, +[data-coreui-theme=dark] #pivot .pvtTable th { + border-color: #4c545e; +} +[data-coreui-theme=dark] .pvtUi .pvtAttr, +[data-coreui-theme=dark] .pvtUi .pvtAxisContainer li span.pvtAttr { + background: #28303a; + border: 1px solid #444f5e; + color: #c0cad7; +} +[data-coreui-theme=dark] .pvtUi .pvtAxisContainer, +[data-coreui-theme=dark] .pvtUi .pvtVals, +[data-coreui-theme=dark] .pvtUi .pvtRenderers { + background: #242d36; + border-color: #444f5e; +} +[data-coreui-theme=dark] .pvtUi select { + border: 1px solid #4b576e; +} +[data-coreui-theme=dark] .pvtUi .pvtTriangle { + color: #88d9da; +} + +/* pages/team-availability.css */ +[data-coreui-theme=dark] .tav-kpi { + background: #212631; + border: 1px solid #404d5c; +} +[data-coreui-theme=dark] .tav-kpi__val { + color: #c2cfe0; +} +[data-coreui-theme=dark] .tav-kpi--warn { + border-color: #93753e; + background: #483618; +} +[data-coreui-theme=dark] .tav-kpi--warn .tav-kpi__val { + color: #e6b691; +} +[data-coreui-theme=dark] .tav-kpi--danger { + border-color: #874040; + background: #411b1b; +} +[data-coreui-theme=dark] .tav-chip--approved { + background: #4c529e; +} +[data-coreui-theme=dark] .tav-chip--pending { + background: repeating-linear-gradient(45deg, #434d58, #434d58 4px, #2b333d 4px, #2b333d 8px); + color: #bfc7d2; + border: 1px solid #55616f; +} +[data-coreui-theme=dark] .tav-row-label { + color: #bcc5d2; +} +[data-coreui-theme=dark] .tav-axis-track { + border-bottom: 1px solid #404d5c; +} +[data-coreui-theme=dark] .tav-row { + border-bottom: 1px solid #384654; +} +[data-coreui-theme=dark] .tav-row:hover { + background: #162942; +} +[data-coreui-theme=dark] .tav-bar--pending { + background-image: repeating-linear-gradient(45deg, rgba(33, 38, 49, 0.4), rgba(33, 38, 49, 0.4) 3px, transparent 3px, transparent 6px) !important; +} + +/* pages/user-list.css */ +[data-coreui-theme=dark] .emp-filter .select2-container--default .select2-selection--multiple { + border-color: #4b576e; +} + +/* pages/wiki.css */ +@media (min-width: 768px) { + [data-coreui-theme=dark] .wiki-tree-pane { + border-right: 1px solid var(--cui-border-color, #414f5e); + } +} +[data-coreui-theme=dark] .wiki-tag-badge { + background: #283543; + border: 1px solid #485c71; + color: #c1ccd6; +} +[data-coreui-theme=dark] .wiki-tag-badge i { + color: #8ad6dd; +} +[data-coreui-theme=dark] #wikiLinkedTasks .wiki-linked-title { + color: #bdc5ce; +} +[data-coreui-theme=dark] .wiki-linked-task { + background: #242e3b; + border: 1px solid #414f5e; + color: #c1ccd6; +} +[data-coreui-theme=dark] .wiki-version-row { + border-bottom: 1px solid #3b4755; +} diff --git a/src/Presentation/Taskist.Web/wwwroot/css/toast-theme.css b/src/Presentation/Taskist.Web/wwwroot/css/toast-theme.css new file mode 100644 index 0000000..7d66a75 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/css/toast-theme.css @@ -0,0 +1,121 @@ +/* Modern card-style theme for toastr notifications */ + +#toast-container.toast-top-right { + top: 72px; + right: 16px; +} + +#toast-container { z-index: 100000020 !important; } + +#toast-container > .toast { + position: relative; + width: 360px; + max-width: calc(100vw - 32px); + padding: 12px 36px 14px 56px; + margin: 0 0 10px; + border-radius: 10px; + border: 1px solid #e3e9f1; + border-left: 4px solid #94a3b8; + background-color: #fff; + background-image: none !important; + color: #33455c; + opacity: 1; + box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06); + overflow: hidden; + animation: wp-toast-in 0.22s ease-out; +} + +#toast-container > .toast:hover { + box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08); + opacity: 1; + cursor: default; +} + +#toast-container > .toast::before { + position: absolute; + left: 14px; + top: 12px; + width: 30px; + height: 30px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-family: "Font Awesome 6 Free"; + font-weight: 900; + font-size: 0.9rem; +} + +#toast-container > .toast-success { border-left-color: #16a34a; } +#toast-container > .toast-success::before { content: "\f00c"; color: #16a34a; background: #dcfce7; } +#toast-container > .toast-success .toast-progress { background-color: #16a34a; } + +#toast-container > .toast-error { border-left-color: #dc2626; } +#toast-container > .toast-error::before { content: "\f00d"; color: #dc2626; background: #fee2e2; } +#toast-container > .toast-error .toast-progress { background-color: #dc2626; } + +#toast-container > .toast-warning { border-left-color: #d97706; } +#toast-container > .toast-warning::before { content: "\f071"; color: #d97706; background: #fef3c7; } +#toast-container > .toast-warning .toast-progress { background-color: #d97706; } + +#toast-container > .toast-info { border-left-color: #2563eb; } +#toast-container > .toast-info::before { content: "\f129"; color: #2563eb; background: #dbeafe; } +#toast-container > .toast-info .toast-progress { background-color: #2563eb; } + +#toast-container .toast-title { + font-weight: 600; + font-size: 0.88rem; + color: #1e293b; + margin-bottom: 2px; +} + +#toast-container .toast-message { + font-size: 0.84rem; + line-height: 1.45; + color: #475569; + word-wrap: break-word; +} + +#toast-container .toast-message a { + color: #2563eb; +} + +#toast-container .toast-close-button { + position: absolute; + top: 8px; + right: 10px; + float: none; + font-size: 1.1rem; + font-weight: 400; + color: #94a3b8; + text-shadow: none; + opacity: 1; +} + +#toast-container .toast-close-button:hover, +#toast-container .toast-close-button:focus { + color: #475569; + opacity: 1; +} + +#toast-container .toast-progress { + height: 3px; + opacity: 0.6; +} + +@keyframes wp-toast-in { + from { transform: translateX(24px); opacity: 0; } + to { transform: translateX(0); opacity: 1; } +} + +@media (max-width: 576px) { + #toast-container.toast-top-right { + top: 64px; + right: 8px; + left: 8px; + } + + #toast-container > .toast { + width: auto; + } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/favicon.ico b/src/Presentation/Taskist.Web/wwwroot/favicon.ico deleted file mode 100644 index 63e859b..0000000 Binary files a/src/Presentation/Taskist.Web/wwwroot/favicon.ico and /dev/null differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/access-denied.png b/src/Presentation/Taskist.Web/wwwroot/images/access-denied.png deleted file mode 100644 index 114b7a6..0000000 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/access-denied.png and /dev/null differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/apple-touch-icon.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/apple-touch-icon.png new file mode 100644 index 0000000..88e504a Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/brand/apple-touch-icon.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/favicon.ico b/src/Presentation/Taskist.Web/wwwroot/images/brand/favicon.ico index 1088f38..c291da3 100644 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/brand/favicon.ico and b/src/Presentation/Taskist.Web/wwwroot/images/brand/favicon.ico differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-192.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-192.png new file mode 100644 index 0000000..c72671a Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-192.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-512-maskable.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-512-maskable.png new file mode 100644 index 0000000..2680a64 Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-512-maskable.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-512.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-512.png new file mode 100644 index 0000000..00f843f Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/brand/icon-512.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/logo.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/logo.png index 513837d..508a177 100644 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/brand/logo.png and b/src/Presentation/Taskist.Web/wwwroot/images/brand/logo.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/logo_icon.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/logo_icon.png index db55d97..b0646fb 100644 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/brand/logo_icon.png and b/src/Presentation/Taskist.Web/wwwroot/images/brand/logo_icon.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/screenshot-narrow.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/screenshot-narrow.png new file mode 100644 index 0000000..3b58d74 Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/brand/screenshot-narrow.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/brand/screenshot-wide.png b/src/Presentation/Taskist.Web/wwwroot/images/brand/screenshot-wide.png new file mode 100644 index 0000000..228f550 Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/brand/screenshot-wide.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/error-404.png b/src/Presentation/Taskist.Web/wwwroot/images/error-404.png deleted file mode 100644 index eb6eec6..0000000 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/error-404.png and /dev/null differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/error-500.png b/src/Presentation/Taskist.Web/wwwroot/images/error-500.png deleted file mode 100644 index c47a0a3..0000000 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/error-500.png and /dev/null differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/login-bg.png b/src/Presentation/Taskist.Web/wwwroot/images/login-bg.png index 395dd5b..e6a12a1 100644 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/login-bg.png and b/src/Presentation/Taskist.Web/wwwroot/images/login-bg.png differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/no-data.png b/src/Presentation/Taskist.Web/wwwroot/images/no-data.png deleted file mode 100644 index b6ec741..0000000 Binary files a/src/Presentation/Taskist.Web/wwwroot/images/no-data.png and /dev/null differ diff --git a/src/Presentation/Taskist.Web/wwwroot/images/sidenav-bg.jpg b/src/Presentation/Taskist.Web/wwwroot/images/sidenav-bg.jpg new file mode 100644 index 0000000..54d2f00 Binary files /dev/null and b/src/Presentation/Taskist.Web/wwwroot/images/sidenav-bg.jpg differ diff --git a/src/Presentation/Taskist.Web/wwwroot/js/alerts.js b/src/Presentation/Taskist.Web/wwwroot/js/alerts.js new file mode 100644 index 0000000..cf4657e --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/alerts.js @@ -0,0 +1,48 @@ +(function () { + "use strict"; + + if (typeof signalR === "undefined") return; + if (!document.getElementById("alertBell")) return; + + function toggle(el, hidden) { + if (el) el.classList.toggle("d-none", hidden); + } + + function setText(id, value) { + var el = document.getElementById(id); + if (el) el.textContent = value; + } + + function apply(data) { + var pending = (data && data.pendingApprovals) || 0; + var overdue = (data && data.overdueTasks) || 0; + var unread = (data && data.unreadNotifications) || 0; + var total = pending + overdue + unread; + + setText("notifUnreadCount", unread); + toggle(document.getElementById("notifUnreadCount"), unread === 0); + if (window.WpNotifications) window.WpNotifications.refresh(); + + setText("alertBadge", total); + toggle(document.getElementById("alertBadge"), total === 0); + + setText("alertHeaderCount", total); + toggle(document.getElementById("alertHeaderCount"), total === 0); + + toggle(document.getElementById("alertEmpty"), total !== 0); + + setText("alertApprovalsCount", pending); + toggle(document.getElementById("alertApprovals"), pending === 0); + + setText("alertOverdueCount", overdue); + toggle(document.getElementById("alertOverdue"), overdue === 0); + } + + var connection = new signalR.HubConnectionBuilder() + .withUrl("/hubs/alerts") + .withAutomaticReconnect() + .build(); + + connection.on("alerts", apply); + connection.start().catch(function () { }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/announcement.js b/src/Presentation/Taskist.Web/wwwroot/js/announcement.js new file mode 100644 index 0000000..b7aa242 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/announcement.js @@ -0,0 +1,91 @@ +(function () { + "use strict"; + + function acknowledge(id, done) { + $.ajax({ + url: "/AnnouncementFeed/Acknowledge?id=" + id, + type: "POST", + data: JSManager && JSManager.addAntiForgeryToken ? JSManager.addAntiForgeryToken({}) : {} + }).always(function () { if (done) done(); }); + } + + // ---- Sticky banners: session-dismiss (returns next login) ---- + function isDismissed(id) { + try { return sessionStorage.getItem("annDismissed_" + id) === "1"; } catch (e) { return false; } + } + + function initStickyDismiss() { + // Banners render hidden; reveal only those not dismissed this session. + // (Prevents the dismissed-then-flash when the server re-renders on navigation.) + $(".ann-banner").each(function () { + var $b = $(this); + if (!isDismissed($b.attr("data-ann-id"))) + $b.removeClass("ann-banner--pending"); + }); + $(document).off("click.anndismiss").on("click.anndismiss", "[data-ann-dismiss]", function () { + var id = $(this).attr("data-ann-dismiss"); + try { sessionStorage.setItem("annDismissed_" + id, "1"); } catch (e) { } + $(this).closest(".ann-banner").remove(); + }); + } + + // ---- Standard banners: explicit Acknowledge (permanent) ---- + function initAcknowledge() { + $(document).off("click.annack").on("click.annack", "[data-ann-ack]", function () { + var $btn = $(this); + var id = $btn.attr("data-ann-ack"); + $btn.prop("disabled", true); + acknowledge(id, function () { $btn.closest(".ann-banner").remove(); }); + }); + } + + // ---- One-time modal ---- + function readData() { + var el = document.getElementById("annData"); + if (!el) return []; + try { return JSON.parse(el.textContent) || []; } catch (e) { return []; } + } + + function showOneTime(items) { + if (!items.length || typeof bootstrap === "undefined") return; + var modalEl = document.getElementById("annModal"); + if (!modalEl) return; + + // Modal markup is rendered inside the sticky header (its own stacking + // context), which traps it under the body-level backdrop. Re-parent to + // so it layers correctly and is clickable. + if (modalEl.parentElement !== document.body) + document.body.appendChild(modalEl); + + var modal = new bootstrap.Modal(modalEl); + var queue = items.slice(); + + var SEV = { 0: "ann-modal--info", 1: "ann-modal--success", 2: "ann-modal--warning", 3: "ann-modal--critical" }; + var SEV_ICON = { 0: "fas fa-circle-info", 1: "fas fa-circle-check", 2: "fas fa-triangle-exclamation", 3: "fas fa-circle-exclamation" }; + + function next() { + if (!queue.length) return; + var a = queue.shift(); + document.getElementById("annModalTitle").textContent = a.title; + document.getElementById("annModalBody").innerHTML = a.body; + var head = document.getElementById("annModalHead"); + head.className = "ann-modal__head " + (SEV[a.severity] || SEV[0]); + document.getElementById("annModalIcon").className = SEV_ICON[a.severity] || SEV_ICON[0]; + $("#annModalAck").off("click").on("click", function () { + acknowledge(a.id, function () { modal.hide(); }); + }); + modalEl.addEventListener("hidden.bs.modal", function handler() { + modalEl.removeEventListener("hidden.bs.modal", handler); + next(); + }); + modal.show(); + } + next(); + } + + $(function () { + initStickyDismiss(); + initAcknowledge(); + showOneTime(readData()); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/app.js b/src/Presentation/Taskist.Web/wwwroot/js/app.js index 1af0b26..7731aba 100644 --- a/src/Presentation/Taskist.Web/wwwroot/js/app.js +++ b/src/Presentation/Taskist.Web/wwwroot/js/app.js @@ -1,4 +1,4 @@ -let JSManager = AppJS.getInstance(); +let JSManager = AppJS.getInstance(); $(function () { JSManager.setMandatorySymbol(); }); \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/wwwroot/js/appearance-boot.js b/src/Presentation/Taskist.Web/wwwroot/js/appearance-boot.js new file mode 100644 index 0000000..4d1f21f --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/appearance-boot.js @@ -0,0 +1,42 @@ +/* Applies the user's appearance before first paint: "auto" follows the OS colour scheme (and keeps following it live). + TaskistAppearance.set(mode, accent) switches without a reload; listeners get a "taskist:themechange" event. */ +(function () { + "use strict"; + + var root = document.documentElement; + var media = window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null; + + function notify() { + try { + document.dispatchEvent(new CustomEvent("taskist:themechange", { detail: { theme: root.getAttribute("data-coreui-theme"), accent: root.getAttribute("data-app-accent") } })); + } catch (e) { } + } + + function apply() { + var mode = root.getAttribute("data-app-theme-mode") || "light"; + var theme = mode === "auto" ? (media && media.matches ? "dark" : "light") : mode; + if (root.getAttribute("data-coreui-theme") !== theme) { + root.setAttribute("data-coreui-theme", theme); + notify(); + } + } + + apply(); + + if (media) { + if (media.addEventListener) media.addEventListener("change", apply); + else if (media.addListener) media.addListener(apply); + } + + window.TaskistAppearance = { + theme: function () { return root.getAttribute("data-coreui-theme") || "light"; }, + mode: function () { return root.getAttribute("data-app-theme-mode") || "light"; }, + accent: function () { return root.getAttribute("data-app-accent") || "indigo"; }, + set: function (mode, accent) { + if (mode) root.setAttribute("data-app-theme-mode", mode); + if (accent) root.setAttribute("data-app-accent", accent); + apply(); + notify(); + } + }; +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/appearance.js b/src/Presentation/Taskist.Web/wwwroot/js/appearance.js new file mode 100644 index 0000000..46a1398 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/appearance.js @@ -0,0 +1,75 @@ +/* Appearance switching: My profile tiles/swatches and the header quick toggle. Applies instantly via + TaskistAppearance (appearance-boot.js) and saves to the user's profile in the background. */ +(function () { + "use strict"; + + if (!window.TaskistAppearance) return; + + function save(url, data) { + $.ajax({ + type: "POST", + url: url, + data: JSManager.addAntiForgeryToken(data), + success: function (r) { + if (!r || r.status !== 2000) JSManager.showError((r && r.message) || "Could not save the appearance."); + }, + error: function () { JSManager.showError("Could not save the appearance."); } + }); + } + + function markSelected($items, attr, value) { + $items.each(function () { + var on = String($(this).data(attr)) === value; + $(this).toggleClass("is-selected", on).attr("aria-checked", on ? "true" : "false"); + }); + } + + function refreshToggle() { + var dark = TaskistAppearance.theme() === "dark"; + $(".js-theme-toggle").each(function () { + var $t = $(this); + $t.find(".js-theme-toggle-text").text(dark ? $t.data("light-text") : $t.data("dark-text")); + $t.find(".js-theme-toggle-icon").toggleClass("fa-moon", !dark).toggleClass("fa-sun", dark); + }); + } + + $(document).on("click", ".js-appearance-mode", function () { + var mode = String($(this).data("mode")); + TaskistAppearance.set(mode, null); + markSelected($(".js-appearance-mode"), "mode", mode); + save($(this).closest(".appearance-card").data("url"), { mode: mode }); + }); + + $(document).on("click", ".js-appearance-accent", function () { + var accent = String($(this).data("accent")); + TaskistAppearance.set(null, accent); + markSelected($(".js-appearance-accent"), "accent", accent); + save($(this).closest(".appearance-card").data("url"), { accent: accent }); + }); + + $(document).on("click", ".js-theme-toggle", function (e) { + e.preventDefault(); + var mode = TaskistAppearance.theme() === "dark" ? "light" : "dark"; + TaskistAppearance.set(mode, null); + markSelected($(".js-appearance-mode"), "mode", mode); + save($(this).data("url"), { mode: mode }); + }); + + var chartLight = null; + + function libraryDefaults() { + var dark = TaskistAppearance.theme() === "dark"; + if (window.tinymce && typeof tinymce.overrideDefaults === "function") { + tinymce.overrideDefaults({ license_key: "gpl", skin: dark ? "oxide-dark" : "oxide", content_css: dark ? "dark" : "default" }); + } + if (window.Chart && Chart.defaults) { + if (!chartLight) chartLight = { color: Chart.defaults.color, borderColor: Chart.defaults.borderColor }; + Chart.defaults.color = dark ? "rgba(255, 255, 255, 0.75)" : chartLight.color; + Chart.defaults.borderColor = dark ? "rgba(255, 255, 255, 0.1)" : chartLight.borderColor; + } + } + + libraryDefaults(); + document.addEventListener("taskist:themechange", function () { refreshToggle(); libraryDefaults(); }); + $(refreshToggle); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/beta-banner.js b/src/Presentation/Taskist.Web/wwwroot/js/beta-banner.js new file mode 100644 index 0000000..326e208 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/beta-banner.js @@ -0,0 +1,17 @@ +(function () { + "use strict"; + + $(function () { + var el = document.getElementById("betaBanner"); + if (!el) return; + + var report = document.getElementById("betaReport"); + if (report) { + var version = el.dataset.version || ""; + var subject = "Taskist beta v" + version + " — issue"; + var body = "Describe what happened:\n\n\n---\nVersion: " + version + "\nPage: " + window.location.href; + report.setAttribute("href", "mailto:" + (el.dataset.support || "") + + "?subject=" + encodeURIComponent(subject) + "&body=" + encodeURIComponent(body)); + } + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/common.js b/src/Presentation/Taskist.Web/wwwroot/js/common.js index 72fa656..ed9190d 100644 --- a/src/Presentation/Taskist.Web/wwwroot/js/common.js +++ b/src/Presentation/Taskist.Web/wwwroot/js/common.js @@ -1,36 +1,7 @@ -let jcModal = null; +let jcModal = null; let bsOffCanvas = null; let AppJS = (function () { let instance; - let options = { - "closeButton": true, - "debug": false, - "newestOnTop": false, - "progressBar": false, - "preventDuplicates": true, - "positionClass": "toast-top-center", - "onclick": null, - "showDuration": "300", - "hideDuration": "1000", - "timeOut": "5000", - "extendedTimeOut": "1000", - "showEasing": "swing", - "hideEasing": "linear", - "showMethod": "fadeIn", - "hideMethod": "fadeOut" - } - - let Toast = Swal.mixin({ - toast: true, - position: 'bottom', - iconColor: 'white', - customClass: { - popup: 'colored-toast' - }, - showConfirmButton: false, - timerProgressBar: true, - timer: 30000 - }); function createInstance() { return { @@ -57,7 +28,8 @@ let AppJS = (function () { select2.each(function () { let $this = $(this); $this.wrap('
').select2({ - placeholder: "Select value", + placeholder: $this.data("placeholder") || "Select value", + allowClear: $this.data("allow-clear") === true || $this.data("allow-clear") === "true", dropdownParent: $this.parent() }); }); @@ -118,6 +90,54 @@ let AppJS = (function () { event.preventDefault(); } }); + + this.initLadda(); + this.bindLadda(); + + this.NavGuard.bind(); + }, + initLadda: function (scope) { + let $root = scope ? $(scope) : $(document); + $root.find('button[type="submit"]').each(function () { + let $b = $(this); + if ($b.hasClass('ladda-button') || $b.hasClass('no-ladda')) + return; + $b.addClass('ladda-button'); + if (!$b.attr('data-style')) + $b.attr('data-style', 'zoom-out'); + if (!$b.children('.ladda-label').length) + $b.wrapInner(''); + }); + }, + bindLadda: function () { + $(document).on('mousedown keydown', 'button[type="submit"].ladda-button', function () { + $(this).closest('form').data('laddaClicked', this); + }); + + $(document).on('submit', 'form', function () { + if (!window.Ladda) + return; + let $form = $(this); + if ($form.hasClass('no-auto-ladda')) + return; + if ($form.find('[data-val="true"]').length && typeof $form.valid === 'function' && !$form.valid()) + return; + let btn = $form.data('laddaClicked') || $form.find('button[type="submit"].ladda-button')[0]; + $form.removeData('laddaClicked'); + if (!btn) + return; + let ladda = $(btn).data('laddaInstance'); + if (!ladda) { + ladda = Ladda.create(btn); + $(btn).data('laddaInstance', ladda); + } + ladda.start(); + }); + + $(document).ajaxComplete(function () { + if (window.Ladda) + Ladda.stopAll(); + }); }, bindPartialViewEvent: function () { $('.close-form').click(function () { @@ -132,51 +152,41 @@ let AppJS = (function () { let val = $(this).data('val'); let valRequired = $(this).data('val-required'); if (val && JSManager.hasValue(valRequired)) { - var label = $(this).closest(".mb-3").find("label"); - if (label.length && !label.find(".text-danger").length) { + let label = $(this).closest(".mb-3").find("label"); + if (label.length && !label.find(".text-danger").length && !label.hasClass('mandatory-added')) { + label.addClass('mandatory-added'); label.append(''); } } }); }, - openOffCanvas: function (loadurl, title) { + openOffCanvas: function (loadurl, title, callBackOnShown, callBackOnHide) { JSManager.renderPartial(loadurl, {}, 'pdOffCanvasBody', function (response) { $('#pdOffCanvasBodyTitle').text(title); bsOffCanvas = new bootstrap.Offcanvas('#pdOffCanvas'); + + let offcanvasElement = document.getElementById('pdOffCanvas'); + offcanvasElement.addEventListener('shown.bs.offcanvas', function () { + if (callBackOnShown !== undefined) + callBackOnShown(); + }); + + offcanvasElement.addEventListener('hide.bs.offcanvas', function () { + if (callBackOnHide !== undefined) + callBackOnHide(); + }); + bsOffCanvas.show(); }); }, - openForm: function (loadurl, title, columnClass, mode = 4, callbackContentReady) { - //Mode: Create = 1, Update = 2, Delete = 3, View = 4 - let buttonText = 'Save'; - switch (mode) { - case 1: - buttonText = 'Save'; - break; - case 2: - buttonText = 'Update'; - break; - case 3: - buttonText = 'Delete'; - break; - } - + openForm: function (loadurl, title, columnClass, callbackContentReady, hideButtons = true) { if (columnClass === undefined || columnClass === null || columnClass === '') columnClass = 'col-md-10'; + jcModal = $.confirm({ title: title, closeIcon: true, - content: function () { - let self = this; - return $.ajax({ - url: loadurl - }).done(function (response) { - self.setContentAppend(response); - }).fail(function (response) { - JSManager.showAppError(response.responseJSON); - jcModal.close(); - }); - }, + content: "URL:" + loadurl, type: 'blue', confirmButtonClass: 'hide', theme: 'bootstrap', @@ -185,30 +195,52 @@ let AppJS = (function () { useBootstrap: true, columnClass: columnClass, containerFluid: true, + escapeKey: false, + backgroundDismiss: false, buttons: { - yes: { - text: buttonText, - btnClass: 'btn-blue', - icon: 'fa fa-user', - isHidden: (mode === 4 || mode === 3), - action: function () { - $('.jconfirm-content form').submit(); - return false; - } - }, - no: { - text: 'Cancel', - btnClass: 'btn-secondary' + cancel: { + text: 'Close' + } + }, + onOpenBefore: function () { + if (hideButtons) { + this.$jconfirmBox.find('.jconfirm-buttons').remove(); } }, - escapeKey: false, - backgroundDismiss: false, onContentReady: function () { + JSManager.initPartialSelect2(this.$content); + JSManager.initPartialDatepickers(this.$content); + this.$content.trigger('partial:ready'); if (callbackContentReady !== undefined) callbackContentReady(); } }); }, + initPartialSelect2: function (context) { + if (!$.fn.select2) + return; + $('select.select2', context).each(function () { + let $this = $(this); + if ($this.hasClass('select2-hidden-accessible') || $this.data('select2')) + return; + $this.wrap('
').select2({ + placeholder: $this.data('placeholder') || 'Select value', + allowClear: $this.data('allow-clear') === true || $this.data('allow-clear') === 'true', + width: '100%', + dropdownParent: $this.parent() + }); + }); + }, + initPartialDatepickers: function (context) { + if (!$.fn.datepicker) + return; + $('.datepicker', context).each(function () { + let $this = $(this); + if ($this.data('datepicker')) + return; + $this.datepicker({ format: 'dd-M-yyyy', viewMode: 'date', autoclose: true, todayHighlight: true }); + }); + }, closeOffCanvas: function () { if (bsOffCanvas !== null) bsOffCanvas.hide(); @@ -240,6 +272,38 @@ let AppJS = (function () { } }); }, + NavGuard: { + dirty: false, + bypass: false, + _bound: false, + message: "You have unsaved changes. Leave without saving?", + markDirty: function () { this.dirty = true; }, + clear: function () { this.dirty = false; }, + isDirty: function () { return this.dirty === true; }, + leaveTo: function (href) { this.bypass = true; this.dirty = false; window.location.href = href; }, + bind: function () { + if (this._bound) return; + this._bound = true; + let self = this; + + $(document).on("click", "a[href]", function (e) { + if (self.bypass || !self.isDirty()) return; + + let $link = $(this); + let href = $link.attr("href"); + if (!href || href === "#" || href.toLowerCase().indexOf("javascript:") === 0) return; + if ($link.attr("target") === "_blank" || $link.is("[download]")) return; + if ($link.attr("data-bs-toggle") || $link.attr("data-coreui-toggle")) return; + + e.preventDefault(); + JSManager.confirm(self.message, function () { self.leaveTo(href); }); + }); + + window.addEventListener("beforeunload", function (e) { + if (!self.bypass && self.isDirty()) { e.preventDefault(); e.returnValue = ""; } + }); + } + }, showDeleteConfirmation: function (url, displayName, deleteButtonText, cancelButtonText) { if (displayName === undefined || displayName === null || displayName === '') displayName = 'this record'; @@ -441,16 +505,20 @@ let AppJS = (function () { }); }, reloadGrid: function (grid) { - if (grid != undefined) - $('#' + grid).DataTable().ajax.reload(this.postGridReload(grid)); - else + if (grid != undefined) { + if ($('#' + grid).length) + $('#' + grid).DataTable().ajax.reload(this.postGridReload(grid)); + } else if ($('.dataTable').length) { $('.dataTable').DataTable().ajax.reload(this.initPopover); + } }, reloadChildGrid: function (grid) { - if (grid != undefined) - $('#' + grid).DataTable().ajax.reload(this.initPopover); - else + if (grid != undefined) { + if ($('#' + grid).length) + $('#' + grid).DataTable().ajax.reload(this.initPopover); + } else if ($('.dataTable-child').length) { $('.dataTable-child').DataTable().ajax.reload(this.initPopover); + } }, postGridReload: function (grid) { let g = $('#' + grid).DataTable(); @@ -470,7 +538,7 @@ let AppJS = (function () { blockUI: function (element, message) { if (message === undefined) message = "Processing..."; - let block = $("#" + element); + let block = typeof element === "string" ? $("#" + element) : $(element); $(block).block({ message: ' ' + message, overlayCSS: { @@ -490,23 +558,19 @@ let AppJS = (function () { }); }, unblockUI: function (element) { - let block = $("#" + element); + let block = typeof element === "string" ? $("#" + element) : $(element); $(block).unblock(); }, showInfo: function (message) { - toastr.options = options; toastr["info"](message); }, showError: function (message) { - toastr.options = options; toastr["error"](message); }, showWarning: function (message) { - toastr.options = options; toastr["warning"](message); }, showSuccess: function (message) { - toastr.options = options; toastr["success"](message); }, showAppError: function (message) { @@ -528,7 +592,6 @@ let AppJS = (function () { }); }, closeMessage: function (message) { - toastr.options = options; toastr["remove"](message); }, showSwal: function (message, type) { @@ -786,8 +849,10 @@ let AppJS = (function () { return text; let data = text.toString(); if (data.length > maxLength) { - let newData = '' + data.substr(0, maxLength) + '…' + ''; - return newData; + let esc = function (s) { + return s.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); + }; + return '' + esc(data.substr(0, maxLength)) + '…' + ''; } return text; }, @@ -912,6 +977,18 @@ let AppJS = (function () { } } }); + }, + printDiv: function (divId) { + $(`#${divId}`).print({ + globalStyles: false, + mediaPrint: false, + iframe: true, + stylesheet: [ + "/lib/bootstrap/css/bootstrap.min.css" + ], + noPrintSelector: '.no-print', + deferred: $.Deferred() + }); } }; }; diff --git a/src/Presentation/Taskist.Web/wwwroot/js/datatable-helper.js b/src/Presentation/Taskist.Web/wwwroot/js/datatable-helper.js index c16d60e..1eca104 100644 --- a/src/Presentation/Taskist.Web/wwwroot/js/datatable-helper.js +++ b/src/Presentation/Taskist.Web/wwwroot/js/datatable-helper.js @@ -1,4 +1,4 @@ -let DataTable = { +let DataTable = { RenderActions: function (row, actions) { let result = ''; for (const element of actions) { @@ -53,39 +53,49 @@ if (curAction.NavigationType != 1) { if (curAction.DeleteConfirmBox) { let displayName = 'are you sure you want to delete this record?'; - if (JSManager.hasValue(curAction.DisplayReferenceParameter)) { + if (JSManager.hasValue(curAction.DeleteConfirmBoxMsg)) { + displayName = curAction.DeleteConfirmBoxMsg; + } else if (JSManager.hasValue(curAction.DisplayReferenceParameter)) { displayName = row[curAction.DisplayReferenceParameter]; } + displayName = displayName.replace(/'/g, "\\'"); url = "javascript:JSManager.showDeleteConfirmation('" + url + "','" + displayName + "')"; } else if (curAction.ConfirmBox) { url = "javascript:JSManager.ShowConfirmation('" + url + "','" + curAction.ConfirmBoxMsg + "','" + curAction.ModalSize + "')"; + } else if (curAction.NavigationType == 2) { + url = "javascript:JSManager.openForm('" + url + "','" + DataTable.CapitalizeText(title) + "','" + curAction.ModalSize + "')"; } else { url = "javascript:JSManager.openOffCanvas('" + url + "','" + DataTable.CapitalizeText(title) + "')"; } } + let openIn = '_self'; + if (curAction.OpenInBlankPage) { + openIn = '_blank'; + } + if (curAction.HyperLinkType === 2) { - finalUrl = ''; + finalUrl = ``; } else if (curAction.HyperLinkType === 1) { - finalUrl = '' + curAction.Text + ''; + finalUrl = `a title="${title}" href="${url}" class="btn ${btnClass} btn-sm me-1" target="${openIn}">${curAction.Text}`; } else if (curAction.HyperLinkType === 3) { - finalUrl = ' ' + curAction.Text + ''; + finalUrl = `${curAction.Text}`; } else if (curAction.HyperLinkType === 4) { - finalUrl = '' + curAction.Text + ''; + finalUrl = `${curAction.Text}`; } else if (curAction.HyperLinkType === 5) { - finalUrl = ''; + finalUrl = ``; } else if (curAction.HyperLinkType === 6) { - finalUrl = ' ' + curAction.Text + ''; + finalUrl = `${curAction.Text}`; } else { - finalUrl = '' + curAction.Text + ''; + finalUrl = `${curAction.Text}`; } return finalUrl; }, @@ -128,6 +138,16 @@ return DataTable.TextEllipsis(newData, maxLength); }, + RenderDayCount: function (data, row) { + var days = (data === null || data === undefined || data === '') ? '' : data; + var isHalf = row && (row.IsHalfDay === true || row.isHalfDay === true); + var portion = row ? (row.Portion || row.portion) : null; + if (isHalf) { + var half = (portion === 2 || portion === 'SecondHalf') ? 'Afternoon' : 'Morning'; + return days + ' ' + half + ''; + } + return days; + }, ButtonColorToCssClass: function (buttonColor) { let cssClass = 'btn-primary'; switch (buttonColor) { @@ -284,8 +304,10 @@ let data = text.toString(); if (data.length > maxLength) { - let newData = '' + data.substr(0, maxLength) + '…' + ''; - return newData; + let esc = function (s) { + return s.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); + }; + return '' + esc(data.substr(0, maxLength)) + '…' + ''; } return text; @@ -369,5 +391,168 @@ default: return value != undefined ? value.toString() : null; } + }, + RenderSelect: function (row, key, actableKey) { + let actable = !JSManager.hasValue(actableKey) || parseInt(row[actableKey]) === 1; + if (!actable) + return ''; + + let id = row[key]; + return ''; } -} \ No newline at end of file +} + +let DataTableSelect = { + Init: function (gridName, config) { + let $table = $('#' + gridName); + + $(document).on('change', '#selectAll_' + gridName, function () { + let checked = $(this).is(':checked'); + $table.find('tbody .dt-select-row').prop('checked', checked); + }); + + $(document).on('change', '#' + gridName + ' tbody .dt-select-row', function () { + let total = $table.find('tbody .dt-select-row').length; + let checked = $table.find('tbody .dt-select-row:checked').length; + $('#selectAll_' + gridName).prop('checked', total > 0 && total === checked); + }); + + $(document).on('click', '#' + config.ButtonId, function () { + DataTableSelect.SubmitSelected(gridName, config); + }); + }, + SelectedIds: function (gridName) { + let ids = []; + $('#' + gridName).find('tbody .dt-select-row:checked').each(function () { + ids.push($(this).val()); + }); + return ids; + }, + SubmitSelected: function (gridName, config) { + let ids = DataTableSelect.SelectedIds(gridName); + if (ids.length === 0) { + JSManager.showError(config.NoneMsg); + return; + } + + let msg = config.ConfirmMsg.replace('{0}', ids.length); + Swal.fire({ + text: msg, + icon: 'question', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#808080', + confirmButtonText: 'Yes', + cancelButtonText: 'No', + allowOutsideClick: false, + }).then((result) => { + if (!result.isConfirmed) + return; + + let dto = { ids: ids.join(',') }; + JSManager.addAntiForgeryToken(dto); + JSManager.ajaxPost(config.Url, dto, undefined, undefined, function (response) { + if (response.status === 2000) { + $('#selectAll_' + gridName).prop('checked', false); + $('#' + gridName).find('tbody .dt-select-row').prop('checked', false); + JSManager.reloadAllGrids(); + JSManager.showSuccess(response.message); + } else { + JSManager.showError(response.message); + } + }); + }); + } +}; + +/* Server-side grid search: one request after the user pauses typing instead of one per key press. + Runs 500 ms after the last keystroke (2+ characters), Enter searches at once, Esc or an empty box resets, + and an unchanged term never re-queries. Applied to every server-side DataTable via its init event. */ +(function ($) { + "use strict"; + + if (!$ || !$.fn || !$.fn.dataTable) return; + + var DELAY = 500; + var MIN_LENGTH = 2; + + $(document).on("init.dt", function (e, settings) { + if (e.namespace !== "dt" || !settings || !settings.oFeatures || !settings.oFeatures.bServerSide) return; + + var api = new $.fn.dataTable.Api(settings); + var $input = $(api.table().container()).find("div.dataTables_filter input"); + if (!$input.length || $input.data("searchDebounced")) return; + + var timer = null; + + function run(value, force) { + clearTimeout(timer); + var term = $.trim(value || ""); + if (!force && term.length > 0 && term.length < MIN_LENGTH) return; + if (term === api.search()) return; + api.search(term).draw(); + } + + $input.data("searchDebounced", true) + .off() + .on("input.dtsearch", function () { + var value = this.value; + clearTimeout(timer); + if (!$.trim(value)) { + run("", true); + return; + } + timer = setTimeout(function () { run(value, false); }, DELAY); + }) + .on("keydown.dtsearch", function (ev) { + if (ev.key === "Enter") { + ev.preventDefault(); + run(this.value, true); + } else if (ev.key === "Escape") { + this.value = ""; + run("", true); + } + }); + }); +})(window.jQuery); + +/* Empty grids: a proper empty state instead of "No records available". With a search term the grid says + "No results" and offers Clear search (list endpoints often report the same total either way, so the search + term — not recordsTotal — decides which message shows). Templates live in Sections/_EmptyTemplates. */ +(function ($) { + "use strict"; + + if (!$ || !$.fn || !$.fn.dataTable) return; + + function template(id) { + var tpl = document.getElementById(id); + return tpl ? tpl.innerHTML : null; + } + + $(document).on("preInit.dt", function (e, settings) { + if (e.namespace !== "dt") return; + var empty = template("wpGridEmptyTpl"); + if (!empty) return; + settings.oLanguage.sEmptyTable = empty; + settings.oLanguage.sZeroRecords = empty; + }); + + $(document).on("draw.dt", function (e, settings) { + if (e.namespace !== "dt") return; + var api = new $.fn.dataTable.Api(settings); + var empty = api.page.info().recordsDisplay === 0; + $(api.table().container()).find(".dataTables_info, .dataTables_paginate").toggleClass("d-none", empty); + if (!empty || !$.trim(api.search())) return; + var $cell = $(api.table().body()).find("td.dataTables_empty"); + var noMatch = template("wpGridNoMatchTpl"); + if ($cell.length && noMatch) $cell.html(noMatch); + }); + + $(document).on("click", ".js-grid-clear-search", function () { + var $wrapper = $(this).closest(".dataTables_wrapper"); + var $table = $wrapper.find("table.dataTable").first(); + if (!$table.length) return; + $wrapper.find("div.dataTables_filter input").val(""); + $table.DataTable().search("").draw(); + }); +})(window.jQuery); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/empty-state.js b/src/Presentation/Taskist.Web/wwwroot/js/empty-state.js new file mode 100644 index 0000000..8b652cc --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/empty-state.js @@ -0,0 +1,20 @@ +/* Empty/error state actions (no jQuery, so it also works on the minimal error layout): + .js-history-back goes back (or home when there is no history), .js-reload reloads the page. */ +(function () { + "use strict"; + + document.addEventListener("click", function (e) { + var back = e.target.closest ? e.target.closest(".js-history-back") : null; + if (back) { + e.preventDefault(); + if (window.history.length > 1) window.history.back(); + else window.location.href = document.baseURI || "/"; + return; + } + var reload = e.target.closest ? e.target.closest(".js-reload") : null; + if (reload) { + e.preventDefault(); + window.location.reload(); + } + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/image-lightbox.js b/src/Presentation/Taskist.Web/wwwroot/js/image-lightbox.js new file mode 100644 index 0000000..8c6db47 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/image-lightbox.js @@ -0,0 +1,64 @@ +/* Shared image preview: any element with .js-img-preview (data-src, data-name) inside a + .thumbnail-container opens a full-screen lightbox with prev/next, Esc and arrow keys. */ +(function () { + "use strict"; + + var images = []; + var index = 0; + + function ensureLightbox() { + if (document.getElementById("imgLightbox")) return; + $("body").append( + '
' + + '×' + + '❮' + + '' + + '❯' + + '
' + + "
"); + + var $lb = $("#imgLightbox"); + $lb.on("click", function (e) { if (e.target === this) close(); }); + $lb.find(".img-lightbox-close").on("click", close); + $lb.find(".img-lightbox-prev").on("click", function (e) { e.stopPropagation(); step(-1); }); + $lb.find(".img-lightbox-next").on("click", function (e) { e.stopPropagation(); step(1); }); + } + + function render() { + var el = images[index]; + if (!el) return; + var $lb = $("#imgLightbox"); + $lb.find(".img-lightbox-img").attr("src", $(el).data("src")); + $lb.find(".img-lightbox-caption").text($(el).data("name") || ""); + $lb.find(".img-lightbox-nav").toggle(images.length > 1); + } + + function step(delta) { + if (!images.length) return; + index = (index + delta + images.length) % images.length; + render(); + } + + function close() { + $("#imgLightbox").css("display", "none"); + } + + $(document) + .off("click.imgpreview") + .on("click.imgpreview", ".js-img-preview", function (e) { + e.preventDefault(); + ensureLightbox(); + images = $(this).closest(".thumbnail-container").find(".js-img-preview").toArray(); + index = images.indexOf(this); + render(); + $("#imgLightbox").css("display", "flex"); + }) + .off("keydown.imglightbox") + .on("keydown.imglightbox", function (e) { + var $lb = $("#imgLightbox"); + if (!$lb.length || $lb.css("display") === "none") return; + if (e.key === "Escape") close(); + else if (e.key === "ArrowLeft") step(-1); + else if (e.key === "ArrowRight") step(1); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/navbar.js b/src/Presentation/Taskist.Web/wwwroot/js/navbar.js new file mode 100644 index 0000000..5001461 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/navbar.js @@ -0,0 +1,111 @@ +(function () { + "use strict"; + + var input = document.getElementById('navSearchInput'); + if (!input) return; + + var box = document.getElementById('navSearchResults'); + var url = input.dataset.searchUrl; + var noResults = input.dataset.noresults || 'No results'; + var timer = null; + var current = []; + var activeIndex = -1; + + function itemEls() { + return Array.prototype.slice.call(box.querySelectorAll('.header-search__item')); + } + + function highlight() { + var els = itemEls(); + els.forEach(function (el, i) { el.classList.toggle('active', i === activeIndex); }); + if (activeIndex >= 0 && els[activeIndex]) els[activeIndex].scrollIntoView({ block: 'nearest' }); + } + + function esc(s) { + return (s || '').replace(/[&<>"]/g, function (c) { + return { '&': '&', '<': '<', '>': '>', '"': '"' }[c]; + }); + } + + function close() { box.classList.remove('show'); } + + function render(items) { + current = items || []; + activeIndex = -1; + if (!current.length) { + box.innerHTML = '
' + esc(noResults) + '
'; + box.classList.add('show'); + return; + } + var groups = {}; + current.forEach(function (r) { (groups[r.group] = groups[r.group] || []).push(r); }); + var html = ''; + Object.keys(groups).forEach(function (g) { + html += '
' + esc(g) + '
'; + groups[g].forEach(function (r) { + html += '' + + '' + + '' + esc(r.label) + '' + + (r.sublabel ? '' + esc(r.sublabel) + '' : '') + + ''; + }); + }); + box.innerHTML = html; + box.classList.add('show'); + } + + function run() { + var q = input.value.trim(); + if (q.length < 2) { close(); box.innerHTML = ''; return; } + $.getJSON(url, { q: q }).done(render).fail(close); + } + + input.addEventListener('input', function () { + clearTimeout(timer); + timer = setTimeout(run, 250); + }); + + input.addEventListener('keydown', function (e) { + var els = itemEls(); + if (e.key === 'ArrowDown') { + if (!els.length) return; + e.preventDefault(); + activeIndex = Math.min(activeIndex + 1, els.length - 1); + highlight(); + } else if (e.key === 'ArrowUp') { + if (!els.length) return; + e.preventDefault(); + activeIndex = Math.max(activeIndex - 1, 0); + highlight(); + } else if (e.key === 'Enter') { + if (!els.length) return; + e.preventDefault(); + var target = activeIndex >= 0 ? els[activeIndex] : els[0]; + if (target) window.location.href = target.getAttribute('href'); + } else if (e.key === 'Escape') { + close(); + } + }); + + document.addEventListener('click', function (e) { + if (!e.target.closest('#navSearch')) close(); + }); + + function isTypingTarget(el) { + if (!el) return false; + var t = (el.tagName || '').toLowerCase(); + return t === 'input' || t === 'textarea' || t === 'select' || el.isContentEditable; + } + + document.addEventListener('keydown', function (e) { + var key = (e.key || '').toLowerCase(); + if ((e.ctrlKey || e.metaKey) && key === 'k') { + e.preventDefault(); + input.focus(); + input.select(); + } else if (key === '/' && !isTypingTarget(e.target)) { + e.preventDefault(); + input.focus(); + } + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/notifications.js b/src/Presentation/Taskist.Web/wwwroot/js/notifications.js new file mode 100644 index 0000000..9f1c282 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/notifications.js @@ -0,0 +1,52 @@ +(function () { + "use strict"; + + var $list = $("#notifList"); + if (!$list.length) return; + + var loaded = false; + + function load() { + $.get($list.data("url")) + .done(function (html) { $list.html(html); loaded = true; }) + .fail(function () { $list.html(""); }); + } + + function isOpen() { + return $("#alertBell .dropdown-menu").hasClass("show"); + } + + window.WpNotifications = { + refresh: function () { if (loaded || isOpen()) load(); } + }; + + var toggleButton = document.querySelector("#alertBell .header-bell"); + if (toggleButton) + toggleButton.addEventListener("click", function () { if (!isOpen()) load(); }); + + $list.on("click", ".header-notif__item", function (e) { + var $item = $(this); + var href = $item.attr("href"); + var external = $item.attr("target") === "_blank"; + if (!external) e.preventDefault(); + + $item.removeClass("is-unread"); + $.ajax({ + type: "POST", + url: $list.data("read-url"), + data: JSManager.addAntiForgeryToken({ id: $item.data("id") }) + }).always(function () { + if (!external && href && href !== "#") window.location.href = href; + }); + }); + + $(document).on("click", "#alertBell .header-notif__readall", function () { + $.ajax({ + type: "POST", + url: $list.data("read-all-url"), + data: JSManager.addAntiForgeryToken({}) + }).done(function () { + $list.find(".header-notif__item").removeClass("is-unread"); + }); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/activity-log.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/activity-log.js new file mode 100644 index 0000000..fa639c0 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/activity-log.js @@ -0,0 +1,22 @@ +(function () { + "use strict"; + + $(function () { + function reload() { + ["ActivityGrid", "AuditGrid"].forEach(function (name) { + var grid = $("#" + name); + if (grid.length && $.fn.dataTable.isDataTable(grid)) { + grid.DataTable().ajax.reload(null, true); + } + }); + } + + $("#logApply").on("click", reload); + + $("#logReset").on("click", function () { + $("#logFrom, #logTo").val(""); + $("#logUser, #logType, #logAction").val("").trigger("change"); + reload(); + }); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/announcement/announcement-form.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/announcement/announcement-form.js new file mode 100644 index 0000000..aadd273 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/announcement/announcement-form.js @@ -0,0 +1,38 @@ +(function () { + "use strict"; + + // Rich-text body + if (typeof tinymce !== "undefined" && document.getElementById("annBody")) { + tinymce.remove("#annBody"); + tinymce.init({ + selector: "#annBody", + menubar: false, + height: 260, + plugins: "link lists autolink", + toolbar: "undo redo | bold italic underline | bullist numlist | link | removeformat", + setup: function (editor) { + editor.on("change keyup", function () { editor.save(); }); + } + }); + $(document).off("submit.rtbody").on("submit.rtbody", "form", function () { + if (tinymce.triggerSave) tinymce.triggerSave(); + }); + } + + // Audience targeting: reveal role/department picker per selected audience. + function applyAudience() { + var val = String($("#annAudience").val()); + var showRoles = val === "1", showDepts = val === "2"; + $("#annRolesWrap").toggleClass("d-none", !showRoles); + $("#annDepartmentsWrap").toggleClass("d-none", !showDepts); + if (showRoles) $("#annRolesWrap select").trigger("change.select2"); + if (showDepts) $("#annDepartmentsWrap select").trigger("change.select2"); + } + + $(function () { + if ($("#annAudience").length) { + applyAudience(); + $("#annAudience").on("change", applyAudience); + } + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-activity.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-activity.js new file mode 100644 index 0000000..26b7cf5 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-activity.js @@ -0,0 +1,51 @@ +var BacklogActivity = (function () { + "use strict"; + + var $card; + var loaded = {}; + var panes = { comments: "activityComments", history: "activityHistory" }; + + function updateCount() { + var n = $("#" + panes.comments).find(".comment-item").length; + $card.find(".activity-count").text(n).toggleClass("d-none", n === 0); + } + + function load(which, force) { + if (!$card || !$card.length || (loaded[which] && !force)) return; + loaded[which] = true; + JSManager.renderPartial($card.data(which + "-url"), {}, panes[which], function () { + if (which === "comments") updateCount(); + }); + } + + function show(which) { + if (!$card || !$card.length) return; + var tab = $card.find('[data-activity="' + which + '"]')[0]; + if (tab) bootstrap.Tab.getOrCreateInstance(tab).show(); + load(which); + $card[0].scrollIntoView({ behavior: "smooth", block: "start" }); + if (which === "comments") setTimeout(function () { $("#" + panes.comments).find(".comment-input").trigger("focus"); }, 350); + } + + $(function () { + $card = $("#taskActivityCard"); + if (!$card.length) return; + + $card.on("shown.bs.tab", "[data-activity]", function () { load($(this).data("activity")); }); + $card.on("comments:added", updateCount); + + $(document).on("click", "[data-activity-open]", function (e) { + e.preventDefault(); + show($(this).data("activity-open")); + }); + + $(document).on("backlog:saved", function () { + loaded.history = false; + if ($("#" + panes.history).hasClass("active")) load("history", true); + }); + + load("comments"); + }); + + return { show: show }; +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-branch.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-branch.js new file mode 100644 index 0000000..75bcb6c --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-branch.js @@ -0,0 +1,400 @@ +/* Git branch actions (create / link / unlink) for GitHub and GitLab, shared by the task page and the Backlog grid. + Errors raised while a dialog is open are shown inside that dialog (with the Git server's own message); + errors with no dialog open fall back to a SweetAlert. Branch creation uses the clicker's own + Git account, so a "connect your account" panel is shown when they have not connected yet. */ +var BacklogBranch = (function () { + "use strict"; + + var PREFIXES = ["feature", "bugfix", "task", "hotfix"]; + + function escapeHtml(value) { + return $("
").text(String(value == null ? "" : value)).html(); + } + + function gitLabError(message) { + JSManager.showSwal(message || "Request to the Git server failed.", "error"); + } + + function connectLink() { + var url = $("[data-connect-url]").first().data("connect-url"); + var label = $("[data-connect-url]").first().data("connect-label") || "Connect my Git account"; + return url ? "" + escapeHtml(label) + "" : ""; + } + + function repositorySelect(repositories, selected) { + if (!repositories || repositories.length < 2) return ""; + return ""; + } + + function showDialogError($content, message, needsConnection) { + var $box = $content.find(".branch-dialog-error"); + $box.html("" + escapeHtml(message || "Request to the Git server failed.") + + (needsConnection ? "
" + connectLink() + "
" : "")).removeClass("d-none"); + $box[0].scrollIntoView({ block: "nearest" }); + } + + function post(url, data, onSuccess, $btn, $dialogContent) { + if ($btn) $btn.prop("disabled", true); + if ($dialogContent) $dialogContent.find(".branch-dialog-error").addClass("d-none").empty(); + + var fail = function (message, needsConnection) { + if ($dialogContent && $dialogContent.closest("body").length) showDialogError($dialogContent, message, needsConnection); + else gitLabError(message); + }; + + $.ajax({ + type: "POST", + url: url, + data: JSManager.addAntiForgeryToken(data), + success: function (r) { + if (r && r.status === 2000) onSuccess(r); + else fail(r ? r.message : null, r && r.needsConnection); + }, + error: function (xhr) { fail("Request failed (" + xhr.status + ")."); }, + complete: function () { if ($btn) $btn.prop("disabled", false); } + }); + } + + function withPrefix(name, prefix) { + var rest = name.indexOf("/") >= 0 ? name.substring(name.indexOf("/") + 1) : name; + return prefix + "/" + rest; + } + + function skippedHtml(skipped, editUrl) { + if (!skipped || !skipped.length) return ""; + return "
" + skipped.length + " task(s) will not be linked:
"; + } + + function busy($btn, on) { + if (!$btn || !$btn.length) return; + if (on) { + $btn.data("busy-html", $btn.html()).prop("disabled", true).addClass("disabled"); + var $icon = $btn.find("i").first(); + if ($icon.length) $icon.attr("class", "fas fa-spinner fa-spin me-1"); + else $btn.prepend(""); + } else { + var html = $btn.data("busy-html"); + if (html !== undefined) $btn.html(html); + $btn.prop("disabled", false).removeClass("disabled"); + } + } + + function openCreate(cfg) { + var $trigger = $(cfg.trigger); + if ($trigger.prop("disabled")) return; + busy($trigger, true); + $.get(cfg.contextUrl, { ids: cfg.ids.join(","), repositoryId: cfg.repositoryId || null }) + .done(function (ctx) { + if (!ctx || ctx.status !== 2000) { gitLabError(ctx ? ctx.message : null); return; } + if (!ctx.canCreate) { gitLabError(cfg.labels.disabled); return; } + + if (ctx.needsConnection) { + $.alert({ + title: cfg.labels.createTitle, + icon: "fas fa-code-branch", + columnClass: "medium", + content: "
" + + "
" + escapeHtml(ctx.connectionMessage) + "
" + + "
" + escapeHtml(cfg.labels.connectWhy || "") + "
" + + connectLink() + "
", + buttons: { close: { text: "Close" } } + }); + return; + } + + var options = (ctx.baseBranches || []).map(function (b) { + return ""; + }).join(""); + + var prefixButtons = PREFIXES.map(function (p) { + return ""; + }).join(" "); + + var existing = ctx.existing || []; + var existingIds = existing.map(function (s) { return s.id; }); + var onlyExisting = !(ctx.eligible || []).length && existing.length > 0; + var existingHtml = existing.length + ? "
" + + "
" + escapeHtml(onlyExisting ? cfg.labels.existingAll : cfg.labels.existingSome) + "
" + + "" + + "
" + + "
" + : ""; + var targetIds = function ($c) { + var ids = (ctx.eligible || []).slice(); + if ($c.find(".branch-include-existing").is(":checked")) ids = ids.concat(existingIds); + return ids; + }; + + var content = + repositorySelect(ctx.repositories, ctx.repositoryId) + + skippedHtml(ctx.skipped, cfg.editUrl) + existingHtml + + ((ctx.eligible || []).length ? "

" + escapeHtml(String(cfg.labels.linkInfo).replace("{0}", (ctx.eligible || []).map(function (i) { return "#" + i; }).join(", "))) + "

" : "") + + "" + + "" + + "
" + prefixButtons + "
" + + "" + + "" + + ""; + + $.confirm({ + title: cfg.labels.createTitle, + icon: "fas fa-code-branch", + columnClass: "medium", + content: content, + onContentReady: function () { + var dialog = this; + var $c = dialog.$content; + $c.find(".branch-repo").on("change", function () { + dialog.close(); + openCreate($.extend({}, cfg, { repositoryId: $(this).val() })); + }); + $c.find(".branch-prefix").on("click", function () { + var $input = $c.find(".branch-name"); + $input.val(withPrefix($input.val(), $(this).data("prefix"))); + }); + if (onlyExisting) { + dialog.buttons.create.disable(); + $c.find(".branch-include-existing").on("change", function () { + if (this.checked) dialog.buttons.create.enable(); else dialog.buttons.create.disable(); + }); + } + }, + buttons: { + create: { + text: cfg.labels.create, + btnClass: "btn-blue", + action: function () { + var dialog = this; + var name = $.trim(dialog.$content.find(".branch-name").val() || ""); + var base = dialog.$content.find(".branch-base").val(); + if (!name) { showDialogError(dialog.$content, cfg.labels.nameRequired); return false; } + + var ids = targetIds(dialog.$content); + if (!ids.length) { showDialogError(dialog.$content, cfg.labels.existingAll); return false; } + post(cfg.createUrl, { ids: ids.join(","), name: name, baseBranch: base, repositoryId: ctx.repositoryId, includeExisting: dialog.$content.find(".branch-include-existing").is(":checked") }, function (r) { + dialog.close(); + JSManager.showSuccess(r.message); + copyCheckout(r.branch); + if (cfg.onDone) cfg.onDone(r); + }, dialog.$$create, dialog.$content); + return false; + } + }, + cancel: { text: "Cancel" } + } + }); + }) + .fail(function (xhr) { gitLabError("Request failed (" + xhr.status + ")."); }) + .always(function () { busy($trigger, false); }); + } + + function openLink(cfg) { + var content = + "
" + + "" + + "
" + + ""; + + $.confirm({ + title: cfg.labels.linkTitle, + icon: "fas fa-link", + columnClass: "medium", + content: content, + onContentReady: function () { + var dialog = this; + var $c = dialog.$content; + var timer = null; + var repositoryId = null; + + function search() { + var term = $.trim($c.find(".branch-search").val() || ""); + $c.find(".branch-results").html(""); + $.get(cfg.searchUrl, { id: cfg.taskId, term: term, repositoryId: repositoryId }) + .done(function (r) { + if (!r || r.status !== 2000) { $c.find(".branch-results").empty(); showDialogError($c, r ? r.message : null); return; } + if (r.repositories && r.repositories.length > 1 && !$c.find(".branch-repo").length) { + repositoryId = r.repositoryId; + $c.find(".branch-repo-holder").html(repositorySelect(r.repositories, r.repositoryId)); + $c.find(".branch-repo").on("change", function () { repositoryId = $(this).val(); search(); }); + } + var list = r.branches || []; + $c.find(".branch-results").html(list.length + ? "
" + list.map(function (b) { + return ""; + }).join("") + "
" + : "" + escapeHtml(cfg.labels.noResults) + ""); + }) + .fail(function (xhr) { showDialogError($c, "Request failed (" + xhr.status + ")."); }); + } + + $c.find(".branch-search").on("input", function () { + clearTimeout(timer); + timer = setTimeout(search, 300); + }).trigger("focus"); + + $c.on("click", ".branch-pick", function () { + post(cfg.linkUrl, { ids: cfg.taskId, name: $(this).data("name"), repositoryId: repositoryId }, function (r) { + dialog.close(); + JSManager.showSuccess(r.message); + if (cfg.onDone) cfg.onDone(r); + }, null, $c); + }); + + search(); + }, + buttons: { cancel: { text: "Cancel" } } + }); + } + + function unlink(cfg) { + JSManager.confirm(escapeHtml(String(cfg.labels.unlinkConfirm).replace("{0}", cfg.branchName)), function () { + post(cfg.unlinkUrl, { id: cfg.taskId, branchId: cfg.branchId }, function (r) { + JSManager.showSuccess(r.message); + if (cfg.onDone) cfg.onDone(r); + }); + }); + } + + function linkByName(cfg) { + post(cfg.linkUrl, { ids: cfg.taskId, name: cfg.name }, function (r) { + JSManager.showSuccess(r.message); + if (cfg.onDone) cfg.onDone(r); + }, cfg.$btn); + } + + function openCreateMergeRequest(cfg) { + var L = cfg.labels; + var $trigger = $(cfg.trigger); + if ($trigger.prop("disabled")) return; + busy($trigger, true); + $.get(cfg.contextUrl, { id: cfg.taskId, branchId: cfg.branchId }) + .done(function (ctx) { + if (!ctx || ctx.status !== 2000) { gitLabError(ctx ? ctx.message : null); return; } + + if (ctx.existingIid) { + $.alert({ + title: L.title, icon: "fas fa-code-pull-request", columnClass: "medium", + content: "
" + escapeHtml(String(L.existing).replace("{0}", ctx.existingIid)) + + (ctx.existingUrl ? " " + escapeHtml(ctx.refPrefix || "!") + escapeHtml(ctx.existingIid) + "" : "") + "
", + buttons: { close: { text: "Close" } } + }); + return; + } + + if (ctx.needsConnection) { + $.alert({ + title: L.title, icon: "fas fa-code-pull-request", columnClass: "medium", + content: "
" + + escapeHtml(ctx.connectionMessage) + "
" + connectLink() + "
", + buttons: { close: { text: "Close" } } + }); + return; + } + + var options = (ctx.targetBranches || []).map(function (b) { + return ""; + }).join(""); + var moves = ctx.openedStatus + ? "
" + + escapeHtml(String(L.moves).replace("{0}", (ctx.taskIds || []).map(function (i) { return "#" + i; }).join(", ")).replace("{1}", ctx.openedStatus)) + "
" + : ""; + + var content = + "" + + "" + + "
" + + "
" + escapeHtml(L.from) + "" + escapeHtml(ctx.sourceBranch) + "
" + + "" + + "
" + escapeHtml(L.into) + "
" + + "
" + + "" + + "" + + "
" + escapeHtml(L.reviewer) + ": " + escapeHtml(ctx.reviewer || L.noReviewer) + "
" + + "
" + + "
" + + moves + + ""; + + $.confirm({ + title: L.title, + icon: "fas fa-code-pull-request", + columnClass: "col-md-8", + content: content, + onContentReady: function () { + var $c = this.$content; + $c.find(".mr-draft").on("change", function () { $c.find(".mr-dialog__note").toggleClass("is-muted", this.checked); }); + }, + buttons: { + create: { + text: L.create, + btnClass: "btn-blue", + action: function () { + var dialog = this; + var $c = dialog.$content; + var title = $.trim($c.find(".mr-title").val() || ""); + if (!title) { showDialogError($c, L.titleRequired); return false; } + + post(cfg.createUrl, { + id: cfg.taskId, + branchId: cfg.branchId, + title: title, + targetBranch: $c.find(".mr-target").val(), + description: $c.find(".mr-description").val(), + draft: $c.find(".mr-draft").is(":checked"), + removeSourceBranch: $c.find(".mr-remove").is(":checked") + }, function (r) { + dialog.close(); + JSManager.showSuccess(r.message); + if (cfg.onDone) cfg.onDone(r); + }, dialog.$$create, $c); + return false; + } + }, + cancel: { text: "Cancel" } + } + }); + }) + .fail(function (xhr) { gitLabError("Request failed (" + xhr.status + ")."); }) + .always(function () { busy($trigger, false); }); + } + + function copyCheckout(branch) { + if (!branch || !navigator.clipboard) return; + navigator.clipboard.writeText("git fetch origin; git checkout '" + branch + "'").catch(function () { }); + } + + $(document).on("click", "#btnBulkCreateBranch", function () { + var $btn = $(this); + var d = $btn.data(); + var ids = (typeof selectedRows !== "undefined") ? Array.from(selectedRows) : []; + if (!ids.length) return; + + openCreate({ + ids: ids, + trigger: $btn, + contextUrl: d.contextUrl, + createUrl: d.createUrl, + editUrl: d.editUrl, + labels: { + createTitle: d.labelCreateTitle, create: d.labelCreate, name: d.labelName, base: d.labelBase, + linkInfo: d.labelLinkInfo, nameRequired: d.labelNameRequired, disabled: d.labelDisabled, connectWhy: d.labelConnectWhy, + existingSome: d.labelExistingSome, existingAll: d.labelExistingAll, includeExisting: d.labelIncludeExisting + }, + onDone: function () { + if (typeof resetSelection === "function") resetSelection(); + if (window.BacklogRefresh) BacklogRefresh.refresh(); + } + }); + }); + + return { openCreate: openCreate, openLink: openLink, unlink: unlink, linkByName: linkByName, openCreateMergeRequest: openCreateMergeRequest, gitLabError: gitLabError }; +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-closing.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-closing.js new file mode 100644 index 0000000..0afaf3d --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-closing.js @@ -0,0 +1,66 @@ +/* Closing pop-up: resolves the picked / manually typed MR into MergeRequestId, + and reloads the task page once the status move is saved. */ +(function () { + "use strict"; + + function sync($form) { + var pick = $form.find('input[name="closingMrPick"]:checked').val(); + var value = pick === "manual" ? $.trim($form.find(".closing-mr-manual").val() || "") : (pick || ""); + $form.find(".closing-mr-value").val(value); + $form.find(".closing-mr-repo").val(pick === "manual" ? "" : ($form.find('input[name="closingMrPick"]:checked').data("repository-id") || "")); + $form.find(".closing-mr").each(function () { + $(this).toggleClass("is-selected", $(this).find('input[type="radio"]').is(":checked")); + }); + } + + $(document) + .off(".closingForm") + .on("change.closingForm", '.closing-form input[name="closingMrPick"]', function () { + var $form = $(this).closest(".closing-form"); + if ($(this).val() === "manual") $form.find(".closing-mr-manual").trigger("focus"); + sync($form); + }) + .on("input.closingForm focus.closingForm", ".closing-form .closing-mr-manual", function () { + var $form = $(this).closest(".closing-form"); + $form.find('input[name="closingMrPick"][value="manual"]').prop("checked", true); + sync($form); + }) + .on("submit.closingForm", ".closing-form", function () { + sync($(this)); + }); + + function sanitize(html) { + var doc = new DOMParser().parseFromString("
" + (html || "") + "
", "text/html"); + $(doc).find("script,style,iframe,object,embed,link,meta,form").remove(); + $(doc).find("*").each(function () { + for (var i = this.attributes.length - 1; i >= 0; i--) { + var attr = this.attributes[i]; + var name = attr.name.toLowerCase(); + if (name.indexOf("on") === 0 || ((name === "href" || name === "src") && /^\s*javascript:/i.test(attr.value))) + this.removeAttribute(attr.name); + } + }); + $(doc).find("a[href]").attr({ target: "_blank", rel: "noopener" }); + return doc.body.firstChild ? doc.body.firstChild.innerHTML : ""; + } + + $(".closing-form").each(function () { sync($(this)); }); + + $(".closing-rich[data-html]").each(function () { + $(this).html(sanitize($(this).attr("data-html"))); + }); + + $(".closing-view-mr[data-url]").each(function () { + var $el = $(this); + JSManager.renderPartial($el.data("url"), { id: $el.data("task-id") }, this.id); + }); +})(); + +function closingCommentSaved(response) { + ajaxSuccess(response); + + if (response && response.status === 2000 && $("#backlog-edit-config").length) { + if (window.BacklogEdit) window.BacklogEdit.clear(); + window.location.reload(); + } +} diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-code.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-code.js new file mode 100644 index 0000000..697e281 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-code.js @@ -0,0 +1,150 @@ +(function () { + "use strict"; + + function formatTimes($root) { + $root.find(".task-code-time").each(function () { + var t = $(this).data("time"); + if (!t) return; + var m = moment(t); + $(this).text(m.fromNow()).attr("title", m.format("DD-MMM-YYYY HH:mm")); + }); + } + + function card() { return $("#taskCodeCard"); } + + function labels($card) { + var d = $card.data(); + return { + createTitle: d.labelCreateTitle, create: d.labelCreate, name: d.labelName, base: d.labelBase, + linkInfo: d.labelLinkInfo, nameRequired: d.labelNameRequired, disabled: d.labelDisabled, + linkTitle: d.labelLinkTitle, searchPlaceholder: d.labelSearchPlaceholder, noResults: d.labelNoResults, + unlinkConfirm: d.labelUnlinkConfirm, connectWhy: d.labelConnectWhy, + existingSome: d.labelExistingSome, existingAll: d.labelExistingAll, includeExisting: d.labelIncludeExisting + }; + } + + function load(refresh) { + var $card = card(); + if (!$card.length) return; + + var $body = $card.find(".task-code-body"); + var $btn = $card.find(".task-code-refresh"); + $btn.prop("disabled", true).find("i").addClass("fa-spin"); + + $.get($card.data("url"), { refresh: !!refresh }) + .done(function (html) { + $body.html(html); + formatTimes($body); + var error = $body.find(".task-code-error").data("error"); + if (refresh && error) BacklogBranch.gitLabError(error); + var $sum = $body.find(".task-code-summary"); + $(document).trigger("taskcode:loaded", { mrCount: parseInt($sum.data("mr-count"), 10) || 0, state: $sum.data("state") || "" }); + }) + .fail(function (xhr) { + $body.html('
Could not load code information.
'); + if (refresh) BacklogBranch.gitLabError("Could not load code information (" + xhr.status + ")."); + }) + .always(function () { + $btn.prop("disabled", false).find("i").removeClass("fa-spin"); + }); + } + + $(document) + .on("click", "#taskCodeCard .task-code-refresh", function () { load(true); }) + .on("click", "#taskCodeCard .task-code-copy", function () { + var text = $(this).data("copy"); + if (navigator.clipboard && text) { + navigator.clipboard.writeText(text).then(function () { JSManager.showSuccess("Copied: " + text); }); + } + }) + .on("click", "#taskCodeCard .task-code-create", function () { + var $card = card(); + BacklogBranch.openCreate({ + trigger: this, + ids: [$card.data("task-id")], + contextUrl: $card.data("context-url"), + createUrl: $card.data("create-url"), + editUrl: $card.data("edit-url"), + labels: labels($card), + onDone: function () { load(true); } + }); + }) + .on("click", "#taskCodeCard .task-code-link", function () { + var $card = card(); + BacklogBranch.openLink({ + taskId: $card.data("task-id"), + searchUrl: $card.data("search-url"), + linkUrl: $card.data("link-url"), + labels: labels($card), + onDone: function () { load(true); } + }); + }) + .on("click", "#taskCodeCard .task-code-unlink", function () { + var $card = card(); + BacklogBranch.unlink({ + taskId: $card.data("task-id"), + branchId: $(this).data("branch-id"), + branchName: $(this).data("branch-name"), + unlinkUrl: $card.data("unlink-url"), + labels: labels($card), + onDone: function () { load(true); } + }); + }) + .on("click", "#taskCodeCard .task-code-link-source", function () { + var $card = card(); + BacklogBranch.linkByName({ + taskId: $card.data("task-id"), + linkUrl: $card.data("link-url"), + name: $(this).data("name"), + $btn: $(this), + onDone: function () { load(true); } + }); + }); + + $(function () { load(false); }); +})(); + +/* Code card: open the review drawer for an MR, and refresh the card after a review action. */ +(function () { + "use strict"; + + $(document) + .on("click", "#taskCodeCard .task-code-review", function () { + var $btn = $(this); + JSManager.openForm($btn.data("url"), $("
").text($btn.data("title")).html(), "col-md-11"); + }) + .on("review:changed", function () { + $("#taskCodeCard .task-code-refresh").trigger("click"); + }); +})(); + +/* Code card: create a merge request for a linked branch with the developer's own GitHub/GitLab account. */ +(function () { + "use strict"; + + $(document).on("click", "#taskCodeCard .task-code-create-mr", function () { + var $card = $("#taskCodeCard"); + var d = $card.data(); + BacklogBranch.openCreateMergeRequest({ + trigger: this, + taskId: d.taskId, + branchId: $(this).data("branch-id"), + contextUrl: d.mrContextUrl, + createUrl: d.mrCreateUrl, + labels: { + title: d.labelMrTitle, fieldTitle: d.labelMrFieldTitle, from: d.labelMrFrom, into: d.labelMrInto, + description: d.labelMrDescription, reviewer: d.labelMrReviewer, noReviewer: d.labelMrNoReviewer, + draft: d.labelMrDraft, remove: d.labelMrRemove, moves: d.labelMrMoves, existing: d.labelMrExisting, + create: d.labelMrCreate, titleRequired: d.labelMrTitleRequired + }, + onDone: function (r) { + $card.find(".task-code-refresh").trigger("click"); + if (r && r.moved > 0) { + var unsaved = window.BacklogEdit && window.BacklogEdit.hasChanges && window.BacklogEdit.hasChanges(); + if (unsaved) JSManager.showSwal(d.labelMrStatusMoved, "info"); + else setTimeout(function () { window.location.reload(); }, 1200); + } + } + }); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-comments.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-comments.js new file mode 100644 index 0000000..739ab9c --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-comments.js @@ -0,0 +1,83 @@ +var BacklogComments = (function () { + "use strict"; + + function refreshTimes($root) { + $root.find(".comment-time[data-time]").each(function () { + var m = moment($(this).data("time")); + $(this).text(m.fromNow()).attr("title", m.format("DD-MMM-YYYY HH:mm")); + }); + } + + function autoGrow(el) { + el.style.height = "auto"; + el.style.height = Math.min(el.scrollHeight, 120) + "px"; + } + + function setup($root) { + var $scroll = $root.find(".comments-container"); + var $list = $root.find(".comments-list"); + var $input = $root.find(".comment-input"); + var $btn = $root.find(".comment-send"); + var inDrawer = $root.closest(".offcanvas").length > 0; + + function scrollToBottom() { + if ($scroll.length) $scroll[0].scrollTop = $scroll[0].scrollHeight; + } + + function addComment() { + var comment = $input.val().trim(); + if (!comment) return; + + var dto = { id: $root.data("task-id"), comment: comment, postToIssue: $root.find(".comment-post-to-issue").is(":checked") }; + JSManager.ajaxPost($root.data("create-url"), dto, "comment-box", "Processing...", function (response) { + var $item = $('
' + + '
' + + '
' + + '
' + + '
' + + "
"); + $item.find(".comment-avatar").html($('').attr("src", $root.data("photo-url") + "?userId=" + response.commentbyid)); + $item.find(".comment-author").text(response.commentby); + $item.find(".comment-time").text("just now"); + $item.find(".comment-text").text(comment); + $list.append($item); + $root.find(".comments-empty").addClass("d-none"); + $input.val("").trigger("input").focus(); + scrollToBottom(); + $root.trigger("comments:added", [$list.children(".comment-item").length]); + }); + } + + refreshTimes($root); + scrollToBottom(); + if (inDrawer) $input.focus(); + + $input.on("input", function () { + $btn.prop("disabled", $(this).val().trim().length === 0); + autoGrow(this); + }); + + $input.on("keydown", function (e) { + if (e.which === 13 && !e.shiftKey) { + e.preventDefault(); + addComment(); + } + }); + + $btn.on("click", addComment); + } + + function init(root) { + $(root).find(".comments-root:not([data-ready])").each(function () { + setup($(this).attr("data-ready", "true")); + }); + } + + if (window.MutationObserver) { + new MutationObserver(function () { init(document); }) + .observe(document.body, { childList: true, subtree: true }); + } + $(function () { init(document); }); + + return { init: init }; +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-custom-fields.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-custom-fields.js new file mode 100644 index 0000000..12b2e6a --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-custom-fields.js @@ -0,0 +1,71 @@ +(function () { + "use strict"; + + var UPDATE_CLASS = "ajax-update-custom-field"; + + var config = function () { + var $cfg = $("#backlog-form-config"); + return { + id: Number.parseInt($cfg.data("id"), 10) || 0, + url: $cfg.data("custom-field-url") + }; + }; + + var valueOf = function ($input) { + if ($input.is(":checkbox")) + return $input.is(":checked") ? "true" : "false"; + if ($input.is(":radio")) + return $input.closest("form").find('input[name="' + $input.attr("name") + '"]:checked').val() || ""; + return ($input.val() || "").toString(); + }; + + var isValid = function ($input) { + if (String($input.data("val")) !== "true" || typeof $input.valid !== "function") + return true; + return $input.valid(); + }; + + var save = function (reference, value) { + if (window.BacklogEdit) { + window.BacklogEdit.markCustomDirty(reference, value); + return; + } + + var cfg = config(); + if (cfg.id <= 0 || !cfg.url) return; + + JSManager.ajaxPatch(cfg.url, { id: cfg.id, reference: reference, value: value }, undefined, undefined, function (response) { + JSManager.showSuccess(response.message); + }); + }; + + var initSliders = function (root) { + if (!$.fn.ionRangeSlider) return; + + $(root).find(".js-range-slider").each(function () { + var $input = $(this); + if ($input.data("ionRangeSlider")) return; + + $input.ionRangeSlider({ + skin: "big", + min: 0, + max: 100, + postfix: "%", + hide_min_max: true, + onFinish: function (data) { + if (!$input.hasClass(UPDATE_CLASS)) return; + save(Number.parseInt($input.data("reference"), 10), data.from); + } + }); + }); + }; + + $(document).off("change.customFields").on("change.customFields", "." + UPDATE_CLASS + ":not(.js-range-slider)", function () { + var $input = $(this); + if (!isValid($input)) return; + + save(Number.parseInt($input.data("reference"), 10), valueOf($input)); + }); + + $(function () { initSliders(document); }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-edit.js b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-edit.js new file mode 100644 index 0000000..123cbd7 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pages/backlog/backlog-edit.js @@ -0,0 +1,272 @@ +(function () { + "use strict"; + + var $cfg = $("#backlog-edit-config"); + if (!$cfg.length) return; + + var cfg = { + id: parseInt($cfg.data("id"), 10), + saveUrl: $cfg.data("save-url"), + saveAllUrl: $cfg.data("save-all-url"), + deleteUrl: $cfg.data("delete-url"), + indexUrl: $cfg.data("index-url"), + closingCheckUrl: $cfg.data("closing-check-url"), + closingUrl: $cfg.data("closing-url"), + closingTitle: $cfg.data("closing-title") || "Closing Comment" + }; + + window.BacklogEdit = { + dirty: new Set(), + collectionsDirty: false, + customDirty: {}, + + markDirty: function (name) { + if (!name) return; + this.dirty.add(name); + this.arm(); + }, + + markCollectionsDirty: function () { + this.collectionsDirty = true; + this.arm(); + }, + + markCustomDirty: function (reference, value) { + if (reference === undefined || reference === null) return; + this.customDirty[reference] = value; + this.arm(); + }, + + arm: function () { + $("#btnSaveBacklog").prop("disabled", false); + JSManager.NavGuard.markDirty(); + }, + + hasChanges: function () { + return this.dirty.size > 0 || this.collectionsDirty || Object.keys(this.customDirty).length > 0; + }, + + clear: function () { + this.dirty.clear(); + this.collectionsDirty = false; + this.customDirty = {}; + $("#btnSaveBacklog").prop("disabled", true); + JSManager.NavGuard.clear(); + $(document).trigger("backlog:saved"); + }, + + postChanges: function (names, reload, onSaved) { + var self = this; + + if (window.tinymce) tinymce.triggerSave(); + + var data = { id: cfg.id }; + names.forEach(function (n, i) { + data["changes[" + i + "].Name"] = n; + data["changes[" + i + "].Value"] = ($('[name="' + n + '"]').val() || "").toString(); + }); + + (($(".backlog-tags").val()) || []).forEach(function (v, i) { data["tags[" + i + "]"] = v; }); + + var refs = Object.keys(self.customDirty); + refs.forEach(function (ref, i) { + data["customFields[" + i + "].Reference"] = ref; + data["customFields[" + i + "].Value"] = self.customDirty[ref]; + }); + + $.ajax({ + type: "POST", + url: cfg.saveAllUrl, + data: JSManager.addAntiForgeryToken(data), + traditional: false, + dataType: "json", + beforeSend: function () { if (JSManager.blockUI) JSManager.blockUI(); }, + success: function (r) { + if (r.status === 2000) { + self.clear(); + if (onSaved) { onSaved(); return; } + JSManager.showSuccess(r.message); + if (reload) window.location.reload(); + } else { + JSManager.showError(r.message); + } + }, + error: function () { JSManager.showError("Save failed."); }, + complete: function () { if (JSManager.unblockUI) JSManager.unblockUI(); } + }); + }, + + save: function () { + if (!this.hasChanges()) return; + if (!$("#EditForm").valid()) return; + + var self = this; + var names = Array.from(this.dirty); + + if (this.dirty.has("StatusId")) { + var statusVal = $('[name="StatusId"]').val(); + var others = names.filter(function (n) { return n !== "StatusId"; }); + var checkAndClose = function () { + var resp = JSManager.ajaxGetWithResponse(cfg.closingCheckUrl, { id: cfg.id, taskType: $("#TaskTypeId").val(), status: statusVal }); + if (resp && resp.Valid) { + self.markDirty("StatusId"); + JSManager.openForm(cfg.closingUrl + "?id=" + cfg.id + "&status=" + statusVal, cfg.closingTitle, "col-md-6"); + return; + } + self.dirty.add("StatusId"); + self.postChanges(["StatusId"], true); + }; + + self.dirty.delete("StatusId"); + if (others.length || self.collectionsDirty || Object.keys(self.customDirty).length) + self.postChanges(others, false, checkAndClose); + else + checkAndClose(); + return; + } + + this.postChanges(names, true); + } + }; + + $(function () { + $(".ajax-update, .ajax-update-module").on("change", function () { + window.BacklogEdit.markDirty($(this).attr("Name")); + }); + + $(".backlog-tags").on("change", function () { + window.BacklogEdit.markCollectionsDirty(); + }); + + $("#btnSaveBacklog").on("click", function () { window.BacklogEdit.save(); }); + + $("#btnDeleteBacklog").on("click", function () { + JSManager.confirm("Are you sure you want to delete this task? This action cannot be undone.", function () { + var dto = JSManager.addAntiForgeryToken({ id: cfg.id }); + JSManager.ajaxPost(cfg.deleteUrl, dto, undefined, undefined, function (r) { + if (r.status === 2000) { + window.BacklogEdit.clear(); + JSManager.showSuccess(r.message); + window.location.href = cfg.indexUrl; + } else { + JSManager.showError(r.message); + } + }); + }); + }); + + $("#btnMoveToQuickCapture").on("click", function () { + var $btn = $(this); + var escape = function (s) { return $("
").text(String(s || "")).html(); }; + + $.confirm({ + title: $btn.data("title"), + icon: "fas fa-inbox", + columnClass: "medium", + content: "

" + escape($btn.data("message")) + "

" + + '' + + '
', + onContentReady: function () { + var dialog = this; + var $box = dialog.$content.find(".move-qc-check"); + dialog.buttons.move.disable(); + $box.html('' + escape($btn.data("checking-text")) + ""); + + $.ajax({ + type: "POST", + url: $btn.data("preview-url"), + data: JSManager.addAntiForgeryToken({ ids: String($btn.data("task-id")), includeSubTasks: false }), + success: function (r) { + if (!r || r.status !== 2000) { + $box.html('
' + escape(r ? r.message : "Failed") + "
"); + return; + } + var skipped = r.skipped || []; + if (skipped.length) { + $box.html('
' + escape(skipped[0].reason) + "
"); + return; + } + var staying = r.staying || []; + $box.html(staying.length + ? '
' + + escape(String($btn.data("staying-text")).replace("{0}", staying.map(function (s) { return "#" + s.id; }).join(", "))) + "
" + : ""); + dialog.buttons.move.enable(); + }, + error: function () { $box.html('
Failed
'); } + }); + }, + buttons: { + move: { + text: $btn.data("move-label"), + btnClass: "btn-blue", + action: function () { + var reason = $.trim(this.$content.find(".move-qc-reason").val() || ""); + var dto = JSManager.addAntiForgeryToken({ reason: reason }); + JSManager.ajaxPost($btn.data("url"), dto, undefined, undefined, function (r) { + if (r && r.status === 2000) { + window.BacklogEdit.clear(); + JSManager.showSuccess(r.message); + window.location.href = $btn.data("redirect-url"); + } else { + JSManager.showError(r ? r.message : "Failed"); + } + }); + } + }, + cancel: { text: "Cancel" } + } + }); + }); + + var owner = $cfg.data("owner") || ""; + var titleLabel = $cfg.data("title-label") || $cfg.data("title"); + var titleHtml = '' + titleLabel + '' + + ''; + if (owner) { + titleHtml += '' + + '' + + '' + owner + ''; + } + JSManager.setPageTitle(titleHtml); + + $(document).off("click.copyTaskId").on("click.copyTaskId", "#btnCopyTaskId", function () { + var link = window.location.origin + window.location.pathname; + var done = function () { + if (JSManager.showSuccess) JSManager.showSuccess("Task #" + cfg.id + " link copied"); + var $b = $("#btnCopyTaskId").addClass("is-copied"); + setTimeout(function () { $b.removeClass("is-copied"); }, 1200); + }; + if (navigator.clipboard && navigator.clipboard.writeText) { + navigator.clipboard.writeText(link).then(done, done); + } else { + var $t = $("" + + "
" + escapeHtml(opts.required) + "
", + onContentReady: function () { this.$content.find(".review-reason-text").trigger("focus"); }, + buttons: { + send: { + text: opts.button, + btnClass: opts.btnClass, + action: function () { + var text = $.trim(this.$content.find(".review-reason-text").val() || ""); + if (!text) { this.$content.find(".review-reason-required").removeClass("d-none"); return false; } + opts.onSend(text); + } + }, + cancel: { text: "Cancel" } + } + }); + } + + function reject($btn) { + var $r = root(); + askReason({ + title: $r.data("label-reject-title"), icon: "fas fa-ban", type: "red", btnClass: "btn-red", + prompt: $r.data("label-reject-prompt"), required: $r.data("label-required"), button: $r.data("label-reject-button"), + onSend: function (reason) { post("reject-url", { reason: reason }, $btn); } + }); + } + + function requestChanges($btn) { + var $r = root(); + askReason({ + title: $r.data("label-changes-title"), icon: "fas fa-pen-to-square", type: "orange", btnClass: "btn-orange", + prompt: $r.data("label-changes-prompt"), required: $r.data("label-changes-required"), button: $r.data("label-changes-button"), + onSend: function (notes) { post("request-changes-url", { notes: notes }, $btn); } + }); + } + + function merge($btn) { + var $r = root(); + var squash = $r.find(".review-merge-squash").is(":checked"); + var remove = $r.find(".review-merge-remove").is(":checked"); + JSManager.confirm(escapeHtml($r.data("label-merge-confirm")), function () { + post("merge-url", { sha: $r.data("sha"), squash: squash, removeSourceBranch: remove }, $btn); + }); + } + + function sanitize(html) { + var doc = new DOMParser().parseFromString("
" + (html || "") + "
", "text/html"); + $(doc).find("script,style,iframe,object,embed,link,meta,form").remove(); + $(doc).find("*").each(function () { + for (var i = this.attributes.length - 1; i >= 0; i--) { + var name = this.attributes[i].name.toLowerCase(); + var value = this.attributes[i].value; + if (name.indexOf("on") === 0 || ((name === "href" || name === "src") && /^\s*javascript:/i.test(value))) + this.removeAttribute(this.attributes[i].name); + } + }); + $(doc).find("a[href]").attr({ target: "_blank", rel: "noopener" }); + return doc.body.firstChild ? doc.body.firstChild.innerHTML : ""; + } + + function loadChanges() { + var $box = root().find(".review-changes"); + if (!$box.length || $box.attr("data-loaded") === "true") return; + $box.attr("data-loaded", "true"); + $.get(root().data("changes-url")) + .done(function (html) { $box.html(html); }) + .fail(function (xhr) { $box.html("
Could not load the changes (" + xhr.status + ").
"); }); + } + + function init() { + var $r = root(); + if (!$r.length || $r.data("ready")) return; + $r.data("ready", true); + formatTimes($r); + $r.find(".review-rich[data-html]").each(function () { $(this).html(sanitize($(this).attr("data-html"))); }); + loadChanges(); + } + + $(document) + .off(".reviewDrawer") + .on("click.reviewDrawer", "#reviewDrawer .review-act", function () { + var $btn = $(this); + switch ($btn.data("act")) { + case "approve": post("approve-url", { approve: true }, $btn); break; + case "unapprove": post("approve-url", { approve: false }, $btn); break; + case "comment": + root().find(".review-tab-discussion").trigger("click"); + setTimeout(function () { root().find(".review-comment-text").trigger("focus"); }, 150); + break; + case "post-comment": + var body = $.trim(root().find(".review-comment-text").val() || ""); + if (!body) { root().find(".review-comment-text").trigger("focus"); return; } + post("comment-url", { body: body }, $btn); + break; + case "request-changes": requestChanges($btn); break; + case "reject": reject($btn); break; + case "merge": merge($btn); break; + case "rebase": + JSManager.confirm(escapeHtml(root().data("label-rebase-confirm")), function () { post("rebase-url", {}, $btn); }); + break; + } + }) + .on("click.reviewDrawer", "#reviewDrawer .review-tab-changes", loadChanges) + .on("click.reviewDrawer", "#reviewDrawer .review-copy", function () { + var $btn = $(this); + var text = String($btn.data("copy") || ""); + var copied = root().data("label-copied") || "Copied"; + var done = function () { + JSManager.showSuccess(copied); + if (!$btn.hasClass("review-step__copy")) return; + var title = $btn.attr("title"); + $btn.addClass("is-copied").attr("title", copied).find("i").attr("class", "fas fa-check"); + setTimeout(function () { + $btn.removeClass("is-copied").attr("title", title).find("i").attr("class", "far fa-copy"); + }, 1500); + }; + if (navigator.clipboard && window.isSecureContext) { + navigator.clipboard.writeText(text).then(done); + } else { + var $tmp = $(""); + tinymce.init({ + selector: "#" + EDITOR_ID, + content_style: "body{font-family:system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;font-size:14px;}", + height: "68vh", + menubar: false, + plugins: "preview searchreplace autolink directionality code visualblocks visualchars fullscreen image link media codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help quickbars emoticons", + toolbar: "fullscreen | undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | forecolor backcolor | alignleft aligncenter alignright | bullist numlist outdent indent | link image media table codesample blockquote | charmap emoticons | removeformat code preview", + quickbars_selection_toolbar: "bold italic | quicklink h2 h3 blockquote", + toolbar_mode: "sliding", + contextmenu: "link image table", + image_caption: true, + automatic_uploads: true, + images_upload_handler: function (blobInfo) { + return new Promise(function (resolve, reject) { + var fd = new FormData(); + fd.append("file", blobInfo.blob(), blobInfo.filename()); + fd.append("pageId", currentPageId || ""); + fd.append("__RequestVerificationToken", token()); + $.ajax({ + url: cfg.uploadImage, type: "POST", data: fd, + processData: false, contentType: false, + success: function (r) { r && r.location ? resolve(r.location) : reject({ message: (r && r.error) || "Upload failed", remove: true }); }, + error: function () { reject("Upload failed"); } + }); + }); + }, + setup: function (editor) { + editor.on("init", function () { if (typeof onReady === "function") onReady(editor); }); + editor.on("Dirty keyup", function () { + if (!cfg.canAdd) return; + $("#btnSavePage").prop("disabled", false); + JSManager.NavGuard.markDirty(); + }); + } + }); + } + + // ---- Tags / linked tasks panels ---- + function renderTagBar() { + var $bar = $("#wikiTagBar"); + var parts = []; + if (currentTags.moduleName) parts.push('' + currentTags.moduleName + ""); + if (currentTags.subModuleName) parts.push('' + currentTags.subModuleName + ""); + if (parts.length) { $bar.html(parts.join("")).removeClass("d-none"); } else { $bar.addClass("d-none").empty(); } + } + + function loadTags(pageId) { + currentTags = { moduleId: null, subModuleId: null }; + $.getJSON(cfg.getTags + "?id=" + pageId, function (r) { + currentTags = { moduleId: r.moduleId, subModuleId: r.subModuleId, moduleName: r.moduleName, subModuleName: r.subModuleName }; + renderTagBar(); + }); + } + + function loadLinkedTasks(pageId) { + $.getJSON(cfg.getLinkedTasks + "?id=" + pageId, function (tasks) { + var $box = $("#wikiLinkedTasks"); + if (!tasks || !tasks.length) { $box.addClass("d-none").empty(); return; } + var html = 'Linked tasks:'; + tasks.forEach(function (t) { + html += '#' + t.id + " " + t.title + (t.status ? ' ' + t.status + "" : "") + ""; + }); + $box.html(html).removeClass("d-none"); + }); + } + + // ---- Page open ---- + function openPage(node) { + currentPageId = node.id; + $("#wikiPlaceholder").hide(); + $("#wikiPageActions").removeClass("d-none"); + $("#btnSavePage, #btnTagPage").toggleClass("d-none", !cfg.canAdd); + $("#btnCreateTask").toggleClass("d-none", cfg.projectId <= 0); + $("#btnSavePage").prop("disabled", true); + $("#wikiEditorContainer").show(); + loadTags(node.id); + loadLinkedTasks(node.id); + + removeEditor(); + loadEditor('

Loading…

', function (editor) { + $.getJSON(cfg.getContent + "?id=" + node.id, function (res) { + editor.setContent((res && res.content) || ""); + editor.mode.set(cfg.canAdd ? "design" : "readonly"); + editor.undoManager.clear(); + editor.setDirty(false); + $("#btnSavePage").prop("disabled", true); + JSManager.NavGuard.clear(); + + if (res && res.modifiedBy) + $("#wikiMeta").text("Updated by " + res.modifiedBy + " · " + res.modifiedOn).removeClass("d-none"); + else + $("#wikiMeta").addClass("d-none").empty(); + }); + }); + } + + function closePage() { + currentPageId = null; + removeEditor(); + $("#wikiEditorContainer").hide(); + $("#wikiPageActions").addClass("d-none"); + $("#wikiTagBar").addClass("d-none").empty(); + $("#wikiLinkedTasks").addClass("d-none").empty(); + $("#wikiMeta").addClass("d-none").empty(); + JSManager.NavGuard.clear(); + $("#wikiPlaceholder").show(); + } + + function savePage() { + if (!currentPageId) return; + var ed = tinymce.get(EDITOR_ID); + if (!ed) return; + JSManager.ajaxPost(cfg.saveWiki, JSManager.addAntiForgeryToken({ id: currentPageId, content: ed.getContent() }), undefined, undefined, function (r) { + if (r.success) { + toastr.success("Saved"); + ed.setDirty(false); + $("#btnSavePage").prop("disabled", true); + JSManager.NavGuard.clear(); + } else { + toastr.info(r.message || "No changes."); + } + }); + } + + // ---- jsTree ---- + function buildTree() { + $("#wikiTree").jstree("destroy"); + $("#wikiTree").jstree({ + core: { + check_callback: true, + themes: { responsive: true, dots: false }, + data: function (node, cb) { + if (node.id === "#") { + if (cfg.projectId > 0) { + cb([{ id: "root_home", text: projectName(), icon: "fa fa-home text-danger", type: "default", state: { opened: true }, children: cfg.hasProject }]); + } else { + var projects = []; + $("#wikiProject option").each(function () { + var v = parseInt(this.value, 10); + if (v > 0) projects.push({ id: "proj_" + v, text: this.text, type: "project", children: true }); + }); + cb(projects); + } + } else if (node.id.indexOf("proj_") === 0) { + $.getJSON(cfg.getParent + "?projectId=" + node.id.replace("proj_", ""), cb); + } else if (node.id === "root_home") { + $.getJSON(cfg.getParent + "?projectId=" + cfg.projectId, cb); + } else if (node.type !== "file") { + $.getJSON(cfg.getChildren + "?id=" + node.id + "&projectId=" + branchProjectId(node), cb); + } else { + cb([]); + } + } + }, + types: { + default: { icon: "fa fa-folder text-warning" }, + project: { icon: "fa fa-folder-tree text-info" }, + file: { icon: "far fa-file-alt text-secondary" } + }, + plugins: cfg.canAdd + ? ["wholerow", "types", "contextmenu", "dnd", "search"] + : ["wholerow", "types", "search"], + search: { show_only_matches: true, show_only_matches_children: true }, + contextmenu: { items: contextMenu } + }) + .on("select_node.jstree", function (e, data) { + setBreadcrumb(data); + if (data.node.type === "file") openPage(data.node); else closePage(); + }) + .on("move_node.jstree", onMove) + .on("open_node.jstree", function (e, data) { + if (data.node.type !== "file" && data.node.id !== "root_home") + data.instance.set_icon(data.node, "fa fa-folder-open text-primary"); + }) + .on("close_node.jstree", function (e, data) { + if (data.node.type !== "file" && data.node.id !== "root_home") + data.instance.set_icon(data.node, "fa fa-folder text-warning"); + }); + } + + function setBreadcrumb(data) { + var names = data.node.parents.slice().reverse() + .filter(function (p) { return p !== "#"; }) + .map(function (p) { return data.instance.get_node(p).text; }); + names.push(data.node.text); + $("#wikiBreadcrumb").html(' ' + names.join(" / ")); + } + + function onMove(e, data) { + var tree = data.instance; + var node = data.node; + var newParentId = data.parent; + + if (node.type === "file") { + if (newParentId === "root_home" || newParentId === "#") { + toastr.error("A page must live inside a folder."); + tree.refresh(); + return; + } + JSManager.ajaxPost(cfg.moveWiki, JSManager.addAntiForgeryToken({ id: node.id, categoryId: newParentId }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); tree.refresh(); } + }); + } else { + var parent = (newParentId === "root_home" || newParentId === "#") ? null : newParentId.replace("cat_", ""); + JSManager.ajaxPost(cfg.moveCategory, JSManager.addAntiForgeryToken({ id: node.id.replace("cat_", ""), parentId: parent }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); tree.refresh(); } + }); + } + } + + // ---- Context menu ---- + function contextMenu(node) { + if (!cfg.canAdd || !cfg.hasProject) return {}; + var items = {}; + var isRoot = node.id === "root_home"; + var isFolder = node.type !== "file"; + + if (isFolder) { + items.addFolder = { + label: isRoot ? "Add Folder" : "Add Subfolder", + icon: "fas fa-folder-plus text-primary", + action: function () { showPrompt(isRoot ? "newFolder" : "newSubfolder", isRoot ? "" : node.id, "Folder name", ""); } + }; + items.addPage = { + label: "Add Page", + icon: "fas fa-file-circle-plus text-primary", + action: function () { + if (isRoot) { toastr.info("Create a folder first, then add pages inside it."); return; } + showPrompt("newPage", node.id, "Page title", ""); + } + }; + if (!isRoot) { + items.rename = { label: "Rename", icon: "fas fa-edit", action: function () { showPrompt("renameFolder", node.id, "Folder name", node.text); } }; + items.del = { label: "Delete", icon: "fas fa-trash-alt text-danger", action: function () { deleteFolder(node); } }; + } + } else { + items.rename = { label: "Rename", icon: "fas fa-edit", action: function () { showPrompt("renamePage", node.id, "Page title", node.text); } }; + items.del = { label: "Delete", icon: "fas fa-trash-alt text-danger", action: function () { deletePage(node); } }; + } + return items; + } + + function deleteFolder(node) { + JSManager.confirm("Delete this folder and its contents?", function () { + JSManager.ajaxPost(cfg.deleteCategory, JSManager.addAntiForgeryToken({ id: node.id.replace("cat_", "") }), undefined, undefined, function (r) { + r.success ? $("#wikiTree").jstree(true).delete_node(node) : toastr.error(r.message); + }); + }); + } + + function deletePage(node) { + JSManager.confirm("Delete this page?", function () { + JSManager.ajaxPost(cfg.deleteWiki, JSManager.addAntiForgeryToken({ id: node.id }), undefined, undefined, function (r) { + if (r.success) { $("#wikiTree").jstree(true).delete_node(node); if (currentPageId === node.id) closePage(); } + else toastr.error(r.message); + }); + }); + } + + // ---- Prompt dialog (create/rename) — jQuery-confirm ---- + function showPrompt(action, target, label, value) { + $.confirm({ + title: label, + columnClass: "medium", + content: '' + + '', + buttons: { + save: { + text: "Save", btnClass: "btn-blue", keys: ["enter"], + action: function () { + var dlg = this; + var name = (dlg.$content.find(".wiki-prompt-input").val() || "").trim(); + if (!name) return false; + submitPrompt(action, target, name, dlg); + return false; + } + }, + cancel: { text: "Cancel" } + }, + onContentReady: function () { + this.$content.find(".wiki-prompt-input").val(value || "").trigger("focus").select(); + } + }); + } + + function submitPrompt(action, target, name, dlg) { + var tree = $("#wikiTree").jstree(true); + if (action === "newFolder" || action === "newSubfolder") { + var parentId = action === "newSubfolder" ? target.replace("cat_", "") : ""; + JSManager.ajaxPost(cfg.addCategory, JSManager.addAntiForgeryToken({ parentId: parentId || null, name: name, projectId: cfg.projectId }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); return; } + var parentNode = action === "newSubfolder" ? tree.get_node(target) : tree.get_node("root_home"); + tree.create_node(parentNode, r, "last"); tree.open_node(parentNode); dlg.close(); + }); + } else if (action === "newPage") { + JSManager.ajaxPost(cfg.addWiki, JSManager.addAntiForgeryToken({ categoryId: target.replace("cat_", ""), title: name }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); return; } + var parentNode = tree.get_node(target); + tree.create_node(parentNode, r, "last"); tree.open_node(parentNode); dlg.close(); + }); + } else if (action === "renameFolder") { + JSManager.ajaxPost(cfg.renameCategory, JSManager.addAntiForgeryToken({ id: target.replace("cat_", ""), newName: name }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); return; } + tree.rename_node(tree.get_node(target), name); dlg.close(); + }); + } else if (action === "renamePage") { + JSManager.ajaxPost(cfg.renameWiki, JSManager.addAntiForgeryToken({ id: target, title: name }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); return; } + tree.rename_node(tree.get_node(target), name); + if (currentPageId === target) setBreadcrumb({ node: tree.get_node(target), instance: tree }); + dlg.close(); + }); + } + } + + // ---- Tag dialog — jQuery-confirm ---- + function openTagModal() { + if (!currentPageId) return; + $.confirm({ + title: "Tag page", + columnClass: "medium", + content: '
' + + '
' + + '
Optional — associate this page with a module / sub-module.
', + buttons: { + save: { + text: "Save tags", btnClass: "btn-blue", + action: function () { + var dlg = this; + var moduleId = dlg.$content.find(".wiki-tag-module").val() || null; + var subModuleId = dlg.$content.find(".wiki-tag-submodule").val() || null; + JSManager.ajaxPost(cfg.saveTags, JSManager.addAntiForgeryToken({ id: currentPageId, moduleId: moduleId, subModuleId: subModuleId }), undefined, undefined, function (r) { + if (!r.success) { toastr.error(r.message); return; } + toastr.success("Tags saved"); loadTags(currentPageId); dlg.close(); + }); + return false; + } + }, + cancel: { text: "Cancel" } + }, + onContentReady: function () { + var $c = this.$content; + var $mod = $c.find(".wiki-tag-module"), $sub = $c.find(".wiki-tag-submodule"); + $sub.html(''); + $.getJSON(cfg.getModules + "?projectId=" + cfg.projectId, function (mods) { + var opts = ''; + mods.forEach(function (m) { opts += '"; }); + $mod.html(opts).val(currentTags.moduleId || ""); + if (currentTags.moduleId) loadSubModulesInto($sub, currentTags.moduleId, currentTags.subModuleId); + }); + $mod.on("change", function () { loadSubModulesInto($sub, $(this).val(), null); }); + } + }); + } + + function loadSubModulesInto($sub, moduleId, selected) { + if (!moduleId) { $sub.html(''); return; } + $.getJSON(cfg.getSubModules + "?module=" + moduleId, function (subs) { + var opts = ''; + subs.forEach(function (s) { opts += '"; }); + $sub.html(opts).val(selected || ""); + }); + } + + // ---- History dialog — jQuery-confirm ---- + var historyDlg = null; + function openHistory() { + if (!currentPageId) return; + historyDlg = $.confirm({ + title: "Version history", + columnClass: "large", + content: '
Loading…
', + buttons: { close: { text: "Close" } }, + onContentReady: function () { + var $body = this.$content.find(".wiki-history-body"); + $.getJSON(cfg.getVersions + "?id=" + currentPageId, function (versions) { + if (!versions || !versions.length) { $body.html('
No previous versions.
'); return; } + var html = ""; + versions.forEach(function (v) { + var restore = cfg.canAdd ? '' : ""; + html += '
' + (v.modifiedBy || "") + "
" + v.modifiedOn + (v.note ? " · " + v.note : "") + "
" + restore + "
"; + }); + $body.removeClass("text-muted").html(html); + }); + } + }); + } + + function restoreVersion(versionId) { + JSManager.confirm("Restore this version? Current content is saved to history first.", function () { + JSManager.ajaxPost(cfg.restoreVersion, JSManager.addAntiForgeryToken({ id: currentPageId, versionId: versionId }), undefined, undefined, function (r) { + if (!r.success) { toastr.error("Restore failed"); return; } + if (historyDlg) historyDlg.close(); + var node = $("#wikiTree").jstree(true).get_node(currentPageId); + if (node) openPage(node); + toastr.success("Version restored"); + }); + }); + } + + // ---- Create task from wiki ---- + function createTask() { + if (!currentPageId) return; + var ed = tinymce.get(EDITOR_ID); + var selected = ed ? ed.selection.getContent() : ""; + var description = selected || (ed ? ed.getContent() : ""); + var title = $("#wikiBreadcrumb").text().trim().split("/").pop().trim(); + + var $f = $('
').attr("action", cfg.createFromWiki); + function add(n, v) { $f.append($('').attr("name", n).val(v == null ? "" : v)); } + add("__RequestVerificationToken", token()); + add("wikiId", currentPageId.replace("page_", "")); + add("projectId", cfg.projectId); + add("title", title); + add("description", description); + add("moduleId", currentTags.moduleId || ""); + add("subModuleId", currentTags.subModuleId || ""); + $f.appendTo("body").submit().remove(); + } + + // ---- Export ---- + function pageNumericId() { + return currentPageId ? currentPageId.replace("page_", "") : null; + } + + function warnIfUnsaved() { + var ed = tinymce.get(EDITOR_ID); + return ed && ed.isDirty(); + } + + function exportWord() { + var id = pageNumericId(); + if (!id) return; + if (warnIfUnsaved()) + toastr.info("Exporting the last saved version. Save your changes first to include them."); + window.location.href = cfg.exportWord + "?id=" + id; + } + + // ---- Project switch ---- + function applyPermissionUi() { + $("#btnNewFolder").toggleClass("d-none", !cfg.canAdd); + } + + function switchProject(projectId) { + cfg.projectId = parseInt(projectId, 10) || 0; + if (cfg.projectId === 0) { + cfg.canAdd = false; + cfg.hasProject = true; + applyPermissionUi(); + closePage(); + buildTree(); + return; + } + $.getJSON(cfg.projectContext + "?projectId=" + cfg.projectId, function (ctx) { + cfg.canAdd = !!ctx.canAddWiki; + cfg.hasProject = !!ctx.hasProject; + applyPermissionUi(); + closePage(); + buildTree(); + }); + } + + $(function () { + applyPermissionUi(); + buildTree(); + + $("#wikiProject").on("change", function () { switchProject($(this).val()); }); + + $("#wikiSearch").on("keyup", function () { + $("#wikiTree").jstree(true).search($(this).val()); + }); + + $("#btnNewFolder").on("click", function () { + if (!cfg.canAdd || !cfg.hasProject) { toastr.info("You don't have permission to add wiki content here."); return; } + showPrompt("newFolder", "", "Folder name", ""); + }); + + $("#btnExpandToggle").on("click", function () { + var tree = $("#wikiTree").jstree(true); + if (!tree) return; + if (!expanded) { tree.open_all(); $(this).html('').attr("title", "Collapse all"); } + else { tree.close_all(); var r = tree.get_node("root_home"); if (r) tree.open_node(r); $(this).html('').attr("title", "Expand all"); } + expanded = !expanded; + }); + + $("#btnSavePage").on("click", savePage); + $("#btnTagPage").on("click", openTagModal); + $("#btnHistory").on("click", openHistory); + $("#btnCreateTask").on("click", createTask); + $("#btnExportWord").on("click", exportWord); + + $(document).on("click", ".wiki-restore", function () { restoreVersion($(this).data("version")); }); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/partial.js b/src/Presentation/Taskist.Web/wwwroot/js/partial.js index 05fb059..ac12f6a 100644 --- a/src/Presentation/Taskist.Web/wwwroot/js/partial.js +++ b/src/Presentation/Taskist.Web/wwwroot/js/partial.js @@ -1,49 +1,196 @@ -$(function () { - JSManager = AppJS.getInstance(); - JSManager.bindPartialViewEvent(); - JSManager.setMandatorySymbol(); - $('[data-bs-toggle="tooltip"]').tooltip(); +$(function () { + JSManager = AppJS.getInstance(); + JSManager.bindPartialViewEvent(); + JSManager.setMandatorySymbol(); + JSManager.initLadda("#pdOffCanvasBody"); + + // Initialise select2 inside ajax-loaded partials/offcanvas + // (common.js init() only runs on full page load, not for modal content). + JSManager.initPartialSelect2(); + + // Initialise date pickers inside ajax-loaded partials/offcanvas + // (common.js init() only runs on full page load, not for modal content). + $('.datepicker').datepicker({ format: 'dd-M-yyyy', viewMode: 'date', autoclose: true, todayHighlight: true }); + var dpFrom = $('.datepicker-from'), dpTo = $('.datepicker-to'); + if (dpFrom.length) { + dpFrom.datepicker({ format: 'dd-M-yyyy', viewMode: 'date', autoclose: true, todayHighlight: true }) + .on('changeDate', function (e) { dpTo.datepicker('setStartDate', e.date); }); + } + if (dpTo.length) { + dpTo.datepicker({ format: 'dd-M-yyyy', viewMode: 'date', autoclose: true, todayHighlight: true }); + } + + // Generic cascading dropdown for ajax-loaded partials: a source select with + // data-cascade-target / data-cascade-url / data-cascade-param repopulates its + // dependent select(s) via bindSelect. Each attribute may be a comma-separated + // list to refresh several dependents from one source. Delegated + namespaced. + $(document).off('change.cascade').on('change.cascade', 'select[data-cascade-target]', function () { + var $src = $(this); + var val = $src.val(); + var targets = String($src.data('cascade-target')).split(','); + var urls = String($src.data('cascade-url')).split(','); + var params = String($src.data('cascade-param')).split(','); + for (var i = 0; i < targets.length; i++) { + var target = targets[i].trim(); + if (!target) continue; + var url = (urls[i] || urls[0] || '').trim(); + var paramName = (params[i] || params[0] || '').trim(); + var dto = {}; + dto[paramName] = val; + JSManager.bindSelect(target, url, dto); + $('#' + target).trigger('change'); + } + }); + + // Rich-text body inside offcanvas (announcements). TinyMCE + save-on-submit. + if (typeof tinymce !== 'undefined') { + $('.rt-body').each(function () { + var id = this.id; + tinymce.remove('#' + id); + tinymce.init({ + selector: '#' + id, + menubar: false, + height: 240, + plugins: 'link lists autolink', + toolbar: 'undo redo | bold italic underline | bullist numlist | link | removeformat', + setup: function (editor) { + editor.on('change keyup', function () { editor.save(); }); + } + }); + }); + $(document).off('submit.rtbody').on('submit.rtbody', 'form', function () { + if (tinymce.triggerSave) tinymce.triggerSave(); + }); + } + + // Audience targeting: show role/department picker based on the selected audience. + // Enum select values are "0" Everyone / "1" Roles / "2" Departments. + function applyAudience() { + var val = String($('#annAudience').val()); + var showRoles = val === '1', showDepts = val === '2'; + $('#annRolesWrap').toggleClass('d-none', !showRoles); + $('#annDepartmentsWrap').toggleClass('d-none', !showDepts); + // select2 inited while hidden renders 0-width; nudge it when revealed. + if (showRoles) $('#annRolesWrap select').trigger('change.select2'); + if (showDepts) $('#annDepartmentsWrap select').trigger('change.select2'); + } + var $annAudience = $('#annAudience'); + if ($annAudience.length) { + applyAudience(); + $annAudience.off('change.audience').on('change.audience', applyAudience); + } + + $('.time-picker').each(function () { TimePicker.init(this); }); + $(document).off('mousedown.tp').on('mousedown.tp', function (e) { + if (!$(e.target).closest('.tp-wrap').length) + $('.tp-menu').addClass('d-none'); + }); }); +var TimePicker = { + step: 15, + init: function (input) { + var $input = $(input); + if ($input.data('tpReady')) + return; + $input.data('tpReady', true); + + var $wrap = $('
'); + $input.before($wrap); + $wrap.append($input); + $wrap.append(''); + + var html = ''; + for (var m = 0; m < 24 * 60; m += TimePicker.step) { + var hh = Math.floor(m / 60), mm = m % 60; + var pad = function (n) { return n < 10 ? '0' + n : '' + n; }; + html += '
' + pad(hh) + ':' + pad(mm) + '
'; + } + var $menu = $('
').html(html); + $wrap.append($menu); + + function open() { + $('.tp-menu').not($menu).addClass('d-none'); + $menu.removeClass('d-none'); + var $sel = $menu.find('.tp-option[data-value="' + $input.val() + '"]'); + if ($sel.length) + $menu.scrollTop($sel[0].offsetTop - 70); + } + function close() { $menu.addClass('d-none'); } + + $input.on('focus click', open); + $wrap.find('.tp-icon').on('click', function () { $input.trigger('focus'); }); + $menu.on('mousedown', '.tp-option', function (e) { + e.preventDefault(); + $input.val($(this).data('value')).trigger('change'); + if ($input.valid) $input.valid(); + close(); + }); + } +}; + +$(document).off("click.formCancel").on("click.formCancel", ".js-form-cancel", function () { + let offcanvas = $(this).closest(".offcanvas")[0]; + if ($(this).closest(".jconfirm-box").length) + JSManager.closeForm(); + else if (offcanvas) + bootstrap.Offcanvas.getOrCreateInstance(offcanvas).hide(); + else + JSManager.closeOffCanvas(); +}); + +function ajaxFormContainer(form) { + let $box = form && form.nodeType === 1 ? $(form).closest(".jconfirm-box") : $(); + return $box.length ? $box : "pdOffCanvas"; +} + function ajaxBegin() { - JSManager.blockUI("app-body"); + JSManager.blockUI(ajaxFormContainer(this)); } function ajaxComplete(response) { - JSManager.unblockUI("app-body"); + JSManager.unblockUI(ajaxFormContainer(this)); } function ajaxSuccess(response) { - if (response.status === 2000) { - debugger; - if (response.child_action) { - JSManager.reloadChildGrid(); + if (response.status === 2000) { + if (response.child_action) { + JSManager.reloadChildGrid(); + } else { + JSManager.reloadGrid(); + } + JSManager.closeOffCanvas(); + JSManager.closeForm(); + if (JSManager.hasValue(response.message)) + JSManager.showSuccess(response.message); + } else if (response.status === 2001) { + let errorHtml = ""; + $.each(response.errors || [], function (index, item) { + let message = item && (item.Message || item.message); + if (message && $.trim(message).length) + errorHtml += "
  • " + message + "
  • "; + }); + + if (errorHtml.length) { + $(".validation-errors").html( + '' + ); + } else if (JSManager.hasValue(response.message)) { + JSManager.showError(response.message); + } + } else if (response.status === 2002) { + JSManager.showError(response.message); } else { - JSManager.reloadGrid(); + JSManager.closeOffCanvas(); + JSManager.closeForm(); + JSManager.showAppError(response.message); } - JSManager.closeOffCanvas(); - if (JSManager.hasValue(response.message)) - JSManager.showSuccess(response.message); - } else if (response.status === 2001) { - let errorHtml = ""; - $.each(response.errors, function (index, item) { - errorHtml += "
  • " + item.Message + "
  • "; - }); - - $(".validation-errors").html( - '' - ); - } else if (response.status === 2002) { - JSManager.showError(response.message); - } else { - JSManager.closeOffCanvas(); - JSManager.showAppError(response.message); - } } function ajaxFailure(response) { - JSManager.closeOffCanvas(); - JSManager.showAppError(response.responseJSON.message); + JSManager.closeOffCanvas(); + JSManager.closeForm(); + JSManager.showAppError(response.responseJSON.message); } diff --git a/src/Presentation/Taskist.Web/wwwroot/js/pwa.js b/src/Presentation/Taskist.Web/wwwroot/js/pwa.js new file mode 100644 index 0000000..d65bc0d --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/pwa.js @@ -0,0 +1,38 @@ +(function () { + "use strict"; + + if (!("serviceWorker" in navigator) || !window.isSecureContext) + return; + + window.addEventListener("load", function () { + navigator.serviceWorker.register("/js/sw.js", { scope: "/" }).catch(function () { }); + }); + + var deferredPrompt = null; + + window.addEventListener("beforeinstallprompt", function (e) { + e.preventDefault(); + deferredPrompt = e; + document.querySelectorAll("[data-pwa-install]").forEach(function (btn) { + btn.classList.remove("d-none"); + }); + }); + + document.addEventListener("click", function (e) { + var trigger = e.target.closest("[data-pwa-install]"); + if (!trigger || !deferredPrompt) return; + e.preventDefault(); + deferredPrompt.prompt(); + deferredPrompt.userChoice.finally(function () { + deferredPrompt = null; + trigger.classList.add("d-none"); + }); + }); + + window.addEventListener("appinstalled", function () { + deferredPrompt = null; + document.querySelectorAll("[data-pwa-install]").forEach(function (btn) { + btn.classList.add("d-none"); + }); + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/report-column-editor.js b/src/Presentation/Taskist.Web/wwwroot/js/report-column-editor.js new file mode 100644 index 0000000..8e65b4e --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/report-column-editor.js @@ -0,0 +1,91 @@ +var ReportColumnEditor = (function () { + "use strict"; + + function initSortable($scope) { + if (!$.fn.sortable) return; + $scope.find(".report-columns").sortable({ + handle: ".report-col-handle", + placeholder: "report-col-placeholder", + axis: "y", + forcePlaceholderSize: true + }); + } + + function serialize($layout) { + var cols = []; + $layout.find(".report-col-row").each(function () { + var $row = $(this); + var col = { + Key: $row.data("key"), + Included: $row.find(".report-col-included").is(":checked") + }; + var $title = $row.find(".report-col-title"); + if ($title.length) col.Title = ($title.val() || "").trim(); + cols.push(col); + }); + return cols; + } + + function post(url, data, done) { + JSManager.ajaxPost(url, data, undefined, undefined, function (r) { + if (r && r.status === 2000) { + if (r.message) JSManager.showSuccess(r.message); + done(); + } else { + JSManager.showError((r && r.message) || "Could not save the export columns."); + } + }); + } + + function open($trigger) { + var d = $trigger.data(); + var key = d.reportLayout; + + $.confirm({ + title: d.title, + icon: "fas fa-table-columns", + columnClass: "medium jc-form-scroll", + closeIcon: true, + content: "URL:" + d.editorUrl + "?key=" + encodeURIComponent(key), + onContentReady: function () { + var $layout = this.$content.find(".report-layout-editor"); + initSortable(this.$content); + if ($layout.data("custom") !== true) this.buttons.reset.hide(); + }, + buttons: { + save: { + text: d.saveText, + btnClass: "btn-blue", + action: function () { + var dialog = this; + var cols = serialize(dialog.$content.find(".report-layout-editor")); + post(d.saveUrl, { key: key, columns: JSON.stringify(cols) }, function () { dialog.close(); }); + return false; + } + }, + reset: { + text: d.resetText, + btnClass: "btn-default", + action: function () { + var dialog = this; + post(d.resetUrl, { key: key }, function () { dialog.close(); }); + return false; + } + }, + cancel: { + text: d.cancelText + } + } + }); + } + + $(document).on("click", "[data-report-layout]", function (e) { + e.preventDefault(); + open($(this)); + }); + + return { + initSortable: initSortable, + serialize: serialize + }; +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/select2-summary.js b/src/Presentation/Taskist.Web/wwwroot/js/select2-summary.js new file mode 100644 index 0000000..a9bd453 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/select2-summary.js @@ -0,0 +1,60 @@ +/* App-wide multi-select pattern: a select2 multi-select shows ONE summary chip instead of a tag per item — + the item's name when one is picked, "N selected" when more (full list in the tooltip). Wraps $.fn.select2 so + every page gets it no matter where select2 is initialised. Opt out per element with data-summary="false". */ +var SelectSummary = (function ($) { + "use strict"; + + if (!$ || !$.fn || !$.fn.select2) return { render: function () { } }; + + var NS = "change.select2.select2summary"; + + function countText(count) { + var template = document.documentElement.getAttribute("data-select-count-text") || "{0} selected"; + return template.replace("{0}", count); + } + + function render(target) { + var $select = $(target); + var instance = $select.data("select2"); + if (!instance || !$select.prop("multiple") || $select.data("summary") === false) return; + + var $rendered = instance.$container.find(".select2-selection__rendered"); + $rendered.find(".select2-summary__chip").remove(); + + var $selected = $select.find("option:selected"); + if (!$selected.length) return; + + var names = $selected.map(function () { return $.trim($(this).text()); }).get(); + var $chip = $('
  • ') + .text(names.length === 1 ? names[0] : countText(names.length)) + .attr("title", names.join(", ")); + + var $search = $rendered.children(".select2-search--inline"); + if ($search.length) $chip.insertBefore($search); else $rendered.append($chip); + } + + function setup($select) { + var instance = $select.data("select2"); + if (!instance || $select.data("summary") === false) return; + + instance.$container.addClass("select2-summary"); + $select.off(".select2summary") + .on(NS, function () { render(this); }) + .on("select2:close.select2summary", function () { render(this); }); + render($select); + } + + var original = $.fn.select2; + $.fn.select2 = function (options) { + var result = original.apply(this, arguments); + if (typeof options !== "string") { + this.each(function () { + if (this.multiple) setup($(this)); + }); + } + return result; + }; + $.extend($.fn.select2, original); + + return { render: render }; +})(window.jQuery); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/site.js b/src/Presentation/Taskist.Web/wwwroot/js/site.js deleted file mode 100644 index 0937657..0000000 --- a/src/Presentation/Taskist.Web/wwwroot/js/site.js +++ /dev/null @@ -1,4 +0,0 @@ -// Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification -// for details on configuring this project to bundle and minify static web assets. - -// Write your JavaScript code. diff --git a/src/Presentation/Taskist.Web/wwwroot/js/sw.js b/src/Presentation/Taskist.Web/wwwroot/js/sw.js new file mode 100644 index 0000000..33bed1e --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/sw.js @@ -0,0 +1,100 @@ +/* + Taskist service worker. + Strategy: + - Static assets (lib / css / js / images / fonts / theme): cache-first only when the URL + is versioned (asp-append-version "?v=" changes with the file); unversioned URLs are + network-first with a cache fallback, so an edited file is never served stale. + - Navigations (HTML pages): network-first, fall back to the cached offline page. + Authenticated pages are NEVER cached (avoids leaking one user's page to another + and serving stale data). + - Anything non-GET, or under /api, /Login, /hangfire, /alertshub: bypass the SW entirely. +*/ + +const VERSION = 'v2'; +const STATIC_CACHE = `wp-static-${VERSION}`; +const OFFLINE_URL = '/offline.html'; + +const PRECACHE = [ + OFFLINE_URL, + '/images/brand/logo.png', + '/images/brand/logo_icon.png', + '/images/brand/icon-192.png' +]; + +const STATIC_PREFIXES = ['/lib/', '/css/', '/js/', '/images/', '/theme/', '/fonts/']; +const BYPASS_PREFIXES = ['/api', '/login', '/account', '/hangfire', '/alertshub', '/profiler', '/updates', '/download']; + +self.addEventListener('install', (event) => { + event.waitUntil( + caches.open(STATIC_CACHE) + .then((cache) => Promise.allSettled(PRECACHE.map((url) => cache.add(url)))) + .then(() => self.skipWaiting()) + ); +}); + +self.addEventListener('activate', (event) => { + event.waitUntil( + caches.keys() + .then((keys) => Promise.all( + keys.filter((k) => k.startsWith('wp-static-') && k !== STATIC_CACHE) + .map((k) => caches.delete(k)) + )) + .then(() => self.clients.claim()) + ); +}); + +function isStaticAsset(url) { + return STATIC_PREFIXES.some((p) => url.pathname.startsWith(p)); +} + +function isBypassed(url) { + const path = url.pathname.toLowerCase(); + return BYPASS_PREFIXES.some((p) => path.startsWith(p)); +} + +self.addEventListener('fetch', (event) => { + const req = event.request; + + if (req.method !== 'GET') + return; + + const url = new URL(req.url); + + if (url.origin !== self.location.origin) + return; + + if (isBypassed(url)) + return; + + if (isStaticAsset(url)) { + const store = (res) => { + if (res && res.ok && res.type === 'basic') { + const copy = res.clone(); + caches.open(STATIC_CACHE).then((cache) => cache.put(req, copy)); + } + return res; + }; + + if (url.searchParams.has('v')) { + event.respondWith( + caches.match(req).then((cached) => cached || fetch(req).then(store)) + ); + } else { + event.respondWith( + fetch(req).then(store).catch(() => caches.match(req)) + ); + } + return; + } + + if (req.mode === 'navigate') { + event.respondWith( + fetch(req).catch(() => caches.match(OFFLINE_URL)) + ); + } +}); + +self.addEventListener('message', (event) => { + if (event.data === 'skipWaiting') + self.skipWaiting(); +}); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/toast-config.js b/src/Presentation/Taskist.Web/wwwroot/js/toast-config.js new file mode 100644 index 0000000..410d170 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/toast-config.js @@ -0,0 +1,47 @@ +(function () { + "use strict"; + + if (!window.toastr) return; + + var defaults = { + closeButton: true, + newestOnTop: true, + progressBar: true, + preventDuplicates: true, + positionClass: "toast-top-right", + showDuration: 200, + hideDuration: 300, + timeOut: 5000, + extendedTimeOut: 2000, + showMethod: "fadeIn", + hideMethod: "fadeOut", + tapToDismiss: false + }; + + var byType = { + success: { title: "Success", timeOut: 3000 }, + info: { title: "Info", timeOut: 5000 }, + warning: { title: "Warning", timeOut: 6000 }, + error: { title: "Error", timeOut: 8000 } + }; + + var MAX_VISIBLE = 4; + + toastr.options = $.extend({}, defaults); + + function trimStack() { + var $toasts = $("#toast-container > .toast"); + if ($toasts.length >= MAX_VISIBLE) { + $toasts.slice(MAX_VISIBLE - 1).each(function () { toastr.clear($(this), { force: true }); }); + } + } + + Object.keys(byType).forEach(function (type) { + var original = toastr[type]; + toastr[type] = function (message, title, overrides) { + trimStack(); + var options = $.extend({}, defaults, { timeOut: byType[type].timeOut }, overrides || {}); + return original.call(toastr, message, title || byType[type].title, options); + }; + }); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/tooltips.js b/src/Presentation/Taskist.Web/wwwroot/js/tooltips.js new file mode 100644 index 0000000..3660622 --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/tooltips.js @@ -0,0 +1,56 @@ +// App-wide Bootstrap tooltips: any [data-bs-toggle="tooltip"] gets a styled +// tooltip on first hover/focus, including content loaded later (offcanvas, +// jquery-confirm modals, DataTables rows). Pages that create their own +// instances with custom options keep them (getInstance is checked first). +(function () { + if (typeof bootstrap === "undefined" || !bootstrap.Tooltip) return; + + var SELECTOR = '[data-bs-toggle="tooltip"]'; + var shown = new Set(); + var observer = null; + + function lazyInit(e) { + var el = e.target && e.target.closest ? e.target.closest(SELECTOR) : null; + if (!el || bootstrap.Tooltip.getInstance(el)) return; + + bootstrap.Tooltip.getOrCreateInstance(el, { container: "body" }).show(); + } + + // A tooltip whose trigger is removed while open (offcanvas content swapped, + // modal closed, grid redrawn) would stay on screen; dispose those. + function disposeOrphans() { + shown.forEach(function (el) { + if (!el.isConnected) { + var tip = bootstrap.Tooltip.getInstance(el); + if (tip) tip.dispose(); + shown.delete(el); + } + }); + if (!shown.size && observer) { observer.disconnect(); observer = null; } + } + + function hideAll() { + shown.forEach(function (el) { + var tip = bootstrap.Tooltip.getInstance(el); + if (tip) tip.hide(); + }); + } + + document.addEventListener("mouseover", lazyInit); + document.addEventListener("focusin", lazyInit); + + document.addEventListener("shown.bs.tooltip", function (e) { + shown.add(e.target); + if (!observer) { + observer = new MutationObserver(disposeOrphans); + observer.observe(document.body, { childList: true, subtree: true }); + } + }); + document.addEventListener("hidden.bs.tooltip", function (e) { + shown.delete(e.target); + if (!shown.size && observer) { observer.disconnect(); observer = null; } + }); + + document.addEventListener("hide.bs.offcanvas", hideAll); + document.addEventListener("hide.bs.modal", hideAll); +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/js/wp-filter.js b/src/Presentation/Taskist.Web/wwwroot/js/wp-filter.js new file mode 100644 index 0000000..3da34ac --- /dev/null +++ b/src/Presentation/Taskist.Web/wwwroot/js/wp-filter.js @@ -0,0 +1,60 @@ +/* Shared collapsible filter panel helper. + Counts active filters inside a panel, updates the badge + button active state. + Usage: + WpFilter.init({ panelId: "sdFilter", buttonId: "btnFilters", badgeId: "sdFilterCount" }); + // then call WpFilter.refresh("sdFilter") after Apply/Reset, or rely on input events. + Auto-counts any filled control (select/text/date/multiselect) inside #panelId, + ignoring buttons and controls marked data-wp-filter-ignore. */ +window.WpFilter = (function () { + "use strict"; + + var registry = {}; + + function countActive(panelId) { + var $panel = $("#" + panelId); + if (!$panel.length) return 0; + var n = 0; + $panel.find("input, select, textarea").each(function () { + var $el = $(this); + if ($el.is("[type=button], [type=submit], [type=reset], [data-wp-filter-ignore]")) return; + if ($el.closest("[data-wp-filter-ignore]").length) return; + var v = $el.val(); + if (Array.isArray(v)) { if (v.length) n++; } + else if ($el.is("[type=checkbox]")) { if ($el.is(":checked")) n++; } + else if (v != null && String(v).trim() !== "") n++; + }); + return n; + } + + function refresh(panelId) { + var cfg = registry[panelId]; + if (!cfg) return; + var n = cfg.count ? cfg.count() : countActive(panelId); + $("#" + cfg.buttonId).toggleClass("wp-filter-btn--active", n > 0); + if (cfg.badgeId) $("#" + cfg.badgeId).text(n > 0 ? n : ""); + return n; + } + + function init(cfg) { + if (!cfg || !cfg.panelId) return; + registry[cfg.panelId] = cfg; + var $panel = $("#" + cfg.panelId); + // Recount on any change/typing inside the panel. + $panel.on("change keyup", "input, select, textarea", function () { refresh(cfg.panelId); }); + refresh(cfg.panelId); + } + + // Auto-init any panel rendered by the tag helper: + // a .wp-filter-btn button whose data-bs-target points at the collapse holding #. + $(function () { + $(".wp-filter-btn").each(function () { + var buttonId = this.id; + var target = $(this).data("bs-target") || $(this).attr("data-bs-target"); + var $panel = $(target).find(".card-body").first(); + if (!$panel.length || !$panel.attr("id")) return; + init({ panelId: $panel.attr("id"), buttonId: buttonId, badgeId: buttonId.replace(/Btn$/, "Count") }); + }); + }); + + return { init: init, refresh: refresh, count: countActive }; +})(); diff --git a/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/css/dataTables.bootstrap5.min.css b/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/css/dataTables.bootstrap5.min.css index 31ee56d..7dd811b 100644 --- a/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/css/dataTables.bootstrap5.min.css +++ b/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/css/dataTables.bootstrap5.min.css @@ -1,5 +1,5 @@ -:root{--dt-row-selected: 13, 110, 253;--dt-row-selected-text: 255, 255, 255;--dt-row-selected-link: 9, 10, 11;--dt-row-stripe: 0, 0, 0;--dt-row-hover: 0, 0, 0;--dt-column-ordering: 0, 0, 0;--dt-html-background: white}:root.dark{--dt-html-background: rgb(33, 37, 41)}table.dataTable td.dt-control{text-align:center;cursor:pointer}table.dataTable td.dt-control:before{display:inline-block;color:rgba(0, 0, 0, 0.5);content:"▶"}table.dataTable tr.dt-hasChild td.dt-control:before{content:"▼"}html.dark table.dataTable td.dt-control:before,:root[data-bs-theme=dark] table.dataTable td.dt-control:before{color:rgba(255, 255, 255, 0.5)}html.dark table.dataTable tr.dt-hasChild td.dt-control:before,:root[data-bs-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before{color:rgba(255, 255, 255, 0.5)}table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting_asc_disabled,table.dataTable thead>tr>th.sorting_desc_disabled,table.dataTable thead>tr>td.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting_asc_disabled,table.dataTable thead>tr>td.sorting_desc_disabled{cursor:pointer;position:relative;padding-right:26px}table.dataTable thead>tr>th.sorting:before,table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>th.sorting_asc:before,table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>th.sorting_desc:before,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>th.sorting_asc_disabled:before,table.dataTable thead>tr>th.sorting_asc_disabled:after,table.dataTable thead>tr>th.sorting_desc_disabled:before,table.dataTable thead>tr>th.sorting_desc_disabled:after,table.dataTable thead>tr>td.sorting:before,table.dataTable thead>tr>td.sorting:after,table.dataTable thead>tr>td.sorting_asc:before,table.dataTable thead>tr>td.sorting_asc:after,table.dataTable thead>tr>td.sorting_desc:before,table.dataTable thead>tr>td.sorting_desc:after,table.dataTable thead>tr>td.sorting_asc_disabled:before,table.dataTable thead>tr>td.sorting_asc_disabled:after,table.dataTable thead>tr>td.sorting_desc_disabled:before,table.dataTable thead>tr>td.sorting_desc_disabled:after{position:absolute;display:block;opacity:.125;right:10px;line-height:9px;font-size:.8em}table.dataTable thead>tr>th.sorting:before,table.dataTable thead>tr>th.sorting_asc:before,table.dataTable thead>tr>th.sorting_desc:before,table.dataTable thead>tr>th.sorting_asc_disabled:before,table.dataTable thead>tr>th.sorting_desc_disabled:before,table.dataTable thead>tr>td.sorting:before,table.dataTable thead>tr>td.sorting_asc:before,table.dataTable thead>tr>td.sorting_desc:before,table.dataTable thead>tr>td.sorting_asc_disabled:before,table.dataTable thead>tr>td.sorting_desc_disabled:before{bottom:50%;content:"▲";content:"▲"/""}table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>th.sorting_asc_disabled:after,table.dataTable thead>tr>th.sorting_desc_disabled:after,table.dataTable thead>tr>td.sorting:after,table.dataTable thead>tr>td.sorting_asc:after,table.dataTable thead>tr>td.sorting_desc:after,table.dataTable thead>tr>td.sorting_asc_disabled:after,table.dataTable thead>tr>td.sorting_desc_disabled:after{top:50%;content:"▼";content:"▼"/""}table.dataTable thead>tr>th.sorting_asc:before,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>td.sorting_asc:before,table.dataTable thead>tr>td.sorting_desc:after{opacity:.6}table.dataTable thead>tr>th.sorting_desc_disabled:after,table.dataTable thead>tr>th.sorting_asc_disabled:before,table.dataTable thead>tr>td.sorting_desc_disabled:after,table.dataTable thead>tr>td.sorting_asc_disabled:before{display:none}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}div.dataTables_scrollBody>table.dataTable>thead>tr>th:before,div.dataTables_scrollBody>table.dataTable>thead>tr>th:after,div.dataTables_scrollBody>table.dataTable>thead>tr>td:before,div.dataTables_scrollBody>table.dataTable>thead>tr>td:after{display:none}div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:2px;z-index:10}div.dataTables_processing>div:last-child{position:relative;width:80px;height:15px;margin:1em auto}div.dataTables_processing>div:last-child>div{position:absolute;top:0;width:13px;height:13px;border-radius:50%;background:rgb(13, 110, 253);background:rgb(var(--dt-row-selected));animation-timing-function:cubic-bezier(0, 1, 1, 0)}div.dataTables_processing>div:last-child>div:nth-child(1){left:8px;animation:datatables-loader-1 .6s infinite}div.dataTables_processing>div:last-child>div:nth-child(2){left:8px;animation:datatables-loader-2 .6s infinite}div.dataTables_processing>div:last-child>div:nth-child(3){left:32px;animation:datatables-loader-2 .6s infinite}div.dataTables_processing>div:last-child>div:nth-child(4){left:56px;animation:datatables-loader-3 .6s infinite}@keyframes datatables-loader-1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes datatables-loader-3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes datatables-loader-2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th,table.dataTable thead td,table.dataTable tfoot th,table.dataTable tfoot td{text-align:left}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}/*! Bootstrap 5 integration for DataTables - * - * ©2020 SpryMedia Ltd, all rights reserved. - * License: MIT datatables.net/license/mit - */table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>*{box-shadow:none}table.dataTable>tbody>tr{background-color:transparent}table.dataTable>tbody>tr.selected>*{box-shadow:inset 0 0 0 9999px rgb(13, 110, 253);box-shadow:inset 0 0 0 9999px rgb(var(--dt-row-selected));color:rgb(255, 255, 255);color:rgb(var(--dt-row-selected-text))}table.dataTable>tbody>tr.selected a{color:rgb(9, 10, 11);color:rgb(var(--dt-row-selected-link))}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.05)}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1).selected>*{box-shadow:inset 0 0 0 9999px rgba(13, 110, 253, 0.95);box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.95)}table.dataTable.table-hover>tbody>tr:hover>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.075)}table.dataTable.table-hover>tbody>tr.selected:hover>*{box-shadow:inset 0 0 0 9999px rgba(13, 110, 253, 0.975);box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.975)}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dt-row{position:relative}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:before,div.dataTables_scrollBody>table>thead .sorting_asc:before,div.dataTables_scrollBody>table>thead .sorting_desc:before,div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody tr:first-child th,div.dataTables_scrollBody>table>tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center !important}}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled):before,table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled):after{right:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable thead tr:first-child th,table.table-bordered.dataTable thead tr:first-child td{border-top-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable td:first-child,table.table-bordered.dataTable td:first-child{border-left-width:1px}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-bottom-width:1px}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}:root[data-bs-theme=dark]{--dt-row-hover: 255, 255, 255;--dt-row-stripe: 255, 255, 255;--dt-column-ordering: 255, 255, 255} +:root{--dt-row-selected: 13, 110, 253;--dt-row-selected-text: 255, 255, 255;--dt-row-selected-link: 9, 10, 11;--dt-row-stripe: 0, 0, 0;--dt-row-hover: 0, 0, 0;--dt-column-ordering: 0, 0, 0;--dt-html-background: white}:root.dark{--dt-html-background: rgb(33, 37, 41)}table.dataTable td.dt-control{text-align:center;cursor:pointer}table.dataTable td.dt-control:before{display:inline-block;color:rgba(0, 0, 0, 0.5);content:"▶"}table.dataTable tr.dt-hasChild td.dt-control:before{content:"▼"}html.dark table.dataTable td.dt-control:before,:root[data-bs-theme=dark] table.dataTable td.dt-control:before{color:rgba(255, 255, 255, 0.5)}html.dark table.dataTable tr.dt-hasChild td.dt-control:before,:root[data-bs-theme=dark] table.dataTable tr.dt-hasChild td.dt-control:before{color:rgba(255, 255, 255, 0.5)}table.dataTable thead>tr>th.sorting,table.dataTable thead>tr>th.sorting_asc,table.dataTable thead>tr>th.sorting_desc,table.dataTable thead>tr>th.sorting_asc_disabled,table.dataTable thead>tr>th.sorting_desc_disabled,table.dataTable thead>tr>td.sorting,table.dataTable thead>tr>td.sorting_asc,table.dataTable thead>tr>td.sorting_desc,table.dataTable thead>tr>td.sorting_asc_disabled,table.dataTable thead>tr>td.sorting_desc_disabled{cursor:pointer;position:relative;padding-right:26px}table.dataTable thead>tr>th.sorting:before,table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>th.sorting_asc:before,table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>th.sorting_desc:before,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>th.sorting_asc_disabled:before,table.dataTable thead>tr>th.sorting_asc_disabled:after,table.dataTable thead>tr>th.sorting_desc_disabled:before,table.dataTable thead>tr>th.sorting_desc_disabled:after,table.dataTable thead>tr>td.sorting:before,table.dataTable thead>tr>td.sorting:after,table.dataTable thead>tr>td.sorting_asc:before,table.dataTable thead>tr>td.sorting_asc:after,table.dataTable thead>tr>td.sorting_desc:before,table.dataTable thead>tr>td.sorting_desc:after,table.dataTable thead>tr>td.sorting_asc_disabled:before,table.dataTable thead>tr>td.sorting_asc_disabled:after,table.dataTable thead>tr>td.sorting_desc_disabled:before,table.dataTable thead>tr>td.sorting_desc_disabled:after{position:absolute;display:block;opacity:.125;right:10px;line-height:9px;font-size:.8em}table.dataTable thead>tr>th.sorting:before,table.dataTable thead>tr>th.sorting_asc:before,table.dataTable thead>tr>th.sorting_desc:before,table.dataTable thead>tr>th.sorting_asc_disabled:before,table.dataTable thead>tr>th.sorting_desc_disabled:before,table.dataTable thead>tr>td.sorting:before,table.dataTable thead>tr>td.sorting_asc:before,table.dataTable thead>tr>td.sorting_desc:before,table.dataTable thead>tr>td.sorting_asc_disabled:before,table.dataTable thead>tr>td.sorting_desc_disabled:before{bottom:50%;content:"▲";content:"▲"/""}table.dataTable thead>tr>th.sorting:after,table.dataTable thead>tr>th.sorting_asc:after,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>th.sorting_asc_disabled:after,table.dataTable thead>tr>th.sorting_desc_disabled:after,table.dataTable thead>tr>td.sorting:after,table.dataTable thead>tr>td.sorting_asc:after,table.dataTable thead>tr>td.sorting_desc:after,table.dataTable thead>tr>td.sorting_asc_disabled:after,table.dataTable thead>tr>td.sorting_desc_disabled:after{top:50%;content:"▼";content:"▼"/""}table.dataTable thead>tr>th.sorting_asc:before,table.dataTable thead>tr>th.sorting_desc:after,table.dataTable thead>tr>td.sorting_asc:before,table.dataTable thead>tr>td.sorting_desc:after{opacity:.6}table.dataTable thead>tr>th.sorting_desc_disabled:after,table.dataTable thead>tr>th.sorting_asc_disabled:before,table.dataTable thead>tr>td.sorting_desc_disabled:after,table.dataTable thead>tr>td.sorting_asc_disabled:before{display:none}table.dataTable thead>tr>th:active,table.dataTable thead>tr>td:active{outline:none}div.dataTables_scrollBody>table.dataTable>thead>tr>th:before,div.dataTables_scrollBody>table.dataTable>thead>tr>th:after,div.dataTables_scrollBody>table.dataTable>thead>tr>td:before,div.dataTables_scrollBody>table.dataTable>thead>tr>td:after{display:none}div.dataTables_processing{position:absolute;top:50%;left:50%;width:200px;margin-left:-100px;margin-top:-26px;text-align:center;padding:2px;z-index:10}div.dataTables_processing>div:last-child{position:relative;width:80px;height:15px;margin:1em auto}div.dataTables_processing>div:last-child>div{position:absolute;top:0;width:13px;height:13px;border-radius:50%;background:rgb(13, 110, 253);background:rgb(var(--dt-row-selected));animation-timing-function:cubic-bezier(0, 1, 1, 0)}div.dataTables_processing>div:last-child>div:nth-child(1){left:8px;animation:datatables-loader-1 .6s infinite}div.dataTables_processing>div:last-child>div:nth-child(2){left:8px;animation:datatables-loader-2 .6s infinite}div.dataTables_processing>div:last-child>div:nth-child(3){left:32px;animation:datatables-loader-2 .6s infinite}div.dataTables_processing>div:last-child>div:nth-child(4){left:56px;animation:datatables-loader-3 .6s infinite}@keyframes datatables-loader-1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes datatables-loader-3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes datatables-loader-2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable th.dt-left,table.dataTable td.dt-left{text-align:left}table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty{text-align:center}table.dataTable th.dt-right,table.dataTable td.dt-right{text-align:right}table.dataTable th.dt-justify,table.dataTable td.dt-justify{text-align:justify}table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable thead th,table.dataTable thead td,table.dataTable tfoot th,table.dataTable tfoot td{text-align:left}table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}/*! Bootstrap 5 integration for DataTables + * + * ©2020 SpryMedia Ltd, all rights reserved. + * License: MIT datatables.net/license/mit + */table.dataTable{clear:both;margin-top:6px !important;margin-bottom:6px !important;max-width:none !important;border-collapse:separate !important;border-spacing:0}table.dataTable td,table.dataTable th{-webkit-box-sizing:content-box;box-sizing:content-box}table.dataTable td.dataTables_empty,table.dataTable th.dataTables_empty{text-align:center}table.dataTable.nowrap th,table.dataTable.nowrap td{white-space:nowrap}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>*{box-shadow:none}table.dataTable>tbody>tr{background-color:transparent}table.dataTable>tbody>tr.selected>*{box-shadow:inset 0 0 0 9999px rgb(13, 110, 253);box-shadow:inset 0 0 0 9999px rgb(var(--dt-row-selected));color:rgb(255, 255, 255);color:rgb(var(--dt-row-selected-text))}table.dataTable>tbody>tr.selected a{color:rgb(9, 10, 11);color:rgb(var(--dt-row-selected-link))}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1)>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-stripe), 0.05)}table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1).selected>*{box-shadow:inset 0 0 0 9999px rgba(13, 110, 253, 0.95);box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.95)}table.dataTable.table-hover>tbody>tr:hover>*{box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.075)}table.dataTable.table-hover>tbody>tr.selected:hover>*{box-shadow:inset 0 0 0 9999px rgba(13, 110, 253, 0.975);box-shadow:inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.975)}div.dataTables_wrapper div.dataTables_length label{font-weight:normal;text-align:left;white-space:nowrap}div.dataTables_wrapper div.dataTables_length select{width:auto;display:inline-block}div.dataTables_wrapper div.dataTables_filter{text-align:right}div.dataTables_wrapper div.dataTables_filter label{font-weight:normal;white-space:nowrap;text-align:left}div.dataTables_wrapper div.dataTables_filter input{margin-left:.5em;display:inline-block;width:auto}div.dataTables_wrapper div.dataTables_info{padding-top:.85em}div.dataTables_wrapper div.dataTables_paginate{margin:0;white-space:nowrap;text-align:right}div.dataTables_wrapper div.dataTables_paginate ul.pagination{margin:2px 0;white-space:nowrap;justify-content:flex-end}div.dataTables_wrapper div.dt-row{position:relative}div.dataTables_scrollHead table.dataTable{margin-bottom:0 !important}div.dataTables_scrollBody>table{border-top:none;margin-top:0 !important;margin-bottom:0 !important}div.dataTables_scrollBody>table>thead .sorting:before,div.dataTables_scrollBody>table>thead .sorting_asc:before,div.dataTables_scrollBody>table>thead .sorting_desc:before,div.dataTables_scrollBody>table>thead .sorting:after,div.dataTables_scrollBody>table>thead .sorting_asc:after,div.dataTables_scrollBody>table>thead .sorting_desc:after{display:none}div.dataTables_scrollBody>table>tbody tr:first-child th,div.dataTables_scrollBody>table>tbody tr:first-child td{border-top:none}div.dataTables_scrollFoot>.dataTables_scrollFootInner{box-sizing:content-box}div.dataTables_scrollFoot>.dataTables_scrollFootInner>table{margin-top:0 !important;border-top:none}@media screen and (max-width: 767px){div.dataTables_wrapper div.dataTables_length,div.dataTables_wrapper div.dataTables_filter,div.dataTables_wrapper div.dataTables_info,div.dataTables_wrapper div.dataTables_paginate{text-align:center}div.dataTables_wrapper div.dataTables_paginate ul.pagination{justify-content:center !important}}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled){padding-right:20px}table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled):before,table.dataTable.table-sm>thead>tr>th:not(.sorting_disabled):after{right:5px}table.table-bordered.dataTable{border-right-width:0}table.table-bordered.dataTable thead tr:first-child th,table.table-bordered.dataTable thead tr:first-child td{border-top-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-left-width:0}table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable th:first-child,table.table-bordered.dataTable td:first-child,table.table-bordered.dataTable td:first-child{border-left-width:1px}table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable th:last-child,table.table-bordered.dataTable td:last-child,table.table-bordered.dataTable td:last-child{border-right-width:1px}table.table-bordered.dataTable th,table.table-bordered.dataTable td{border-bottom-width:1px}div.dataTables_scrollHead table.table-bordered{border-bottom-width:0}div.table-responsive>div.dataTables_wrapper>div.row{margin:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:first-child{padding-left:0}div.table-responsive>div.dataTables_wrapper>div.row>div[class^=col-]:last-child{padding-right:0}:root[data-bs-theme=dark]{--dt-row-hover: 255, 255, 255;--dt-row-stripe: 255, 255, 255;--dt-column-ordering: 255, 255, 255} diff --git a/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/dataTables.bootstrap5.min.js b/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/dataTables.bootstrap5.min.js index d0b2d4b..08fa679 100644 --- a/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/dataTables.bootstrap5.min.js +++ b/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/dataTables.bootstrap5.min.js @@ -1,4 +1,4 @@ -/*! DataTables Bootstrap 5 integration - * 2020 SpryMedia Ltd - datatables.net/license - */ +/*! DataTables Bootstrap 5 integration + * 2020 SpryMedia Ltd - datatables.net/license + */ !function(t){var n,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?(n=require("jquery"),r=function(e,a){a.fn.dataTable||require("datatables.net")(e,a)},"undefined"==typeof window?module.exports=function(e,a){return e=e||window,a=a||n(e),r(e,a),t(a,0,e.document)}:(r(window,n),module.exports=t(n,window,window.document))):t(jQuery,window,document)}(function(x,e,r,o){"use strict";var i=x.fn.dataTable;return x.extend(!0,i.defaults,{dom:"<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f>><'row dt-row'<'col-sm-12'tr>><'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",renderer:"bootstrap"}),x.extend(i.ext.classes,{sWrapper:"dataTables_wrapper dt-bootstrap5",sFilterInput:"form-control form-control-sm",sLengthSelect:"form-select form-select-sm",sProcessing:"dataTables_processing card",sPageButton:"paginate_button page-item"}),i.ext.renderer.pageButton.bootstrap=function(d,e,s,a,l,c){function u(e,a){for(var t,n,r=function(e){e.preventDefault(),x(e.currentTarget).hasClass("disabled")||b.page()==e.data.action||b.page(e.data.action).draw("page")},o=0,i=a.length;o",{class:m.sPageButton+" "+f,id:0===s&&"string"==typeof t?d.sTableId+"_"+t:null}).append(x("",{href:n?null:"#","aria-controls":d.sTableId,"aria-disabled":n?"true":null,"aria-label":w[t],role:"link","aria-current":"active"===f?"page":null,"data-dt-idx":t,tabindex:n?-1:d.iTabIndex,class:"page-link"}).html(p)).appendTo(e),d.oApi._fnBindAction(n,{action:t},r))}}var p,f,t,b=new i.Api(d),m=d.oClasses,g=d.oLanguage.oPaginate,w=d.oLanguage.oAria.paginate||{},e=x(e);try{t=e.find(r.activeElement).data("dt-idx")}catch(e){}var n=e.children("ul.pagination");n.length?n.empty():n=e.html("
      ").children("ul").addClass("pagination"),u(n,a),t!==o&&e.find("[data-dt-idx="+t+"]").trigger("focus")},i}); \ No newline at end of file diff --git a/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/jquery.dataTables.min.js b/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/jquery.dataTables.min.js index b706c55..0bf7dd8 100644 --- a/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/jquery.dataTables.min.js +++ b/src/Presentation/Taskist.Web/wwwroot/lib/DataTables/js/jquery.dataTables.min.js @@ -1,4 +1,4 @@ -/*! DataTables 1.13.11 - * ©2008-2024 SpryMedia Ltd - datatables.net/license - */ +/*! DataTables 1.13.11 + * ©2008-2024 SpryMedia Ltd - datatables.net/license + */ !function(n){"use strict";var a;"function"==typeof define&&define.amd?define(["jquery"],function(t){return n(t,window,document)}):"object"==typeof exports?(a=require("jquery"),"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||a(t),n(e,t,t.document)}:module.exports=n(a,window,window.document)):window.DataTable=n(jQuery,window,document)}(function(P,j,v,H){"use strict";function d(t){var e=parseInt(t,10);return!isNaN(e)&&isFinite(t)?e:null}function l(t,e,n){var a=typeof t,r="string"==a;return"number"==a||"bigint"==a||!!h(t)||(e&&r&&(t=$(t,e)),n&&r&&(t=t.replace(q,"")),!isNaN(parseFloat(t))&&isFinite(t))}function a(t,e,n){var a;return!!h(t)||(h(a=t)||"string"==typeof a)&&!!l(t.replace(V,"").replace(/