Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/authentication/renderer/AuthenticationApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import NcButton from '@nextcloud/vue/components/NcButton'
import NcLoadingIcon from '@nextcloud/vue/components/NcLoadingIcon'
import NcTextField from '@nextcloud/vue/components/NcTextField'
import IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'
import AppWindow from '../../shared/components/AppWindow.vue'
import { appData } from '../../app/AppData.js'
import { refetchAppData } from '../../app/appData.service.js'
import { MIN_REQUIRED_NEXTCLOUD_VERSION, MIN_REQUIRED_TALK_VERSION } from '../../constants.js'
Expand Down Expand Up @@ -157,7 +158,7 @@ async function login() {
</script>

<template>
<div class="wrapper">
<AppWindow :title="t('talk_desktop', 'Authentication')" class="wrapper">
<div class="spacer">
<div class="logo" />
</div>
Expand Down Expand Up @@ -209,12 +210,11 @@ async function login() {
{{ BUILD_CONFIG.applicationName }} {{ version }}
</footer>
</div>
</div>
</AppWindow>
</template>

<style scoped>
.wrapper {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
Expand Down
5 changes: 1 addition & 4 deletions src/authentication/renderer/authentication.main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { t } from '@nextcloud/l10n'
import { createApp } from 'vue'
import { setupWebPage } from '../../shared/setupWebPage.js'

import '../../shared/assets/global.styles.css'

await setupWebPage({
title: () => t('talk_desktop', 'Authentication'),
})
await setupWebPage()

const { default: AuthenticationApp } = await import('./AuthenticationApp.vue')

Expand Down
12 changes: 3 additions & 9 deletions src/callbox/renderer/CallboxApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import NcButton from '@nextcloud/vue/components/NcButton'
import IconClose from 'vue-material-design-icons/Close.vue'
import IconPhoneHangupOutline from 'vue-material-design-icons/PhoneHangupOutline.vue'
import IconPhoneOutline from 'vue-material-design-icons/PhoneOutline.vue'
import AppWindow from '../../shared/components/AppWindow.vue'
import { postBroadcast } from '../../shared/broadcast.service.ts'
import { waitCurrentUserHasJoinedCall } from './callbox.service.ts'
import { playRingtone } from './callbox.utils.ts'
Expand Down Expand Up @@ -62,7 +63,7 @@ function dismiss() {
</script>

<template>
<div class="callbox">
<AppWindow class="callbox">
<div class="callbox__info">
<NcAvatar
class="callbox__avatar"
Expand Down Expand Up @@ -110,15 +111,9 @@ function dismiss() {
{{ t('talk_desktop', 'Join call') }}
</NcButton>
</div>
</div>
</AppWindow>
</template>

<style>
* {
box-sizing: border-box;
}
</style>

<style scoped>
.callbox {
--height: calc(var(--default-clickable-area) * 2 + var(--default-grid-baseline) * 2 * 3);
Expand All @@ -127,7 +122,6 @@ function dismiss() {
flex-direction: column;
gap: var(--gap);
padding: var(--gap);
height: 100vh;
user-select: none;
backdrop-filter: blur(12px);
background: rgba(0, 0, 0, .2);
Expand Down
12 changes: 3 additions & 9 deletions src/certificate/renderer/CertificateApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import NcButton from '@nextcloud/vue/components/NcButton'
import NcNoteCard from '@nextcloud/vue/components/NcNoteCard'
import IconAlert from 'vue-material-design-icons/Alert.vue'
import IconShieldOffOutline from 'vue-material-design-icons/ShieldOffOutline.vue'
import AppWindow from '../../shared/components/AppWindow.vue'
import CertificateInfo from './components/CertificateInfo.vue'

useHotKey('Escape', () => window.close())
Expand All @@ -29,7 +30,7 @@ const isAdvanced = ref(false)
</script>

<template>
<div class="certificate">
<AppWindow :title="t('talk_desktop', 'Security warning')" class="certificate">
<h2 class="certificate__heading">
{{ t('talk_desktop', 'Warning: potential security risk') }}
</h2>
Expand Down Expand Up @@ -85,22 +86,15 @@ const isAdvanced = ref(false)
{{ t('talk_desktop', 'Cancel') }}
</NcButton>
</div>
</div>
</AppWindow>
</template>

<style>
* {
box-sizing: border-box;
}
</style>

<style scoped>
.certificate {
display: flex;
flex-direction: column;
align-items: stretch;
gap: calc(4 * var(--default-grid-baseline));
height: 100vh;
padding: calc(4 * var(--default-grid-baseline));
background: var(--color-main-background);
}
Expand Down
5 changes: 1 addition & 4 deletions src/certificate/renderer/certificate.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { t } from '@nextcloud/l10n'
import { createApp } from 'vue'
import { setupWebPage } from '../../shared/setupWebPage.js'

import '../../shared/assets/global.styles.css'

await setupWebPage({
title: () => t('talk_desktop', 'Security warning'),
})
await setupWebPage()

const { default: CertificateApp } = await import('./CertificateApp.vue')

Expand Down
12 changes: 3 additions & 9 deletions src/help/renderer/HelpApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ref } from 'vue'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcRichText from '@nextcloud/vue/components/NcRichText'
import IconWindowClose from 'vue-material-design-icons/WindowClose.vue'
import AppWindow from '../../shared/components/AppWindow.vue'
import ButtonCopy from './ButtonCopy.vue'
import TalkLogo from '../../../img/talk-icon-rounded.svg'
import { BUILD_CONFIG } from '../../shared/build.config.ts'
Expand Down Expand Up @@ -40,7 +41,7 @@ function close() {
</script>

<template>
<div class="help">
<AppWindow :title="t('talk_desktop', 'About')" class="help">
<div class="help__title-bar" :class="{ 'help__title-bar--mac': isMac }">
<NcButton
:aria-label="t('talk_desktop', 'Close')"
Expand Down Expand Up @@ -90,15 +91,9 @@ function close() {
</div>
</div>
</div>
</div>
</AppWindow>
</template>

<style>
* {
box-sizing: border-box;
}
</style>

<style scoped>
.no-drag {
app-region: no-drag;
Expand All @@ -107,7 +102,6 @@ function close() {
.help {
--spacing-4: calc(4 * var(--default-grid-baseline));
app-region: drag;
height: 100vh;
padding: var(--spacing-4) var(--spacing-4) var(--spacing-4) 0;
display: flex;
flex-direction: column;
Expand Down
5 changes: 1 addition & 4 deletions src/help/renderer/help.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { t } from '@nextcloud/l10n'
import { createApp } from 'vue'
import { setupWebPage } from '../../shared/setupWebPage.js'

import '../../shared/assets/global.styles.css'
import './help.styles.css'

await setupWebPage({
title: () => t('talk_desktop', 'About'),
})
await setupWebPage()

const { default: HelpApp } = await import('./HelpApp.vue')

Expand Down
4 changes: 0 additions & 4 deletions src/help/renderer/help.styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

* {
box-sizing: border-box;
}

body {
background: var(--color-background-dark) !important;
}
34 changes: 34 additions & 0 deletions src/shared/components/AppWindow.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->

<script setup lang="ts">
import { watchEffect } from 'vue'

const props = defineProps<{
title?: string
}>()

watchEffect(async () => {
document.title = await window.TALK_DESKTOP.buildTitle(props.title)
})
</script>

<template>
<div class="window">
<slot />
</div>
</template>

<style>
* {
box-sizing: border-box;
}
</style>

<style scoped>
.window {
height: 100vh;
}
</style>
7 changes: 1 addition & 6 deletions src/shared/setupWebPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,11 @@ function applyDownloadLinkHandler() {

/**
* Make all required initial setup for the web page for authorized user: server-rendered data, globals and ect.
*
* @param {() => string} [title] - Getter for a custom title
*/
export async function setupWebPage({
title,
} = {}) {
export async function setupWebPage() {
appData.fromJSON(await window.TALK_DESKTOP.getAppData())
await initAppConfig()
await applyL10n()
document.title = await window.TALK_DESKTOP.buildTitle(title?.())
applyInitialState()
initGlobals()
applyUserData()
Expand Down
9 changes: 6 additions & 3 deletions src/talk/renderer/TalkDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

<script setup lang="ts">
import { provide, ref } from 'vue'
import AppWindow from '../../shared/components/AppWindow.vue'
import TalkWrapper from './TalkWrapper/TalkWrapper.vue'
import TitleBar from './TitleBar/TitleBar.vue'
import { useNotificationsStore } from './notifications/notifications.store.js'
Expand All @@ -19,7 +20,9 @@ window.OCA.Viewer = createViewer()
</script>

<template>
<div id="skip-actions" />
<TitleBar id="header" />
<TalkWrapper @ready="isTalkInitialized = true" />
<AppWindow>
<div id="skip-actions" />
<TitleBar id="header" />
<TalkWrapper @ready="isTalkInitialized = true" />
</AppWindow>
</template>
14 changes: 4 additions & 10 deletions src/upgrade/renderer/UpgradeApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import { generateUrl } from '@nextcloud/router'
import NcButton from '@nextcloud/vue/components/NcButton'
import IconCloudDownloadOutline from 'vue-material-design-icons/CloudDownloadOutline.vue'
import IconWeb from 'vue-material-design-icons/Web.vue'
import AppWindow from '../../shared/components/AppWindow.vue'

const packageInfo = window.TALK_DESKTOP.packageInfo

const browserLink = generateUrl('/apps/spreed')
</script>

<template>
<div class="upgrade">
<AppWindow :title="t('talk_desktop', 'Upgrade required')" class="upgrade">
<div class="upgrade__content">
<h2 class="upgrade__heading">
{{ t('talk_desktop', 'Upgrade required') }}
Expand Down Expand Up @@ -47,16 +48,9 @@ const browserLink = generateUrl('/apps/spreed')
{{ t('talk_desktop', 'Continue in web browser') }} ↗
</NcButton>
</div>
</div>
</AppWindow>
</template>

<style>
* {
box-sizing: border-box;
user-select: none;
}
</style>

<style scoped>
.upgrade {
--upgrade-spacing: calc(2 * var(--default-grid-baseline));
Expand All @@ -65,9 +59,9 @@ const browserLink = generateUrl('/apps/spreed')
align-items: stretch;
text-align: center;
gap: var(--upgrade-spacing);
height: 100vh;
background: var(--color-main-background);
padding: var(--upgrade-spacing);
user-select: none;
}

.upgrade__content {
Expand Down
5 changes: 1 addition & 4 deletions src/upgrade/renderer/upgrade.main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

import { t } from '@nextcloud/l10n'
import { createApp } from 'vue'
import { setupWebPage } from '../../shared/setupWebPage.js'

import '../../shared/assets/global.styles.css'

await setupWebPage({
title: () => t('talk_desktop', 'Upgrade required'),
})
await setupWebPage()

const { default: UpgradeApp } = await import('./UpgradeApp.vue')

Expand Down