rest of app
Some checks failed
app_template / nodejs (push) Waiting to run
app_template / release (push) Waiting to run
app_template / xml (push) Successful in 18s
app_template / php (push) Has been cancelled

This commit is contained in:
Michel Roux 2024-11-10 17:07:56 +01:00
parent 0f77ef8f93
commit eea558ec0f
9 changed files with 20 additions and 35 deletions

View File

@ -9,17 +9,15 @@ use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\AppFramework\Bootstrap\IRegistrationContext;
class Application extends App implements IBootstrap { class Application extends App implements IBootstrap
{
public const APP_ID = 'app_template'; public const APP_ID = 'app_template';
/** @psalm-suppress PossiblyUnusedMethod */
public function __construct() { public function __construct() {
parent::__construct(self::APP_ID); parent::__construct(self::APP_ID);
} }
public function register(IRegistrationContext $context): void { public function register(IRegistrationContext $context): void {}
}
public function boot(IBootContext $context): void { public function boot(IBootContext $context): void {}
}
} }

View File

@ -10,12 +10,10 @@ use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController; use OCP\AppFramework\OCSController;
/** class ApiController extends OCSController
* @psalm-suppress UnusedClass {
*/
class ApiController extends OCSController {
/** /**
* An example API endpoint * An example API endpoint.
* *
* @return DataResponse<Http::STATUS_OK, array{message: string}, array{}> * @return DataResponse<Http::STATUS_OK, array{message: string}, array{}>
* *

View File

@ -12,10 +12,8 @@ use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Http\TemplateResponse;
/** class PageController extends Controller
* @psalm-suppress UnusedClass {
*/
class PageController extends Controller {
#[NoCSRFRequired] #[NoCSRFRequired]
#[NoAdminRequired] #[NoAdminRequired]
#[OpenAPI(OpenAPI::SCOPE_IGNORE)] #[OpenAPI(OpenAPI::SCOPE_IGNORE)]

View File

@ -6,7 +6,7 @@
xmlns="https://getpsalm.org/schema/config" xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
findUnusedBaselineEntry="true" findUnusedBaselineEntry="true"
findUnusedCode="true" findUnusedCode="false"
> >
<projectFiles> <projectFiles>
<directory name="lib" /> <directory name="lib" />

View File

@ -6,7 +6,7 @@ use Rector\Config\RectorConfig;
return RectorConfig::configure() return RectorConfig::configure()
->withPaths([ ->withPaths([
__DIR__ . '/lib', __DIR__.'/lib',
]) ])
->withPhpSets(php80: true) ->withPhpSets(php80: true)
->withPreparedSets( ->withPreparedSets(
@ -25,4 +25,5 @@ return RectorConfig::configure()
symfonyConfigs: true, symfonyConfigs: true,
twig: true, twig: true,
phpunit: true, phpunit: true,
); )
;

View File

@ -7,7 +7,7 @@
</template> </template>
<script> <script>
import NcAppContent from '@nextcloud/vue/dist/Components/NcAppContent.js' import { NcAppContent } from '@nextcloud/vue'
export default { export default {
name: 'App', name: 'App',

View File

@ -1,6 +0,0 @@
import Vue from 'vue'
import App from './App.vue'
Vue.mixin({ methods: { t, n } })
const View = Vue.extend(App)
new View().$mount('#app_template')

6
src/main.ts Normal file
View File

@ -0,0 +1,6 @@
import '@formatjs/intl-segmenter/polyfill'
import { createApp } from 'vue'
import App from './App.vue'
const View = createApp(App)
View.mount('#content')

View File

@ -1,11 +1 @@
<?php
declare(strict_types=1);
use OCP\Util;
Util::addScript(OCA\AppTemplate\AppInfo\Application::APP_ID, 'main');
?>
<div id="app_template"></div> <div id="app_template"></div>