Compare commits

..

No commits in common. "889591e67d390f61156f88fd79d497a5f8074e06" and "bb688858729305da167b93686a5a02683256a2dd" have entirely different histories.

9 changed files with 113 additions and 162 deletions

View File

@ -2,7 +2,7 @@ name: Build addon
on:
release:
types: [published]
types: [ published ]
push:
workflow_dispatch:
@ -10,126 +10,98 @@ env:
TARGET: nextcloud_backup
IMAGE: "hassio-nextcloud-backup"
REPOSITORY: ghcr.io/sebclem
IMAGE_SOURCE: https://github.com/Sebclem/hassio-nextcloud-backup
IMAGE_SOURCE : https://github.com/Sebclem/hassio-nextcloud-backup
jobs:
build-font:
name: Build Front
build-dockers:
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:
- name: Checkout repo
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
- 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:
node-version: 20
cache: "pnpm"
cache-dependency-path: nextcloud_backup/frontend/pnpm-lock.yaml
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
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
- name: Build and push ${{matrix.arch}}
uses: docker/build-push-action@v3
with:
name: front_dist
path: nextcloud_backup/frontend/dist/
# build-dockers:
# 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:
# - 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 }}
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 }}

View File

@ -13,8 +13,6 @@ actionRouter.post("/backup", (req, res) => {
.catch((reason) => {
logger.error("Something wrong !");
});
res.statusCode = 200;
res.send();
});
export default actionRouter;

View File

@ -1 +0,0 @@
VITE_API_URL="./"

View File

@ -30,6 +30,7 @@ declare module 'vue' {
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
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']
WebdavConfigMenu: typeof import('./src/components/settings/WebdavConfigMenu.vue')['default']
}

View File

@ -17,13 +17,12 @@
"roboto-fontface": "*",
"uuid": "^9.0.1",
"vue": "^3.3.0",
"vuetify": "3.5.16"
"vuetify": "^3.0.0"
},
"devDependencies": {
"@babel/types": "^7.23.0",
"@types/luxon": "^3.4.2",
"@types/node": "^20.10.0",
"@types/uuid": "^9.0.8",
"@vitejs/plugin-vue": "^4.5.0",
"@vue/eslint-config-typescript": "^12.0.0",
"cross-env": "^7.0.3",

View File

@ -30,8 +30,8 @@ dependencies:
specifier: ^3.3.0
version: 3.4.19(typescript@5.3.3)
vuetify:
specifier: 3.5.16
version: 3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
specifier: ^3.0.0
version: 3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
devDependencies:
'@babel/types':
@ -43,9 +43,6 @@ devDependencies:
'@types/node':
specifier: ^20.10.0
version: 20.11.19
'@types/uuid':
specifier: ^9.0.8
version: 9.0.8
'@vitejs/plugin-vue':
specifier: ^4.5.0
version: 4.6.2(vite@5.1.3)(vue@3.4.19)
@ -105,7 +102,7 @@ devDependencies:
version: 0.10.0(vite@5.1.3)(vue-router@4.2.5)(vue@3.4.19)
vite-plugin-vuetify:
specifier: ^2.0.0
version: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.16)
version: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.4)
vue-router:
specifier: ^4.2.0
version: 4.2.5(vue@3.4.19)
@ -545,10 +542,6 @@ packages:
resolution: {integrity: sha512-/wdoPq1QqkSj9/QOeKkFquEuPzQbHTWAMPH/PaUMB+JuR31lXhlWXRZ52IpfDYVlDOUBvX09uBrPwxGT1hjNBg==}
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):
resolution: {integrity: sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==}
engines: {node: ^16.0.0 || >=18.0.0}
@ -844,7 +837,7 @@ packages:
/@vue/shared@3.4.19:
resolution: {integrity: sha512-/KliRRHMF6LoiThEy+4c1Z4KB/gbPrGjWwJR+crg2otgrf/egKzRaCPvJ51S5oetgsgXLfc4Rm5ZgrKHZrtMSw==}
/@vuetify/loader-shared@2.0.1(vue@3.4.19)(vuetify@3.5.16):
/@vuetify/loader-shared@2.0.1(vue@3.4.19)(vuetify@3.5.4):
resolution: {integrity: sha512-zy5/ohEO7RcJaWYu2Xiy8TBEOkTb42XvWvSAJwXAtY8OlwqyGhzzBp9OvMVjLGIuFXumBpXKlsaVIkeN0OWWSw==}
peerDependencies:
vue: ^3.0.0
@ -852,7 +845,7 @@ packages:
dependencies:
upath: 2.0.1
vue: 3.4.19(typescript@5.3.3)
vuetify: 3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
vuetify: 3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
/acorn-jsx@5.3.2(acorn@8.11.3):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
@ -2907,7 +2900,7 @@ packages:
- supports-color
dev: true
/vite-plugin-vuetify@2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.16):
/vite-plugin-vuetify@2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.4):
resolution: {integrity: sha512-GlRVAruohE8b0FqmeYYh1cYg3n8THGOv066uMA44qLv9uhUxSLw55CS7fi2yU0wH363TJ2vq36zUsPTjRFrjGQ==}
engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
@ -2915,12 +2908,12 @@ packages:
vue: ^3.0.0
vuetify: ^3.0.0
dependencies:
'@vuetify/loader-shared': 2.0.1(vue@3.4.19)(vuetify@3.5.16)
'@vuetify/loader-shared': 2.0.1(vue@3.4.19)(vuetify@3.5.4)
debug: 4.3.4
upath: 2.0.1
vite: 5.1.3(@types/node@20.11.19)(sass@1.71.0)
vue: 3.4.19(typescript@5.3.3)
vuetify: 3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
vuetify: 3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19)
transitivePeerDependencies:
- supports-color
@ -3036,15 +3029,15 @@ packages:
'@vue/shared': 3.4.19
typescript: 5.3.3
/vuetify@3.5.16(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19):
resolution: {integrity: sha512-jyApfATreFMkgjvK0bL7ntZnr+p9TU73+4E3kX6fIvUitdAP9fltG7yj+v3k14HLqZRSNhTL1GhQ95DFx631zw==}
/vuetify@3.5.4(typescript@5.3.3)(vite-plugin-vuetify@2.0.1)(vue@3.4.19):
resolution: {integrity: sha512-fHgfWMI7+z/UtbVPOezX+O1MNBOOMBW9HnKejcBIyQQ7jFRnTHbDQmbINf25FK0wrg/zkjfzyOmWWREKW39eXg==}
engines: {node: ^12.20 || >=14.13}
peerDependencies:
typescript: '>=4.7'
vite-plugin-vuetify: '>=1.0.0'
vite-plugin-vuetify: '>=1.0.0-alpha.12'
vue: ^3.3.0
vue-i18n: ^9.0.0
webpack-plugin-vuetify: '>=2.0.0'
webpack-plugin-vuetify: '>=2.0.0-alpha.11'
peerDependenciesMeta:
typescript:
optional: true
@ -3056,7 +3049,7 @@ packages:
optional: true
dependencies:
typescript: 5.3.3
vite-plugin-vuetify: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.16)
vite-plugin-vuetify: 2.0.1(vite@5.1.3)(vue@3.4.19)(vuetify@3.5.4)
vue: 3.4.19(typescript@5.3.3)
/webpack-sources@3.2.3:

View File

@ -11,12 +11,8 @@
<v-divider></v-divider>
<v-responsive max-height="350px" class="overflow-y-auto">
<v-list class="py-0">
<v-data-iterator
:items="messages"
item-value="id"
items-per-page="-1"
>
<template v-slot:default="{ items, isExpanded, toggleExpand }">
<v-data-iterator :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">
<v-divider v-if="index != 0"></v-divider>
<v-list-item :class="{ 'bg-brown-darken-4': !item.raw.viewed }">
@ -36,15 +32,11 @@
variant="text"
icon
color="secondary"
@click="toggleExpand(item as any)"
@click="toggleExpand(item)"
size="small"
>
<v-icon>
{{
isExpanded(item as any)
? "mdi-chevron-up"
: "mdi-information"
}}
{{ isExpanded(item) ? "mdi-chevron-up" : "mdi-information" }}
</v-icon>
</v-btn>
<v-scroll-x-transition>
@ -66,13 +58,9 @@
</template>
</v-list-item>
<v-expand-transition v-if="item.raw.detail">
<div v-if="isExpanded(item as any)">
<div v-if="isExpanded(item)">
<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>
{{ item.raw.detail }}
</v-card-text>
@ -82,6 +70,7 @@
</template>
</template>
</v-data-iterator>
</v-list>
</v-responsive>
</v-sheet>
@ -171,13 +160,13 @@ function markReaded(id: string) {
});
}
function markAllReaded() {
function markAllReaded(){
messageService.markAllRead().then((value) => {
messages.value = value;
});
})
}
onBeforeUnmount(() => {
clearInterval(interval);
});
</script>
</script>

View File

@ -14,7 +14,7 @@ export const useAlertStore = defineStore("alert", () => {
const alert: Alert = {
id: uuidv4(),
timeOut: ref(timeOutValue.value),
interval: window.setInterval(() => {
interval: setInterval(() => {
timeout(alert);
}, 50),
type: type,