akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -0,0 +1,107 @@
<div class="relative w-full flex border-b pt-8 mb-4">
<div class="flex flex-row items-center place-center border-r">
<button class="flex items-center" id="dropdownButton" data-dropdown-toggle="dropdown">
<i class="material-icons w-10 flex items-center aspect-square text-light-gray ltr:pl-2 rtl:pr-2 hover:text-gray-700"> apps_outlined </i>
</button>
<div id="dropdown" data-click-outside-none class="w-full px-0 hidden z-10">
<div class="flex flex-col md:flex-row">
<div class="w-full lg:w-6/12 flex flex-col shadow-md bg-white px-4 lg:pl-8 py-8 gap-2 rounded-l-xl">
<h4 class="capitalize font-thin">
{{ trans_choice('general.categories', 1) }}
</h4>
<div class="grid grid-cols-2 gap-2">
@foreach ($categories as $slug => $category)
<x-link href="{{ $categoryUrl($slug) }}" class="font-semibold text-sm ltr:pr-4 rtl:pl-4 lg:pr-0 truncate bg-transparent" override="class">
<span class="border-b border-transparent transition-all hover:border-black">
{{ $category }}
</span>
</x-link>
@endforeach
</div>
</div>
<div class="w-full lg:w-6/12 flex flex-col shadow-md bg-purple-lighter px-4 lg:px-12 py-8 gap-2 rounded-r-xl">
<h4 class="capitalize font-thin mb-2">
{{ trans('modules.popular_this_week') }}
</h4>
@if ($popular)
<div class="flex flex-col gap-4">
@foreach ($popular->data as $item)
<div class="hover:shadow-2xl rounded-lg">
<a href="{{ route('apps.app.show', $item->slug) }}" class="flex items-center p-2">
@foreach ($item->files as $file)
@if (($file->media_type == 'image') && ($file->pivot->zone == 'thumbnail'))
<img src="{{ $file->path_string }}" alt="{{ $item->name }}" class="w-28 h-20 rounded-md object-cover ltr:mr-3 rtl:ml-3" />
@endif
@endforeach
<div class="flex flex-col py-1 gap-0">
<h6 class="text-sm font-bold capitalize">
{!! $item->name !!}
</h6>
<div class="line-clamp-2">
<p class="font-thin text-xs text-left">
{!! $item->description !!}
</p>
</div>
</div>
</a>
</div>
@endforeach
</div>
@else
@endif
</div>
</div>
</div>
</div>
<div class="flex flex-col lg:flex-row w-full justify-between">
<div class="h-full relative">
<form method="GET" action="{{ url("/" . company_id()) }}/apps/search">
<div class="h-full flex items-center pl-2 gap-2">
<i class="material-icons text-light-gray">search</i>
<input
type="text"
name="keyword"
class="w-full bg-transparent text-black text-sm border-0 pr-10 pl-0 pb-2 focus:outline-none focus:ring-transparent focus:border-purple"
value="{{ isset($keyword) ? $keyword : '' }}"
placeholder="{{ trans('general.search_placeholder') }}"
autocomplete="off"
/>
</div>
</form>
</div>
<div class="flex flex-row items-end lg:items-center mb-1 divide-x divide-black-400">
<x-link href="{{ route('apps.home.index') }}" class="text-sm font-semibold px-2 sm:mt-0 sm:mb-0 leading-4" override="class">
<span class="border-b border-transparent transition-all hover:border-black-400">
{{ trans('modules.home') }}
</span>
</x-link>
<x-link href="{{ route('apps.new') }}" class="text-sm font-semibold px-2 sm:mt-0 sm:mb-0 leading-4" override="class">
<span class="border-b border-transparent transition-all hover:border-black-400">
{{ trans('modules.new') }}
</span>
</x-link>
<x-link href="{{ route('apps.paid') }}" class="text-sm font-semibold px-2 sm:mt-0 sm:mb-0 leading-4" override="class">
<span class="border-b border-transparent transition-all hover:border-black-400">
{{ trans('modules.top_paid') }}
</span>
</x-link>
<x-link href="{{ route('apps.free') }}" class="text-sm font-semibold px-2 sm:mt-0 sm:mb-0 leading-4" override="class">
<span class="border-b border-transparent transition-all hover:border-black-400">
{{ trans('modules.top_free') }}
</span>
</x-link>
</div>
</div>
</div>

View File

@ -0,0 +1,81 @@
@props([
'title',
])
<head>
@stack('head_start')
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8; charset=ISO-8859-1"/>
<title>{!! $title !!} - @setting('company.name')</title>
<base href="{{ config('app.url') . '/' }}">
<x-layouts.pwa.head />
<!-- Favicon -->
<link rel="icon" href="{{ asset('public/img/favicon.ico') }}" type="image/png">
<!--Icons-->
<link rel="stylesheet" href="{{ asset('public/css/fonts/material-icons/style.css?v=' . version('short')) }}" type="text/css">
<!-- Font -->
<link rel="stylesheet" href="{{ asset('public/vendor/quicksand/css/quicksand.css?v=' . version('short')) }}" type="text/css">
<!-- Css -->
<link rel="stylesheet" href="{{ asset('public/css//third_party/swiper-bundle.min.css?v=' . version('short')) }}" type="text/css">
<link rel="stylesheet" href="{{ asset('public/css//third_party/vue-html-editor.css?v=' . version('short')) }}" type="text/css">
<link rel="stylesheet" href="{{ asset('public/css/element.css?v=' . version('short')) }}" type="text/css">
<link rel="stylesheet" href="{{ asset('public/css/app.css') }}" type="text/css">
@stack('css')
@stack('stylesheet')
<style type="text/css">
.app-documentation > h1 {
text-align: center;
font-size: 1.75rem;
line-height: 2rem;
}
.app-documentation > p,
.app-documentation > li {
font-size: 1rem;
line-height: 1.5rem;
}
.app-documentation > ul {
list-style-type: disc;
list-style-position: inside;
}
</style>
@livewireStyles
<script type="text/javascript"><!--
var url = '{{ url("/" . company_id()) }}';
var app_home = '{{ route("apps.home.index") }}';
var app_url = '{{ config("app.url") }}';
var aka_currency = {!! !empty($currency) ? $currency : 'false' !!};
//--></script>
@stack('js')
<script type="text/javascript"><!--
window.Laravel = <?php echo json_encode([
'csrfToken' => csrf_token(),
]); ?>;
var flash_notification = {!! (session()->has('flash_notification')) ? json_encode(session()->get('flash_notification')) : 'false' !!};
//--></script>
{{ session()->forget('flash_notification') }}
@stack('scripts')
@stack('head_end')
</head>

View File

@ -0,0 +1,63 @@
<div>
<div>
@foreach ($module->files as $file)
<a href="{{ route('apps.app.show', $module->slug) }}">
@if (($file->media_type == 'image') && ($file->pivot->zone == 'thumbnail'))
<img src="{{ $file->path_string }}" alt="{{ $module->name }}" class="rounded-md" />
@endif
</a>
@endforeach
</div>
<div class="flex flex-col py-2 justify-between align-bottom">
<div class="flex items-baseline justify-between">
<h4 class="w-36 truncate">
<a href="{{ route('apps.app.show', $module->slug) }}">
{{ $module->name }}
</a>
</h4>
<div class="text-xs">
@if ($module->price == '0.0000')
<span class="font-bold text-purple">
{{ trans('modules.free') }}
</span>
@else
{!! $module->price_prefix !!}
@if (isset($module->special_price))
<del class="text-danger">
{{ $module->price }}
</del>
{{ $module->special_price }}
@else
{{ $module->price }}
@endif
{!! $module->price_suffix !!}
@endif
</div>
</div>
<div class="flex items-baseline justify-between">
<div class="flex">
@if($module->vote > 0)
@for ($i = 1; $i <= $module->vote; $i++)
<i class="material-icons text-xs text-orange">star</i>
@endfor
@for ($i = $module->vote; $i < 5; $i++)
<i class="material-icons text-xs">star_border</i>
@endfor
@endif
</div>
<small class="text-xs">
@if ($module->total_review)
{{ $module->total_review }} {{ trans('modules.tab.reviews') }}
@endif
</small>
</div>
</div>
</div>

View File

@ -0,0 +1,59 @@
<div>
<div class="flex justify-end py-2">
@if ($module->payment_type)
@if ($module->payment_type == 'yearly')
@php
$color = 'bg-purple-100';
$text = trans('general.yearly');
@endphp
@else
@php
$color = 'bg-purple-100';
$text = trans('general.monthly');
@endphp
@endif
@endif
<span class="inline-flex items-center justify-center text-xs px-4 py-1 font-semibold leading-none rounded-md {{ $color }}">
{{ $text }}
</span>
</div>
<div>
@foreach ($module->files as $file)
<a href="{{ route('apps.app.show', $module->slug) }}">
@if (($file->media_type == 'image') && ($file->pivot->zone == 'thumbnail'))
<img src="{{ $file->path_string }}" alt="{{ $module->name }}" class="rounded-md" />
@endif
</a>
@endforeach
</div>
<div class="flex py-2 justify-between items-center">
<div class="py-2">
<h4 class="truncate font-bold text-sm">
<a href="{{ route('apps.app.show', $module->slug) }}">
{{ $module->name }}
</a>
</h4>
</div>
<div>
@if ($module->status_type == 'active')
@php
$color = 'bg-green-300';
$text = trans('general.enabled');
@endphp
@else
@php
$color = 'bg-red';
$text = trans('general.disabled');
@endphp
@endif
<span class="inline-flex items-center justify-center text-xs px-4 py-1 font-semibold leading-none rounded-md {{ $color }} text-white">
{{ $text }}
</span>
</div>
</div>
</div>

View File

@ -0,0 +1,9 @@
<div id="releases-items">
@if (! empty($releases))
@foreach ($releases->data as $release)
<p>{{ $release->version }} - <x-date :date="$release->released_at" /></p>
{!! $release->changelog !!}
@endforeach
@endif
</div>

View File

@ -0,0 +1,41 @@
<div id="review-items" class="divide-y">
@if (! empty($reviews))
@foreach ($reviews->data as $review)
<div class="flex flex-col lg:flex-row gap-2 py-4 px-2 justify-between items-start">
<div class="flex flex-col">
<h5 class="text-sm mb-0">
{{ $review->author }}
</h5>
<p class="text-xs">
<x-date date="{{ $review->created_at }}" />
</p>
</div>
<span class="flex gap-0">
@if ($review->rating)
@for ($i = 1; $i <= $review->rating; $i++)
<i class="material-icons text-xs text-orange">star</i>
@endfor
@if ($review->rating < 5)
@for ($i = 1; $i <= 5 - $review->rating; $i++)
<i class="material-icons text-xs">star_border</i>
@endfor
@endif
@else
@for ($i = 1; $i <= 5; $i++)
<i class="material-icons text-xs">star_border</i>
@endfor
@endif
</span>
<div class="w-full lg:w-1/2">
<p class="text-sm lh-160">
{!! nl2br($review->text) !!}
</p>
</div>
</div>
@endforeach
@endif
</div>

View File

@ -0,0 +1,45 @@
@props(['module', 'installed', 'enable'])
@if ($installed)
@can('delete-modules-item')
<a href="{{ route('apps.app.uninstall', $module->slug) }}" class="bg-red text-white rounded-md text-sm text-center w-1/2 py-2 truncate">
{{ trans('modules.button.uninstall') }}
</a>
@endcan
@can('update-modules-item')
@if ($enable)
<a href="{{ route('apps.app.disable', $module->slug) }}" class="bg-orange rounded-md text-white w-1/2 text-center text-sm py-2 truncate">
{{ trans('modules.button.disable') }}
</a>
@else
<a href="{{ route('apps.app.enable', $module->slug) }}" class="bg-green rounded-md text-white text-sm text-center w-1/2 py-2 truncate">
{{ trans('modules.button.enable') }}
</a>
@endif
@endcan
@else
@can('create-modules-item')
@if ($module->install)
@if (! empty($module->isPurchase) && (! empty($module->purchase_type) && $module->purchase_type == 'monthly'))
<x-tooltip message="{!! trans('modules.can_not_install', ['app' => $module->name]) !!}" placement="right">
<x-button disabled="disabled">
{{ trans('modules.install') }}
</x-button>
</x-tooltip>
@else
<button type="button"
@click="onInstall('{{ $module->action_url }}', '{{ $module->slug }}', '{!! str_replace("'", "\'", $module->name) !!}', '{{ $module->version }}')"
class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate"
id="install-module"
>
{{ trans('modules.install') }}
</button>
@endif
@else
<a href="{{ $module->action_url }}" class="bg-green hover:bg-green-700 rounded-md text-white text-sm text-center w-full py-2 truncate" target="_blank">
{{ trans('modules.use_app') }}
</a>
@endif
@endcan
@endif

View File

@ -0,0 +1,5 @@
@props(['module'])
<div class="font-thin text-sm">
{!! $module->changelog !!}
</div>

View File

@ -0,0 +1,7 @@
@props(['module'])
<div class="font-thin text-sm">
<div class="app-documentation flex flex-col gap-4 py-4">
{!! $module->description !!}
</div>
</div>

View File

@ -0,0 +1,7 @@
@props(['module'])
<div class="font-thin text-sm">
<div class="app-documentation flex flex-col gap-4 py-4">
{!! $module->documentation->body !!}
</div>
</div>

View File

@ -0,0 +1,29 @@
@props(['module'])
<div class="flex flex-col gap-20">
@foreach ($module->call_to_actions as $cta)
<div @class([
'flex flex-col',
'lg:flex-row-reverse' => $cta->position == 'left',
'lg:flex-row' => $cta->position != 'left',
'justify-between gap-12'
])
>
<div class="w-full lg:w-1/2 flex flex-col gap-6 justify-center">
<h2 class="font-bold text-3xl">
{{ $cta->title }}
</h2>
<div class="flex flex-col gap-4 divide-y">
<div class="font-thin text-sm leading-6 tracking-widest">
{{ $cta->description }}
</div>
</div>
</div>
<div class="w-full lg:w-1/2">
<img src="{{ $cta->thumb->path_string }}" alt="{{ $cta->thumb->alt_attribute }}" />
</div>
</div>
@endforeach
</div>

View File

@ -0,0 +1,5 @@
@props(['module'])
<div class="font-thin text-sm">
{!! $module->installation !!}
</div>

View File

@ -0,0 +1,59 @@
@props(['module'])
@if ($module->price != '0.0000')
<div class="flex gap-2 items-baseline">
{!! $module->price_prefix !!}
<div x-show="price_type == true">
@if (! empty($module->is_discount))
<del class="text-red">
{!! $module->yearly_per_monthly_price !!}
</del>
<span class="text-5xl font-bold text-purple">
{!! $module->yearly_per_monthly_special_price !!}
</span>
@else
<span class="text-5xl font-bold text-purple">
{!! $module->yearly_per_monthly_price !!}
</span>
@endif
<div class="text-center text-sm mt-3 mb--2">
<span style="height: 18px;display: block;"></span>
</div>
</div>
<div x-show="price_type == false">
@if (! empty($module->is_discount))
<del class="text-red">
{!! $module->monthly_price !!}
</del>
<span class="text-5xl font-bold text-purple">
{!! $module->monthly_special_price !!}
</span>
@else
<span class="text-5xl font-bold text-purple">
{!! $module->monthly_price !!}
</span>
@endif
<div class="text-center text-sm mt-3 mb--2">
<span style="font-size: 12px;">
<span class="text-danger">*</span> {!! trans('modules.information_monthly') !!}
</span>
</div>
</div>
{!! $module->price_suffix !!}
<span class="font-thin">
{{ trans('modules.per_month') }}
</span>
</div>
@else
<span class="text-4xl font-bold text-purple">
{{ trans('modules.free') }}
</span>
@endif

View File

@ -0,0 +1,36 @@
@props(['module'])
@php
$releases = $module->app_releases;
@endphp
<div id="releases" class="clearfix js-releases-content" v-if="releases.status" v-html="releases.html"></div>
<div id="releases" class="clearfix js-releases-content" v-else>
<x-layouts.modules.releases :releases="$releases" />
</div>
@if (! empty($releases->current_page != $releases->last_page))
@stack('pagination_start')
<div class="w-full flex flex-row justify-evenly my-2" v-if="releases.pagination.last_page != releases.pagination.current_page">
<button
type="button"
id="releases-load-more"
:disabled="loadMoreLoading"
@click="onModuleLoadMore('releases')"
class="w-48 bg-green m-auto block whitespace-nowrap px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-white text-center js-learn-more js-button-modal-submit hover:bg-green-700 disabled:bg-green-300"
>
<i v-if="loadMoreLoading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
<span :class="[{'opacity-0': loadMoreLoading}]">
{{ trans('modules.see_more') }}
</span>
</button>
</div>
@stack('pagination_end')
@else
<div class="flex">
<small>{{ trans('general.no_records') }}</small>
</div>
@endif

View File

@ -0,0 +1,36 @@
@props(['module'])
@php
$reviews = $module->app_reviews;
@endphp
<div id="review" class="clearfix js-reviews-content" v-if="reviews.status" v-html="reviews.html"></div>
<div id="review" class="clearfix js-reviews-content" v-else>
<x-layouts.modules.reviews :reviews="$reviews" />
</div>
@if (! empty($reviews->current_page != $reviews->last_page))
@stack('pagination_start')
<div class="w-full flex flex-row justify-evenly my-2" v-if="reviews.pagination.last_page != reviews.pagination.current_page">
<button
type="button"
id="review-load-more"
:disabled="loadMoreLoading"
@click="onModuleLoadMore('reviews')"
class="w-48 bg-green m-auto block whitespace-nowrap px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-white text-center js-learn-more js-button-modal-submit hover:bg-green-700 disabled:bg-green-300"
>
<i v-if="loadMoreLoading" class="animate-submit delay-[0.28s] absolute w-2 h-2 rounded-full left-0 right-0 -top-3.5 m-auto before:absolute before:w-2 before:h-2 before:rounded-full before:animate-submit before:delay-[0.14s] after:absolute after:w-2 after:h-2 after:rounded-full after:animate-submit before:-left-3.5 after:-right-3.5 after:delay-[0.42s]"></i>
<span :class="[{'opacity-0': loadMoreLoading}]">
{{ trans('modules.see_more') }}
</span>
</button>
</div>
@stack('pagination_end')
@else
<div class="flex">
<small>{{ trans('general.no_records') }}</small>
</div>
@endif

View File

@ -0,0 +1,5 @@
@props(['module'])
<div class="relative">
<akaunting-slider :screenshots="{{ json_encode($module->screenshots) }}" :arrow="true" :slider-view="5"></akaunting-slider>
</div>

View File

@ -0,0 +1,23 @@
<x-form>
<div class="lg:absolute lg:ltr:right-0 lg:rtl:left-0 top-4">
<label for="priceToggle" class="flex items-center cursor-pointer" x-on:click="price_type = ! price_type">
<div class="relative">
<input type="checkbox" id="priceToggle" class="sr-only" x-model="price_type">
<div class="bg-purple-300 w-24 h-7 rounded-full">
<span id="apps-toggle-monthly" class="monthly-badge text-xs text-white float-left ml-3 mt-1.5" x-show="price_type == true">
{{ trans('general.monthly') }}
</span>
<span id="apps-toggle-yearly" class="yearly-badge text-xs text-white float-right mr-3 mt-1.5" x-show="price_type == false">
{{ trans('general.yearly') }}
</span>
</div>
<div class="dot absolute left-1 top-1 bg-white w-5 h-5 rounded-full transition"
x-bind:style="price_type == true ? 'transform: translateX(333%)' : ' transform: translateX(0) '"
></div>
</div>
</label>
</div>
</x-form>