mirror of
https://github.com/nextcloud/spreed.git
synced 2025-07-22 06:48:21 +00:00
Merge pull request #15533 from nextcloud/fix/15359/app-version
feat: show server/app version in settings
This commit is contained in:
@ -222,6 +222,13 @@
|
||||
</div>
|
||||
</dl>
|
||||
</NcAppSettingsSection>
|
||||
|
||||
<!-- Information about current version used. Talk Desktop has this in 'About' window -->
|
||||
<p
|
||||
v-if="!IS_DESKTOP"
|
||||
class="app-settings-section__version">
|
||||
{{ t('spreed', 'Talk version: {version}', { version: talkVersion }) }}
|
||||
</p>
|
||||
</NcAppSettingsDialog>
|
||||
</template>
|
||||
|
||||
@ -240,7 +247,7 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwit
|
||||
import IconMicrophone from 'vue-material-design-icons/Microphone.vue'
|
||||
import { CONVERSATION, PRIVACY } from '../../constants.ts'
|
||||
import BrowserStorage from '../../services/BrowserStorage.js'
|
||||
import { getTalkConfig } from '../../services/CapabilitiesManager.ts'
|
||||
import { getTalkConfig, getTalkVersion } from '../../services/CapabilitiesManager.ts'
|
||||
import { useCustomSettings } from '../../services/SettingsAPI.ts'
|
||||
import { setUserConfig } from '../../services/settingsService.ts'
|
||||
import { useActorStore } from '../../stores/actor.ts'
|
||||
@ -250,6 +257,7 @@ import { isMac } from '../../utils/browserCheck.ts'
|
||||
import { satisfyVersion } from '../../utils/satisfyVersion.ts'
|
||||
|
||||
const serverVersion = loadState('core', 'config', {}).version ?? '29.0.0.0'
|
||||
const talkVersion = getTalkVersion()
|
||||
const serverSupportsBackgroundBlurred = satisfyVersion(serverVersion, '29.0.4.0')
|
||||
|
||||
const isBackgroundBlurredState = serverSupportsBackgroundBlurred
|
||||
@ -279,6 +287,8 @@ export default {
|
||||
const CmdOrCtrl = isMac ? 'Cmd' : 'Ctrl'
|
||||
|
||||
return {
|
||||
IS_DESKTOP,
|
||||
talkVersion,
|
||||
CmdOrCtrl,
|
||||
settingsStore,
|
||||
soundsStore,
|
||||
@ -530,6 +540,12 @@ export default {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
&__version {
|
||||
margin-block-end: calc(2 * var(--default-grid-baseline));
|
||||
text-align: center;
|
||||
color: var(--color-text-maxcontrast);
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -50,6 +50,13 @@ function patchTokenMap(conversation: Conversation) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current Talk version in string format
|
||||
*/
|
||||
export function getTalkVersion(): string {
|
||||
return localCapabilities?.spreed?.version ?? ''
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the feature is presented (in case of federation - on both servers)
|
||||
* @param token conversation token
|
||||
|
Reference in New Issue
Block a user