From db3cb63810a53cbf94cc6de270b55a7675dd37de Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 27 Oct 2022 15:07:12 +0200 Subject: [PATCH] Let's not support oci yet Signed-off-by: Carl Schwan --- .eslintrc.js | 72 +----- .github/workflows/phpunit-oci.yml | 142 ------------ package-lock.json | 2 + package.json | 2 + src/App.vue | 59 ++--- src/components/ActorAvatar.vue | 25 ++- src/components/Composer/Composer.vue | 172 +++++++------- src/components/Composer/PreviewGrid.vue | 17 +- src/components/Composer/PreviewGridItem.vue | 53 +++-- src/components/Emoji.vue | 12 +- src/components/EmptyContent.vue | 6 +- src/components/FollowButton.vue | 28 ++- src/components/MessageContent.js | 224 ------------------- src/components/PostAttachment.vue | 34 +-- src/components/ProfileInfo.vue | 138 ++++++------ src/components/Search.vue | 84 +++---- src/components/TimelineEntry.vue | 23 +- src/components/TimelineList.vue | 236 ++++++++++---------- src/components/TimelinePost.vue | 52 ++--- src/components/UserEntry.vue | 22 +- src/dashboard.js | 2 +- src/directives/focusOnCreate.js | 4 +- src/main.js | 12 +- src/mixins/accountMixins.js | 14 +- src/mixins/currentUserMixin.js | 8 +- src/mixins/follow.js | 6 +- src/mixins/popoverMenu.js | 10 +- src/mixins/serverData.js | 15 +- src/ostatus.js | 4 +- src/profile.js | 36 +-- src/router.js | 40 ++-- src/services/logger.js | 37 +++ src/store/account.js | 22 +- src/store/index.js | 10 +- src/store/settings.js | 6 +- src/store/timeline.js | 60 ++--- src/views/Dashboard.vue | 23 +- src/views/OStatus.vue | 58 ++--- src/views/Profile.vue | 30 +-- src/views/ProfileFollowers.vue | 70 +++--- src/views/ProfilePageIntegration.vue | 25 +-- src/views/ProfileTimeline.vue | 16 +- src/views/Timeline.vue | 144 ++++++------ src/views/TimelineSinglePost.vue | 60 ++--- 44 files changed, 893 insertions(+), 1222 deletions(-) delete mode 100644 .github/workflows/phpunit-oci.yml delete mode 100644 src/components/MessageContent.js create mode 100644 src/services/logger.js diff --git a/.eslintrc.js b/.eslintrc.js index 641466ef..89bcc517 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,72 +1,8 @@ module.exports = { - root: true, - env: { - browser: true, - es6: true, - node: true, - jest: true - }, - globals: { - t: true, - n: true, - OC: true, - OCA: true, - Vue: true, - VueRouter: true - }, - parserOptions: { - parser: 'babel-eslint', - ecmaVersion: 6 - }, extends: [ - 'eslint:recommended', - 'plugin:node/recommended', - 'plugin:vue/essential', - 'plugin:vue/recommended', - 'standard' + '@nextcloud' ], - plugins: ['vue', 'node'], - rules: { - // space before function () - 'space-before-function-paren': ['error', 'never'], - // curly braces always space - 'object-curly-spacing': ['error', 'always'], - // stay consistent with array brackets - 'array-bracket-newline': ['error', 'consistent'], - // 1tbs brace style - 'brace-style': 'error', - // tabs only - indent: ['error', 'tab'], - 'no-tabs': 0, - 'vue/html-indent': ['error', 'tab'], - // only debug console - 'no-console': ['error', { allow: ['error', 'warn', 'debug'] }], - // classes blocks - 'padded-blocks': ['error', { classes: 'always' }], - // always have the operator in front - 'operator-linebreak': ['error', 'before'], - // ternary on multiline - 'multiline-ternary': ['error', 'always-multiline'], - // es6 import/export and require - 'node/no-unpublished-require': ['off'], - 'node/no-unsupported-features/es-syntax': ['off'], - // space before self-closing elements - 'vue/html-closing-bracket-spacing': 'error', - // newline before closing bracket - 'vue/html-closing-bracket-newline': ["error", { - "singleline": "never", - "multiline": "never" - }], - // code spacing with attributes - 'vue/max-attributes-per-line': [ - 'error', - { - singleline: 3, - multiline: { - max: 3, - allowFirstLine: true - } - } - ] + globals: { + appName: true } -} +}; diff --git a/.github/workflows/phpunit-oci.yml b/.github/workflows/phpunit-oci.yml deleted file mode 100644 index 3e079e5f..00000000 --- a/.github/workflows/phpunit-oci.yml +++ /dev/null @@ -1,142 +0,0 @@ -# This workflow is provided via the organization template repository -# -# https://github.com/nextcloud/.github -# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization - -name: PHPUnit - -on: - pull_request: - paths: - - '.github/workflows/**' - - 'appinfo/**' - - 'lib/**' - - 'templates/**' - - 'tests/**' - - 'vendor/**' - - 'vendor-bin/**' - - '.php-cs-fixer.dist.php' - - 'composer.json' - - 'composer.lock' - - push: - branches: - - main - - master - - stable* - -permissions: - contents: read - -concurrency: - group: phpunit-oci-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - # Location of the phpunit.xml and phpunit.integration.xml files - PHPUNIT_CONFIG: ./tests/phpunit.xml - PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml - -jobs: - phpunit-oci: - runs-on: ubuntu-latest - - strategy: - matrix: - php-versions: ['8.0'] - server-versions: ['master'] - - services: - oracle: - image: deepdiver/docker-oracle-xe-11g # 'wnameless/oracle-xe-11g-r2' - ports: - - 1521:1521/tcp - - steps: - - name: Set app env - run: | - # Split and keep last - echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV - - - name: Checkout server - uses: actions/checkout@v3 - with: - submodules: true - repository: nextcloud/server - ref: ${{ matrix.server-versions }} - - - name: Checkout app - uses: actions/checkout@v3 - with: - path: apps/${{ env.APP_NAME }} - - - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, oci8 - tools: phpunit - coverage: none - - - name: Check composer file existence - id: check_composer - uses: andstor/file-existence-action@v2 - with: - files: apps/${{ env.APP_NAME }}/composer.json - - - name: Set up PHPUnit - # Only run if phpunit config file exists - if: steps.check_composer.outputs.files_exists == 'true' - working-directory: apps/${{ env.APP_NAME }} - run: composer i - - - name: Set up Nextcloud - env: - DB_PORT: 1521 - run: | - mkdir data - ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin - ./occ app:enable --force ${{ env.APP_NAME }} - - - name: Check PHPUnit config file existence - id: check_phpunit - uses: andstor/file-existence-action@v2 - with: - files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} - - - name: PHPUnit - # Only run if phpunit config file exists - if: steps.check_phpunit.outputs.files_exists == 'true' - working-directory: apps/${{ env.APP_NAME }} - run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - - name: Check PHPUnit integration config file existence - id: check_integration - uses: andstor/file-existence-action@v2 - with: - files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} - - - name: Run Nextcloud - # Only run if phpunit integration config file exists - if: steps.check_integration.outputs.files_exists == 'true' - run: php -S localhost:8080 & - - - name: PHPUnit integration - # Only run if phpunit integration config file exists - if: steps.check_integration.outputs.files_exists == 'true' - working-directory: apps/${{ env.APP_NAME }} - run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} - - summary: - permissions: - contents: none - runs-on: ubuntu-latest - needs: phpunit-oci - - if: always() - - name: phpunit-oci-summary - - steps: - - name: Summary status - run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi diff --git a/package-lock.json b/package-lock.json index f46096f5..841f3214 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,9 @@ "dependencies": { "@nextcloud/auth": "^2.0.0", "@nextcloud/axios": "^2.0.0", + "@nextcloud/dialogs": "^3.2.0", "@nextcloud/initial-state": "^2.0.0", + "@nextcloud/l10n": "^1.6.0", "@nextcloud/logger": "^2.2.1", "@nextcloud/moment": "^1.2.1", "@nextcloud/router": "^1.2.0", diff --git a/package.json b/package.json index 6ac40018..665cc5d4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,9 @@ "dependencies": { "@nextcloud/auth": "^2.0.0", "@nextcloud/axios": "^2.0.0", + "@nextcloud/dialogs": "^3.2.0", "@nextcloud/initial-state": "^2.0.0", + "@nextcloud/l10n": "^1.6.0", "@nextcloud/logger": "^2.2.1", "@nextcloud/moment": "^1.2.1", "@nextcloud/router": "^1.2.0", diff --git a/src/App.vue b/src/App.vue index b9c46e25..d1f70e76 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,8 +2,11 @@ - - + + diff --git a/src/components/TimelineEntry.vue b/src/components/TimelineEntry.vue index 465359b3..0d490133 100644 --- a/src/components/TimelineEntry.vue +++ b/src/components/TimelineEntry.vue @@ -24,12 +24,11 @@ {{ boosted }} - +