Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
更新:新增快捷发帖按钮
  • Loading branch information
zhuchunshu committed Mar 13, 2022
1 parent 8731d40 commit 394d42b
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/CodeFec/Plugins.php
Expand Up @@ -71,7 +71,7 @@ public function composerInstall(): void
$list = self::GetAll();
foreach($list as $data){
if(file_exists(plugin_path($data['dir']."/composer.json"))){
\Swoole\Coroutine\System::exec("cd ".plugin_path($data['dir'])." && yes | composer install");
\Swoole\Coroutine\System::exec("cd ".plugin_path($data['dir'])." && yes yes | composer install");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/Command/StartCommand.php
Expand Up @@ -48,7 +48,7 @@ public function handle()
$this->info("插件扩展更新完毕!");

$this->info("开始清理缓存...");
\Swoole\Coroutine\System::exec("yes | composer du");
\Swoole\Coroutine\System::exec("yes yes | composer du");
$this->info("缓存清理完毕!");
$option = make(Option::class, [
'dir' => $this->input->getOption('dir'),
Expand Down
4 changes: 2 additions & 2 deletions app/Controller/ApiController.php
Expand Up @@ -77,7 +77,7 @@ public function AdminPluginSave(): array
} catch (InvalidArgumentException $e) {
}
cache()->delete("plugins.en");
\Swoole\Coroutine\System::exec("yes | composer du");
\Swoole\Coroutine\System::exec("yes yes | composer du");
return Json_Api(200, true, ['msg' => "更新成功!"]);
}

Expand Down Expand Up @@ -173,7 +173,7 @@ public function AdminPluginRemove(): array
}
if (request()->input("path")) {
\Swoole\Coroutine\System::exec("rm -rf " . request()->input("path"));
\Swoole\Coroutine\System::exec("yes | composer du");
\Swoole\Coroutine\System::exec("yes yes | composer du");
return Json_Api(200, true, ['msg' => "卸载成功!"]);
}

Expand Down
2 changes: 2 additions & 0 deletions app/Plugins/Core/resources/package/js/app.js
Expand Up @@ -2,6 +2,7 @@ import axios from "axios";
import swal from "sweetalert";
import iziToast from "izitoast";


if(document.getElementById("vue-header-right-my")){
const vhrm ={
data(){
Expand Down Expand Up @@ -139,3 +140,4 @@ $(function(){
// }else{
// $('span[core-show="online"]').remove();
// }

1 change: 1 addition & 0 deletions app/Plugins/Core/resources/package/sass/core.scss
@@ -1,6 +1,7 @@
@import '~hover.css';


// 自己定义的
body {
-webkit-backface-visibility: hidden;
overflow-x: hidden;
Expand Down
12 changes: 8 additions & 4 deletions app/Plugins/Core/resources/views/app.blade.php
Expand Up @@ -11,8 +11,6 @@
<link rel="icon" href="/logo.svg" type="image/x-icon" />
<link rel="shortcut icon" href="/logo.svg" type="image/x-icon" />
<link href="{{ '/tabler/css/tabler.min.css' }}" rel="stylesheet" />
<link href="{{ '/tabler/css/tabler-flags.min.css' }}" rel="stylesheet" />
<link href="{{ '/tabler/css/tabler-payments.min.css' }}" rel="stylesheet" />
<link href="{{ '/tabler/css/tabler-vendors.min.css' }}" rel="stylesheet" />
<link rel="stylesheet" href="{{mix("plugins/Core/css/core.css")}}">
<link href="{{ file_hash("css/diy.css") }}" rel="stylesheet" />
Expand All @@ -25,14 +23,20 @@
<meta name="keywords" content="@yield('keywords',get_options('keywords'))">
@yield('css')
@yield('headers')
{{--插件css--}}
@foreach((new \App\CodeFec\Plugins())->getEnPlugins() as $value)
@if(file_exists(public_path("plugins/".$value."/".$value.".css")))
<link href="{{ file_hash("plugins/".$value."/".$value.".css") }}" rel="stylesheet" />
@endif
@endforeach
</head>

<body class="antialiased">
@include("Core::layouts.themes.header-".get_options('core_theme_header',1))
@include("Core::layouts.errors")
@include("Core::layouts._msg")
@yield('header')
<div class="page-body">
<div id="{{ path_class() }}-page" class="page-body">
<div class="container-xl">
@yield('content')
</div>
Expand All @@ -50,13 +54,13 @@
@foreach (\App\CodeFec\Ui\functions::get('js') as $key => $value)
<script src="{{ $value }}"></script>
@endforeach
@yield('scripts')
{{--插件js--}}
@foreach((new \App\CodeFec\Plugins())->getEnPlugins() as $value)
@if(file_exists(public_path("plugins/".$value."/".$value.".js")))
<script src="{{ file_hash("plugins/".$value."/".$value.".js") }}"></script>
@endif
@endforeach
@yield('scripts')
</div>
</body>
</html>
11 changes: 11 additions & 0 deletions app/Plugins/Core/resources/views/index.blade.php
Expand Up @@ -22,6 +22,17 @@
</div>
</div>
</div>
<div>
<a href="/topic/create" class="btn btn-floating btn-indigo" style="opacity: 0.81;bottom: 45px; right: 24px;-moz-border-radius: 50px;-webkit-border-radius: 50px;border-radius: 50px;">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
发帖
</a>
</div>

</div>

@endsection
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -47,6 +47,7 @@
"vditor": "^3.8.11",
"vue": "^3.1.1",
"vue-cookie": "^1.1.4",
"vue-float-action-button": "^0.7.9",
"vue-terminal": "^1.2.0",
"yarn": "^1.22.11"
},
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -6760,6 +6760,11 @@ vue-cookie@^1.1.4:
dependencies:
tiny-cookie "^1.0"

vue-float-action-button@^0.7.9:
version "0.7.9"
resolved "https://registry.npmmirror.com/vue-float-action-button/-/vue-float-action-button-0.7.9.tgz#ed086fe443cd4f0000765f36d2ba1984286904ff"
integrity sha512-f5EmvV6nfUV5bMXFT/3SHG8SaJMf82VW+4zScYpRy7OnqAhZto1XH13qAJsQrGrZ2y0eufeYn66bwozFc0FfJg==

vue-loader@^16.2.0:
version "16.2.0"
resolved "https://registry.nlark.com/vue-loader/download/vue-loader-16.2.0.tgz#046a53308dd47e58efe20ddec1edec027ce3b46e"
Expand Down

0 comments on commit 394d42b

Please sign in to comment.