mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-29 12:24:52 +01:00
Compare commits
5 Commits
bb68885872
...
889591e67d
Author | SHA1 | Date | |
---|---|---|---|
889591e67d | |||
fab29785bf | |||
3b37f9ee47 | |||
4bf9e8127f | |||
393590ee74 |
202
.github/workflows/build_addon.yml
vendored
202
.github/workflows/build_addon.yml
vendored
@ -2,7 +2,7 @@ name: Build addon
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [ published ]
|
types: [published]
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@ -10,98 +10,126 @@ env:
|
|||||||
TARGET: nextcloud_backup
|
TARGET: nextcloud_backup
|
||||||
IMAGE: "hassio-nextcloud-backup"
|
IMAGE: "hassio-nextcloud-backup"
|
||||||
REPOSITORY: ghcr.io/sebclem
|
REPOSITORY: ghcr.io/sebclem
|
||||||
IMAGE_SOURCE : https://github.com/Sebclem/hassio-nextcloud-backup
|
IMAGE_SOURCE: https://github.com/Sebclem/hassio-nextcloud-backup
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-dockers:
|
build-font:
|
||||||
|
name: Build Front
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
arch: [ aarch64, amd64, armv7, i386, armhf ]
|
|
||||||
include:
|
|
||||||
- arch: aarch64
|
|
||||||
arch_value: linux/arm64/v8
|
|
||||||
- arch: amd64
|
|
||||||
arch_value: linux/amd64
|
|
||||||
- arch: armv7
|
|
||||||
arch_value: linux/arm/v7
|
|
||||||
- arch: i386
|
|
||||||
arch_value: linux/386
|
|
||||||
- arch: armhf
|
|
||||||
arch_value: linux/arm/v6
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- name: Enable corepack
|
||||||
|
run: corepack enable
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Setup Node
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: actions/setup-node@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx ${{matrix.arch}}
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Set Version Prod ${{matrix.arch}}
|
|
||||||
if: github.event_name != 'workflow_dispatch' && github.event_name != 'push'
|
|
||||||
run: |
|
|
||||||
version=${GITHUB_REF/refs\/tags\//}
|
|
||||||
if [ -n "$version" ];then
|
|
||||||
tmp=$(mktemp)
|
|
||||||
jq --arg version "$version" '.version=$version' ${{env.TARGET}}/config.json > "$tmp" && mv "$tmp" ${{env.TARGET}}/config.json
|
|
||||||
fi
|
|
||||||
echo "version_type=prod" >> $GITHUB_ENV
|
|
||||||
- name: Set Version Test ${{matrix.arch}}
|
|
||||||
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
|
|
||||||
run: |
|
|
||||||
version=dev_${GITHUB_RUN_ID}
|
|
||||||
if [ -n "$version" ];then
|
|
||||||
tmp=$(mktemp)
|
|
||||||
jq --arg version "$version" '.version=$version' ${{env.TARGET}}/config.json > "$tmp" && mv "$tmp" ${{env.TARGET}}/config.json
|
|
||||||
fi
|
|
||||||
echo "version_type=dev" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
|
|
||||||
- name: Get build option ${{matrix.arch}}
|
|
||||||
run: |
|
|
||||||
echo "NAME=$(jq --raw-output '.name // empty' "${{env.TARGET}}/config.json" | sed "s/'//g")" >> $GITHUB_ENV
|
|
||||||
echo "DESCRIPTION=$(jq --raw-output '.description // empty' "${{env.TARGET}}/config.json" | sed "s/'//g")" >> $GITHUB_ENV
|
|
||||||
echo "URL=$(jq --raw-output '.url // empty' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
|
||||||
echo "VERSION=$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
|
||||||
echo "BUILD_FROM=ghcr.io/hassio-addons/base/${{matrix.arch}}:$(cat nextcloud_backup/.base_version)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Set Tags ${{matrix.arch}}
|
|
||||||
run: |
|
|
||||||
if [ "${{env.version_type}}" != "dev" ]; then
|
|
||||||
echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest, ${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:dev, ${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Debug Env
|
|
||||||
run: |
|
|
||||||
echo ${{env.VERSION}}
|
|
||||||
echo ${{env.TAGS}}
|
|
||||||
|
|
||||||
- name: Login to ghcr.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
node-version: 20
|
||||||
username: ${{ github.actor }}
|
cache: "pnpm"
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
cache-dependency-path: nextcloud_backup/frontend/pnpm-lock.yaml
|
||||||
|
|
||||||
- name: Build and push ${{matrix.arch}}
|
- name: Install dependencies
|
||||||
uses: docker/build-push-action@v3
|
run: pnpm i
|
||||||
|
working-directory: nextcloud_backup/frontend
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: pnpm build
|
||||||
|
working-directory: nextcloud_backup/frontend
|
||||||
|
|
||||||
|
- name: Upload production-ready build files
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
name: front_dist
|
||||||
tags: ${{env.TAGS}}
|
path: nextcloud_backup/frontend/dist/
|
||||||
labels: io.hass.name=${{env.NAME}}, io.hass.description=${{env.DESCRIPTION}}, io.hass.url=${{env.URL}}, io.hass.arch=${{matrix.arch}}, io.hass.version=${{env.VERSION}}, io.hass.type=addon
|
|
||||||
build-args: |
|
# build-dockers:
|
||||||
BUILD_FROM=${{env.BUILD_FROM}}
|
# runs-on: ubuntu-latest
|
||||||
BUILD_VERSION=${{env.VERSION}}
|
# strategy:
|
||||||
IMAGE_SOURCE=${{env.IMAGE_SOURCE}}
|
# fail-fast: false
|
||||||
file: ./${{env.TARGET}}/Dockerfile
|
# matrix:
|
||||||
cache-from: type=registry,ref=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest
|
# arch: [ aarch64, amd64, armv7, i386, armhf ]
|
||||||
cache-to: type=inline
|
# include:
|
||||||
context: ./${{env.TARGET}}/
|
# - arch: aarch64
|
||||||
platforms: ${{ matrix.arch_value }}
|
# arch_value: linux/arm64/v8
|
||||||
|
# - arch: amd64
|
||||||
|
# arch_value: linux/amd64
|
||||||
|
# - arch: armv7
|
||||||
|
# arch_value: linux/arm/v7
|
||||||
|
# - arch: i386
|
||||||
|
# arch_value: linux/386
|
||||||
|
# - arch: armhf
|
||||||
|
# arch_value: linux/arm/v6
|
||||||
|
# steps:
|
||||||
|
|
||||||
|
# - uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# - name: Set up QEMU
|
||||||
|
# uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
# - name: Set up Docker Buildx ${{matrix.arch}}
|
||||||
|
# uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
# - name: Set Version Prod ${{matrix.arch}}
|
||||||
|
# if: github.event_name != 'workflow_dispatch' && github.event_name != 'push'
|
||||||
|
# run: |
|
||||||
|
# version=${GITHUB_REF/refs\/tags\//}
|
||||||
|
# if [ -n "$version" ];then
|
||||||
|
# tmp=$(mktemp)
|
||||||
|
# jq --arg version "$version" '.version=$version' ${{env.TARGET}}/config.json > "$tmp" && mv "$tmp" ${{env.TARGET}}/config.json
|
||||||
|
# fi
|
||||||
|
# echo "version_type=prod" >> $GITHUB_ENV
|
||||||
|
# - name: Set Version Test ${{matrix.arch}}
|
||||||
|
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
|
||||||
|
# run: |
|
||||||
|
# version=dev_${GITHUB_RUN_ID}
|
||||||
|
# if [ -n "$version" ];then
|
||||||
|
# tmp=$(mktemp)
|
||||||
|
# jq --arg version "$version" '.version=$version' ${{env.TARGET}}/config.json > "$tmp" && mv "$tmp" ${{env.TARGET}}/config.json
|
||||||
|
# fi
|
||||||
|
# echo "version_type=dev" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# - name: Get build option ${{matrix.arch}}
|
||||||
|
# run: |
|
||||||
|
# echo "NAME=$(jq --raw-output '.name // empty' "${{env.TARGET}}/config.json" | sed "s/'//g")" >> $GITHUB_ENV
|
||||||
|
# echo "DESCRIPTION=$(jq --raw-output '.description // empty' "${{env.TARGET}}/config.json" | sed "s/'//g")" >> $GITHUB_ENV
|
||||||
|
# echo "URL=$(jq --raw-output '.url // empty' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||||
|
# echo "VERSION=$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||||
|
# echo "BUILD_FROM=ghcr.io/hassio-addons/base/${{matrix.arch}}:$(cat nextcloud_backup/.base_version)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
# - name: Set Tags ${{matrix.arch}}
|
||||||
|
# run: |
|
||||||
|
# if [ "${{env.version_type}}" != "dev" ]; then
|
||||||
|
# echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest, ${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||||
|
# else
|
||||||
|
# echo "TAGS=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:dev, ${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:$(jq --raw-output '.version' "${{env.TARGET}}/config.json")" >> $GITHUB_ENV
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# - name: Debug Env
|
||||||
|
# run: |
|
||||||
|
# echo ${{env.VERSION}}
|
||||||
|
# echo ${{env.TAGS}}
|
||||||
|
|
||||||
|
# - name: Login to ghcr.io
|
||||||
|
# uses: docker/login-action@v2
|
||||||
|
# with:
|
||||||
|
# registry: ghcr.io
|
||||||
|
# username: ${{ github.actor }}
|
||||||
|
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# - name: Build and push ${{matrix.arch}}
|
||||||
|
# uses: docker/build-push-action@v3
|
||||||
|
# with:
|
||||||
|
# push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
# tags: ${{env.TAGS}}
|
||||||
|
# labels: io.hass.name=${{env.NAME}}, io.hass.description=${{env.DESCRIPTION}}, io.hass.url=${{env.URL}}, io.hass.arch=${{matrix.arch}}, io.hass.version=${{env.VERSION}}, io.hass.type=addon
|
||||||
|
# build-args: |
|
||||||
|
# BUILD_FROM=${{env.BUILD_FROM}}
|
||||||
|
# BUILD_VERSION=${{env.VERSION}}
|
||||||
|
# IMAGE_SOURCE=${{env.IMAGE_SOURCE}}
|
||||||
|
# file: ./${{env.TARGET}}/Dockerfile
|
||||||
|
# cache-from: type=registry,ref=${{env.REPOSITORY}}/${{env.IMAGE}}/${{matrix.arch}}:latest
|
||||||
|
# cache-to: type=inline
|
||||||
|
# context: ./${{env.TARGET}}/
|
||||||
|
# platforms: ${{ matrix.arch_value }}
|
||||||
|
@ -13,6 +13,8 @@ actionRouter.post("/backup", (req, res) => {
|
|||||||
.catch((reason) => {
|
.catch((reason) => {
|
||||||
logger.error("Something wrong !");
|
logger.error("Something wrong !");
|
||||||
});
|
});
|
||||||
|
res.statusCode = 200;
|
||||||
|
res.send();
|
||||||
});
|
});
|
||||||
|
|
||||||
export default actionRouter;
|
export default actionRouter;
|
||||||
|
1
nextcloud_backup/frontend/.env.production
Normal file
1
nextcloud_backup/frontend/.env.production
Normal file
@ -0,0 +1 @@
|
|||||||
|
VITE_API_URL="./"
|
1
nextcloud_backup/frontend/components.d.ts
vendored
1
nextcloud_backup/frontend/components.d.ts
vendored
@ -30,7 +30,6 @@ declare module 'vue' {
|
|||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
StatusBar: typeof import('./src/components/statusBar/StatusBar.vue')['default']
|
StatusBar: typeof import('./src/components/statusBar/StatusBar.vue')['default']
|
||||||
StatusComponent: typeof import('./src/components/statusBar/StatusComponent.vue')['default']
|
|
||||||
WebdavConfigForm: typeof import('./src/components/settings/WebdavConfigForm.vue')['default']
|
WebdavConfigForm: typeof import('./src/components/settings/WebdavConfigForm.vue')['default']
|
||||||
WebdavConfigMenu: typeof import('./src/components/settings/WebdavConfigMenu.vue')['default']
|
WebdavConfigMenu: typeof import('./src/components/settings/WebdavConfigMenu.vue')['default']
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,13 @@
|
|||||||
"roboto-fontface": "*",
|
"roboto-fontface": "*",
|
||||||
"uuid": "^9.0.1",
|
"uuid": "^9.0.1",
|
||||||
"vue": "^3.3.0",
|
"vue": "^3.3.0",
|
||||||
"vuetify": "^3.0.0"
|
"vuetify": "3.5.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/types": "^7.23.0",
|
"@babel/types": "^7.23.0",
|
||||||
"@types/luxon": "^3.4.2",
|
"@types/luxon": "^3.4.2",
|
||||||
"@types/node": "^20.10.0",
|
"@types/node": "^20.10.0",
|
||||||
|
"@types/uuid": "^9.0.8",
|
||||||
"@vitejs/plugin-vue": "^4.5.0",
|
"@vitejs/plugin-vue": "^4.5.0",
|
||||||
"@vue/eslint-config-typescript": "^12.0.0",
|
"@vue/eslint-config-typescript": "^12.0.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
33
nextcloud_backup/frontend/pnpm-lock.yaml
generated
33
nextcloud_backup/frontend/pnpm-lock.yaml
generated
@ -30,8 +30,8 @@ dependencies:
|
|||||||
specifier: ^3.3.0
|
specifier: ^3.3.0
|
||||||
version: 3.4.19(typescript@5.3.3)
|
version: 3.4.19(typescript@5.3.3)
|
||||||
vuetify:
|
vuetify:
|
||||||
specifier: ^3.0.0
|
specifier: 3.5.16
|
||||||
version: 3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
|
version: 3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
|
||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@babel/types':
|
'@babel/types':
|
||||||
@ -43,6 +43,9 @@ devDependencies:
|
|||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^20.10.0
|
specifier: ^20.10.0
|
||||||
version: 20.11.19
|
version: 20.11.19
|
||||||
|
'@types/uuid':
|
||||||
|
specifier: ^9.0.8
|
||||||
|
version: 9.0.8
|
||||||
'@vitejs/plugin-vue':
|
'@vitejs/plugin-vue':
|
||||||
specifier: ^4.5.0
|
specifier: ^4.5.0
|
||||||
version: 4.6.2(vite@5.1.3)(vue@3.4.19)
|
version: 4.6.2(vite@5.1.3)(vue@3.4.19)
|
||||||
@ -102,7 +105,7 @@ devDependencies:
|
|||||||
version: 0.10.0(vite@5.1.3)(vue-router@4.2.5)(vue@3.4.19)
|
version: 0.10.0(vite@5.1.3)(vue-router@4.2.5)(vue@3.4.19)
|
||||||
vite-plugin-vuetify:
|
vite-plugin-vuetify:
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.4)
|
version: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.16)
|
||||||
vue-router:
|
vue-router:
|
||||||
specifier: ^4.2.0
|
specifier: ^4.2.0
|
||||||
version: 4.2.5(vue@3.4.19)
|
version: 4.2.5(vue@3.4.19)
|
||||||
@ -542,6 +545,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==}
|
resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/uuid@9.0.8:
|
||||||
|
resolution: {integrity: sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==}
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3):
|
/@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0)(eslint@8.56.0)(typescript@5.3.3):
|
||||||
resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==}
|
resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==}
|
||||||
engines: {node: ^16.0.0 || >=18.0.0}
|
engines: {node: ^16.0.0 || >=18.0.0}
|
||||||
@ -837,7 +844,7 @@ packages:
|
|||||||
/@vue/shared@3.4.19:
|
/@vue/shared@3.4.19:
|
||||||
resolution: {integrity: sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==}
|
resolution: {integrity: sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==}
|
||||||
|
|
||||||
/@vuetify/loader-shared@2.0.1(vue@3.4.19)(vuetify@3.5.4):
|
/@vuetify/loader-shared@2.0.1(vue@3.4.19)(vuetify@3.5.16):
|
||||||
resolution: {integrity: sha512-zy5/ohEO7RcJaWYu2Xiy8TBEOkTb42XvWvSAJwXAtY8OlwqyGhzzBp9OvMVjLGIuFXumBpXKlsaVIkeN0OWWSw==}
|
resolution: {integrity: sha512-zy5/ohEO7RcJaWYu2Xiy8TBEOkTb42XvWvSAJwXAtY8OlwqyGhzzBp9OvMVjLGIuFXumBpXKlsaVIkeN0OWWSw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.0.0
|
vue: ^3.0.0
|
||||||
@ -845,7 +852,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
upath: 2.0.1
|
upath: 2.0.1
|
||||||
vue: 3.4.19(typescript@5.3.3)
|
vue: 3.4.19(typescript@5.3.3)
|
||||||
vuetify: 3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
|
vuetify: 3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
|
||||||
|
|
||||||
/acorn-jsx@5.3.2(acorn@8.11.3):
|
/acorn-jsx@5.3.2(acorn@8.11.3):
|
||||||
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
|
||||||
@ -2900,7 +2907,7 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/vite-plugin-vuetify@2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.4):
|
/vite-plugin-vuetify@2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.16):
|
||||||
resolution: {integrity: sha512-GlRVAruohE8b0FqmeYYh1cYg3n8THGOv066uMA44qLv9uhUxSLw55CS7fi2yU0wH363TJ2vq36zUsPTjRFrjGQ==}
|
resolution: {integrity: sha512-GlRVAruohE8b0FqmeYYh1cYg3n8THGOv066uMA44qLv9uhUxSLw55CS7fi2yU0wH363TJ2vq36zUsPTjRFrjGQ==}
|
||||||
engines: {node: ^18.0.0 || >=20.0.0}
|
engines: {node: ^18.0.0 || >=20.0.0}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -2908,12 +2915,12 @@ packages:
|
|||||||
vue: ^3.0.0
|
vue: ^3.0.0
|
||||||
vuetify: ^3.0.0
|
vuetify: ^3.0.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@vuetify/loader-shared': 2.0.1(vue@3.4.19)(vuetify@3.5.4)
|
'@vuetify/loader-shared': 2.0.1(vue@3.4.19)(vuetify@3.5.16)
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
upath: 2.0.1
|
upath: 2.0.1
|
||||||
vite: 5.1.3(@types/node@20.11.19)(sass@1.71.0)
|
vite: 5.1.3(@types/node@20.11.19)(sass@1.71.0)
|
||||||
vue: 3.4.19(typescript@5.3.3)
|
vue: 3.4.19(typescript@5.3.3)
|
||||||
vuetify: 3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
|
vuetify: 3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
|
|
||||||
@ -3029,15 +3036,15 @@ packages:
|
|||||||
'@vue/shared': 3.4.19
|
'@vue/shared': 3.4.19
|
||||||
typescript: 5.3.3
|
typescript: 5.3.3
|
||||||
|
|
||||||
/vuetify@3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19):
|
/vuetify@3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19):
|
||||||
resolution: {integrity: sha512-fHgfWMI7+z/UtbVPOezX+O1MNBOOMBW9HnKejcBIyQQ7jFRnTHbDQmbINf25FK0wrg/zkjfzyOmWWREKW39eXg==}
|
resolution: {integrity: sha512-jyApfATreFMkgjvK0bL7ntZnr+p9TU73+4E3kX6fIvUitdAP9fltG7yj+v3k14HLqZRSNhTL1GhQ95DFx631zw==}
|
||||||
engines: {node: ^12.20 || >=14.13}
|
engines: {node: ^12.20 || >=14.13}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
typescript: '>=4.7'
|
typescript: '>=4.7'
|
||||||
vite-plugin-vuetify: '>=1.0.0-alpha.12'
|
vite-plugin-vuetify: '>=1.0.0'
|
||||||
vue: ^3.3.0
|
vue: ^3.3.0
|
||||||
vue-i18n: ^9.0.0
|
vue-i18n: ^9.0.0
|
||||||
webpack-plugin-vuetify: '>=2.0.0-alpha.11'
|
webpack-plugin-vuetify: '>=2.0.0'
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
@ -3049,7 +3056,7 @@ packages:
|
|||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
typescript: 5.3.3
|
typescript: 5.3.3
|
||||||
vite-plugin-vuetify: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.4)
|
vite-plugin-vuetify: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.16)
|
||||||
vue: 3.4.19(typescript@5.3.3)
|
vue: 3.4.19(typescript@5.3.3)
|
||||||
|
|
||||||
/webpack-sources@3.2.3:
|
/webpack-sources@3.2.3:
|
||||||
|
@ -11,8 +11,12 @@
|
|||||||
<v-divider></v-divider>
|
<v-divider></v-divider>
|
||||||
<v-responsive max-height="350px" class="overflow-y-auto">
|
<v-responsive max-height="350px" class="overflow-y-auto">
|
||||||
<v-list class="py-0">
|
<v-list class="py-0">
|
||||||
<v-data-iterator :items="messages" item-value="id" items-per-page="-1">
|
<v-data-iterator
|
||||||
<template v-slot:default="{ items, isExpanded, toggleExpand}">
|
:items="messages"
|
||||||
|
item-value="id"
|
||||||
|
items-per-page="-1"
|
||||||
|
>
|
||||||
|
<template v-slot:default="{ items, isExpanded, toggleExpand }">
|
||||||
<template v-for="(item, index) in items" :key="item.raw.id">
|
<template v-for="(item, index) in items" :key="item.raw.id">
|
||||||
<v-divider v-if="index != 0"></v-divider>
|
<v-divider v-if="index != 0"></v-divider>
|
||||||
<v-list-item :class="{ 'bg-brown-darken-4': !item.raw.viewed }">
|
<v-list-item :class="{ 'bg-brown-darken-4': !item.raw.viewed }">
|
||||||
@ -32,11 +36,15 @@
|
|||||||
variant="text"
|
variant="text"
|
||||||
icon
|
icon
|
||||||
color="secondary"
|
color="secondary"
|
||||||
@click="toggleExpand(item)"
|
@click="toggleExpand(item as any)"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
<v-icon>
|
<v-icon>
|
||||||
{{ isExpanded(item) ? "mdi-chevron-up" : "mdi-information" }}
|
{{
|
||||||
|
isExpanded(item as any)
|
||||||
|
? "mdi-chevron-up"
|
||||||
|
: "mdi-information"
|
||||||
|
}}
|
||||||
</v-icon>
|
</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-scroll-x-transition>
|
<v-scroll-x-transition>
|
||||||
@ -58,9 +66,13 @@
|
|||||||
</template>
|
</template>
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
<v-expand-transition v-if="item.raw.detail">
|
<v-expand-transition v-if="item.raw.detail">
|
||||||
<div v-if="isExpanded(item)">
|
<div v-if="isExpanded(item as any)">
|
||||||
<v-divider class="mx-3"></v-divider>
|
<v-divider class="mx-3"></v-divider>
|
||||||
<v-card class="mx-3 my-2" variant="outlined" color="secondary">
|
<v-card
|
||||||
|
class="mx-3 my-2"
|
||||||
|
variant="outlined"
|
||||||
|
color="secondary"
|
||||||
|
>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
{{ item.raw.detail }}
|
{{ item.raw.detail }}
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
@ -70,7 +82,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</v-data-iterator>
|
</v-data-iterator>
|
||||||
|
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-responsive>
|
</v-responsive>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
@ -160,13 +171,13 @@ function markReaded(id: string) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function markAllReaded(){
|
function markAllReaded() {
|
||||||
messageService.markAllRead().then((value) => {
|
messageService.markAllRead().then((value) => {
|
||||||
messages.value = value;
|
messages.value = value;
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,7 +14,7 @@ export const useAlertStore = defineStore("alert", () => {
|
|||||||
const alert: Alert = {
|
const alert: Alert = {
|
||||||
id: uuidv4(),
|
id: uuidv4(),
|
||||||
timeOut: ref(timeOutValue.value),
|
timeOut: ref(timeOutValue.value),
|
||||||
interval: setInterval(() => {
|
interval: window.setInterval(() => {
|
||||||
timeout(alert);
|
timeout(alert);
|
||||||
}, 50),
|
}, 50),
|
||||||
type: type,
|
type: type,
|
||||||
|
Loading…
Reference in New Issue
Block a user