Skip to content

Commit

Permalink
Merge branch 'main' into CRISTAL-360
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrieck committed Dec 12, 2024
2 parents fdfc90b + 8f27b1c commit ef1208d
Show file tree
Hide file tree
Showing 157 changed files with 2,470 additions and 1,059 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build_electron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Electron Build for all platforms

on:
push:

permissions: write-all

jobs:
electron-prepare:
runs-on: ubuntu-latest
# Cleanup the release note artifacts before building new ones. Otherwise, the action-gh-release step fails because
# an artifact already exists.
steps:
- uses: liudonghua123/delete-release-action@v1
with:
release_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
electron-linux:
runs-on: ubuntu-latest
needs: electron-prepare
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run build
- run: pnpm run --filter @xwiki/cristal-electron build:linux
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
files: |
electron/dist/cristal-*.tar.gz
electron/dist/cristal-*.deb
tag_name: ${{ github.ref }}
draft: true
electron-mac:
runs-on: macos-latest
needs: electron-prepare
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run build
- run: pnpm run --filter @xwiki/cristal-electron build:mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
files: electron/dist/cristal-*.dmg
tag_name: ${{ github.ref }}
draft: true
electron-win:
runs-on: windows-latest
needs: electron-prepare
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm run build
- run: pnpm run --filter @xwiki/cristal-electron build:win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: softprops/action-gh-release@v2
with:
files: electron/dist/cristal-*.exe
tag_name: ${{ github.ref }}
draft: true
6 changes: 4 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,20 @@
"build": "pnpm compile",
"clean": "rimraf dist",
"compile": "vue-tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0",
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
"prepack": "pnpm build",
"test": "vitest --run"
},
"dependencies": {
"inversify": "6.1.4",
"inversify": "6.2.0",
"vue": "3.5.13",
"vue-router": "4.5.0"
},
"devDependencies": {
"@xwiki/cristal-dev-config": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3",
"vue-tsc": "2.1.10"
},
"publishConfig": {
Expand Down
6 changes: 5 additions & 1 deletion core/alerts/alerts-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"vue": "3.5.13"
},
"devDependencies": {
"typescript": "5.6.3",
"vite": "6.0.3"
},
"publishConfig": {
"exports": {
".": {
Expand Down
10 changes: 6 additions & 4 deletions core/alerts/alerts-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,21 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-alerts-api": "workspace:*",
"inversify": "6.1.4",
"pinia": "2.2.6",
"inversify": "6.2.0",
"pinia": "2.3.0",
"vue": "3.5.13"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"reflect-metadata": "0.2.2"
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
},
"publishConfig": {
"exports": {
Expand Down
6 changes: 4 additions & 2 deletions core/alerts/alerts-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,22 @@
"main": "./src/index.ts",
"scripts": {
"build": "vue-tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-alerts-api": "workspace:*",
"@xwiki/cristal-api": "workspace:*",
"@xwiki/cristal-dsapi": "workspace:*",
"inversify": "6.1.4",
"inversify": "6.2.0",
"vue": "3.5.13"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3",
"vue-tsc": "2.1.10"
},
"publishConfig": {
Expand Down
6 changes: 5 additions & 1 deletion core/attachments/attachments-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-authentication-api": "workspace:*",
"@xwiki/cristal-model-api": "workspace:*",
"vue": "3.5.13"
},
"devDependencies": {
"typescript": "5.6.3",
"vite": "6.0.3"
},
"publishConfig": {
"exports": {
".": {
Expand Down
10 changes: 6 additions & 4 deletions core/attachments/attachments-default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "./src/index.ts",
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-attachments-api": "workspace:*",
Expand All @@ -28,15 +28,17 @@
"@xwiki/cristal-model-api": "workspace:*",
"@xwiki/cristal-model-reference-api": "workspace:*",
"@xwiki/cristal-model-remote-url-api": "workspace:*",
"inversify": "6.1.4",
"pinia": "2.2.6",
"inversify": "6.2.0",
"pinia": "2.3.0",
"vue": "3.5.13"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"reflect-metadata": "0.2.2"
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
},
"publishConfig": {
"exports": {
Expand Down
8 changes: 5 additions & 3 deletions core/attachments/attachments-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"main": "./src/index.ts",
"scripts": {
"build": "vue-tsc --project tsconfig.json && vite build",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-alerts-api": "workspace:*",
Expand All @@ -33,16 +33,18 @@
"@xwiki/cristal-model-click-listener": "workspace:*",
"@xwiki/cristal-uiextension-api": "workspace:*",
"@xwiki/cristal-user-ui": "workspace:*",
"inversify": "6.1.4",
"inversify": "6.2.0",
"vue": "3.5.13",
"vue-i18n": "10.0.4",
"vue-i18n": "10.0.5",
"vue-router": "4.5.0"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3",
"vue-tsc": "2.1.10"
},
"publishConfig": {
Expand Down
18 changes: 2 additions & 16 deletions core/attachments/attachments-ui/src/vue/AttachmentPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const { t } = useI18n({

const cristal: CristalApp = inject<CristalApp>("cristal")!;

const isFileSytem = cristal.getWikiConfig().getType() == "FileSystem";

const attachmentPreview = cristal
.getContainer()
.get<AttachmentPreview>("AttachmentPreview")!;
Expand Down Expand Up @@ -86,11 +84,7 @@ const error = attachmentPreview.error();
<!-- TODO: abstract to allow preview based on the type -->
<div class="attachment_view">
<div class="attachment_view_inner">
<file-preview v-if="!isFileSytem" :attachment="attachment" />
<span v-else>
The filesystem backend does not support attachment preview
currently.
</span>
<file-preview :attachment="attachment" />
</div>
</div>
<div class="metadata">
Expand Down Expand Up @@ -148,15 +142,7 @@ const error = attachmentPreview.error();
<div class="actions">
<!-- TODO: top-right close button. -->
<div class="main_action">
<x-btn
:disabled="isFileSytem"
:title="
isFileSytem
? 'file system backend does not support download currently'
: ''
"
@click="download()"
>
<x-btn @click="download()">
{{ t("attachment.preview.download.button") }}
</x-btn>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { Ref, ref } from "vue";
import { TextFieldModel } from "@xwiki/cristal-dsapi";
import { Ref, ref } from "vue";
defineProps<{ isUploading: boolean }>();
const fileInputValue: Ref<TextFieldModel> = ref();
Expand Down
4 changes: 2 additions & 2 deletions core/attachments/attachments-ui/src/vue/AttachmentsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ async function upload(files: File[]) {
</template>
<style scoped>
.attachments {
display:flex;
display: flex;
flex-flow: column;
gap:16px;
gap: 16px;
}
</style>
16 changes: 14 additions & 2 deletions core/attachments/attachments-ui/src/vue/AttachmentsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,25 @@ const hasAuthor = computed(() => {
<span class="mobile-column-name">
{{ t("attachments.tab.table.header.size") }}
</span>
<span class="mobile-column-name">{{ t("attachments.tab.table.header.size") }}</span><span class="mobile-column-name">{{ t("attachments.tab.table.header.size") }}</span><file-size :size="attachment.size"></file-size>
<span class="mobile-column-name">
{{ t("attachments.tab.table.header.size") }}
</span>
<span class="mobile-column-name">
{{ t("attachments.tab.table.header.size") }}
</span>
<file-size :size="attachment.size"></file-size>
</td>
<td>
<span class="mobile-column-name">
{{ t("attachments.tab.table.header.date") }}
</span>
<span class="mobile-column-name">{{ t("attachments.tab.table.header.date") }}</span><span class="mobile-column-name">{{ t("attachments.tab.table.header.date") }}</span><date :date="attachment.date"></date>
<span class="mobile-column-name">
{{ t("attachments.tab.table.header.date") }}
</span>
<span class="mobile-column-name">
{{ t("attachments.tab.table.header.date") }}
</span>
<date :date="attachment.date"></date>
</td>
<td v-if="hasAuthor">
<span class="mobile-column-name">
Expand Down
8 changes: 5 additions & 3 deletions core/authentication/authentication-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"clean": "rimraf dist",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-api": "workspace:*",
"inversify": "6.1.4"
"inversify": "6.2.0"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"reflect-metadata": "0.2.2"
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
},
"publishConfig": {
"exports": {
Expand Down
6 changes: 4 additions & 2 deletions core/authentication/authentication-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@
"@xwiki/cristal-browser-api": "workspace:*",
"@xwiki/cristal-icons": "workspace:*",
"@xwiki/cristal-uiextension-api": "workspace:*",
"inversify": "6.1.4",
"inversify": "6.2.0",
"vue": "3.5.13",
"vue-i18n": "10.0.4"
"vue-i18n": "10.0.5"
},
"devDependencies": {
"@vue/test-utils": "2.4.6",
"@xwiki/cristal-dev-config": "workspace:*",
"@xwiki/cristal-dev-test-utils": "workspace:*",
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3",
"vitest": "2.1.8",
"vue-tsc": "2.1.10"
},
Expand Down
10 changes: 6 additions & 4 deletions core/authentication/authentication-xwiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@
"scripts": {
"build": "tsc --project tsconfig.json && vite build",
"clean": "rimraf dist",
"lint": "eslint \"./src/**/*.{ts,tsx}\" --max-warnings=0"
"lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
},
"dependencies": {
"@xwiki/cristal-api": "workspace:*",
"@xwiki/cristal-authentication-api": "workspace:*",
"axios": "1.7.8",
"inversify": "6.1.4",
"axios": "1.7.9",
"inversify": "6.2.0",
"js-cookie": "3.0.5"
},
"peerDependencies": {
"reflect-metadata": "0.2.2"
},
"devDependencies": {
"@types/js-cookie": "3.0.6",
"reflect-metadata": "0.2.2"
"reflect-metadata": "0.2.2",
"typescript": "5.6.3",
"vite": "6.0.3"
},
"publishConfig": {
"exports": {
Expand Down
Loading

0 comments on commit ef1208d

Please sign in to comment.