OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
@props([
'includeTitle' => true
])
@if ($includeTitle)
<h5 class="subtitle">Project Checklist <i class="fa fa-question-circle-o helperTooltip" data-tippy-content="The project checklist is list of activities you should do to ensure your projects are well defined, planned and executed."></i> </h5><br/>
@endif
<form name="progressForm" id="progressForm">
<div class="projectSteps">
<div class="progressWrapper">
<div class="progress">
<div
id="progressChecklistBar"
class="progress-bar progress-bar-success tx-transition"
role="progressbar"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100"
style="width: {{ $percentDone }}%"
><span class="sr-only">{{ $percentDone }}%</span></div>
</div>
@foreach ($progressSteps as $step)
<div class="step {{ $step['stepType'] }}" style="left: {{ $step['positionLeft'] }}%;">
<a href="javascript:void(0)" data-toggle="dropdown" class="dropdown-toggle" data-tippy-content="{{ __($step['description']) }}">
<span class="innerCircle"></span>
<span class="title">
@if ($step['status'] == 'done')
<i class="fa fa-circle-check"></i>
@else
<i class="fa-regular fa-circle"></i>
@endif
{{ __("text.step_".$loop->index + 1) }}: {{ __($step['title']) }}
<i class="fa fa-caret-down" aria-hidden="true"></i>
</span>
</a>
<ul class="dropdown-menu">
@foreach ($step['tasks'] as $key => $task)
<li @if ($task['status'] == 'done') class="done" @endif>
<input
type="checkbox"
name="{{ $key }}"
id="progress_{{ $key }}"
hx-patch="{{ BASE_URL }}/hx/projects/checklist/update-subtask/"
hx-target="#progressForm"
hx-swap="outerHTML"
@if ($task['status'] == 'done') checked @endif
@if (! in_array($step['stepType'], ['complete', 'current']))
disabled
@endif
/>
<label for="progress_{{ $key }}"
@if (! in_array($step['stepType'], ['complete', 'current']))
data-tippy-content="Finish the previous steps first"
@endif
>{{ __($task['title'] ?? '') }}</label>
<span class="clearall"></span>
<span class="taskDescription">
{{ __($task['description'] ?? '') }}<br />
<a href="{{ $task['link'] ?? '#' }}"><i class="fa fa-external-link"></i> Take me there</a>
</span>
</li>
@endforeach
</ul>
</div>
@endforeach
</div>
</div>
</form>

View File

@@ -0,0 +1,57 @@
@props([
'project' => [],
'type' => 'simple'
])
<div class="projectBox" id="projectBox-{{ $project['id'] }}">
<div class="row" >
<div class="col-md-12 fixed">
<div class="row tw-pb-sm">
<div class="col-md-10">
<a href="{{ BASE_URL }}/dashboard/show?projectId={{ $project['id'] }}">
<span class="projectAvatar">
@if(isset($projectTypeAvatars[$project["type"]]) && $projectTypeAvatars[$project["type"]] != "avatar")
<span class="{{ $projectTypeAvatars[$project["type"]] }}"></span>
@else
<img src='{{ BASE_URL }}/api/projects?projectAvatar={{ $project["id"] }}&v={{ format($project['modified'])->timestamp() }}' />
@endif
</span>
@if($project["clientName"] != '')
<small>{{ $project["clientName"] }}</small><br />
@else
<small>{{ __('projectType.'.$project["type"] ?? 'project') }}</small><br />
@endif
<strong>{{ $project['name'] }} <i class="fa-solid fa-up-right-from-square"></i></strong>
</a>
</div>
<div class="col-md-2 tw-text-right">
<a href="javascript:void(0);"
hx-patch="{{ BASE_URL }}/hx/projects/projectCard/toggleFavorite"
hx-vals='{"isFavorite": {{ $project['isFavorite'] }}, "projectId": {{ $project['id'] }}}'
hx-target="#projectBox-{{ $project['id'] }}"
onclick="jQuery(this).addClass('go')"
hx-swap="none"
hx-on::after-request="jQuery(this).removeClass('go')"
class="favoriteClick favoriteStar pull-right margin-right {{ $project['isFavorite'] ? 'isFavorite' : ''}} tw-mr-[5px]"
data-tippy-content="{{ __('label.favorite_tooltip') }}">
<i class="{{ $project['isFavorite'] ? 'fa-solid' : 'fa-regular' }} fa-star"></i>
</a>
</div>
</div>
@if($type != "simple")
<div id="projectProgressBox-{{ $project['id'] }}"
hx-get="{{ BASE_URL }}/hx/projects/projectCardProgress/getProgress?pId={{ $project['id'] }}"
hx-trigger="load"
hx-swap="innerHTML"
hx-target="#projectProgressBox-{{ $project['id'] }}"
hx-indicator=".htmx-indicator">
<div class="htmx-indicator">
<x-global::loadingText type="card" count="1" />
</div>
</div>
@endif
</div>
</div>
</div>

View File

@@ -0,0 +1,52 @@
@php( $percentDone = format($project['progress']['percent'])->decimal())
<div class="row">
<div class="col-md-7">
{{ __("subtitles.project_progress") }}
</div>
<div class="col-md-5" style="text-align:right">
{{ sprintf(__("text.percent_complete"), $percentDone) }}
</div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-success"
role="progressbar"
aria-valuenow="{{ $percentDone }}"
aria-valuemin="0"
aria-valuemax="100"
style="width: {{ $percentDone }}%">
<span class="sr-only">{{ sprintf(__("text.percent_complete"), $percentDone) }}</span>
</div>
</div>
<div class="row">
<div class="col-md-12">
@if ($project['status'] !== null && $project['status'] != '')
<span class="label label-{{ $project['status'] }}">
{{ __("label.project_status_" . $project['status']) }}
</span><br />
@else
<span class="label label-grey">{{ __("label.no_status") }}</span><br />
@endif
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<div class="team">
@foreach ($project['team'] as $member)
<div class="commentImage" style="margin-right:-10px;" data-tippy-content="{{ $member['firstname'] }} {{ $member['lastname'] }}">
<img
style=""
src="{{ BASE_URL }}/api/users?profileImage={{ $member['id'] }}&v={{ format($member['modified'])->timestamp() }}" data-tippy-content="{{ $member['firstname'] . ' ' . $member['lastname'] }}" />
</div>
@endforeach
</div>
<div class="clearall"></div>
</div>
</div>
<script>
// Idempotent init (see milestoneCard) — avoids re-instancing all tooltips
// every time a project progress bar renders.
window.leantime?.initTooltips?.();
</script>

View File

@@ -0,0 +1,99 @@
<div id="myProjectsHub"
hx-get="{{BASE_URL}}/projects/projectHubProjects/get"
hx-trigger="HTMX.updateProjectList from:body"
hx-target="#myProjectsHub"
hx-swap="outerHTML">
@if (count($clients) > 0)
<div class="dropdown dropdownWrapper pull-right">
<a href="javascript:void(0)" class="btn btn-default dropdown-toggle header-title-dropdown" data-toggle="dropdown">
@if ($currentClientName != '')
{{ $currentClientName }}
@else
{{ __("headline.all_clients") }}
@endif
<i class="fa fa-caret-down"></i>
</a>
<ul class="dropdown-menu">
<li><a href="{{ BASE_URL }}/projects/showMy">{{ __("headline.all_clients") }}</a></li>
@foreach ($clients as $key => $value)
@if(! empty($key))
<li>
<a href="javascript:void(0);"
hx-get="{{BASE_URL}}/projects/projectHubProjects/get?client={{ $key }}"
hx-target="#myProjectsHub"
hx-swap="outerHTML">{{ $value['name'] }}</a>
</li>
@endif
@endforeach
</ul>
</div>
@endif
@if (count($allProjects) == 0)
<br /><br />
<div class='center'>
<div style='width:70%; color:var(--main-action-color)' class='svgContainer'>
{{ __('notifications.not_assigned_to_any_project') }}
@if($login::userIsAtLeast($roles::$manager))
<br />
<x-global::forms.button tag="a" link="{{ BASE_URL }}/projects/newProject" contentRole="primary">{{ __('link.new_project') }}</x-global::forms.button>
@endif
</div>
</div>
@endif
<x-global::accordion id="myProjectsHub-favorites" class="noBackground">
<x-slot name="title">
My Favorites
</x-slot>
<x-slot name="content">
<div class="row">
@php
$hasFavorites = false;
@endphp
@foreach ($allProjects as $project)
@if($project['isFavorite'] == true)
<div class="col-md-4">
@include("projects::partials.projectCard", ["project" => $project, "type" => "detailed"])
</div>
@php
$hasFavorites = true;
@endphp
@endif
@endforeach
@if($hasFavorites === false)
<div style="color:var(--main-action-color)">
You don't have any favorites. 😿
</div>
@endif
</div>
</x-slot>
</x-global::accordion>
<x-global::accordion id="myProjectsHub-otherProjects" class="noBackground">
<x-slot name="title">
🗂️ All Assigned Projects
</x-slot>
<x-slot name="content">
<div class="row">
@foreach ($allProjects as $project)
@if($project['isFavorite'] == false)
<div class="col-md-3">
@include("projects::partials.projectCard", ["project" => $project, "type" => "detailed"])
</div>
@endif
@endforeach
</div>
</x-slot>
</x-global::accordion>
</div>