mirror of
https://github.com/nextcloud/spreed.git
synced 2025-07-22 12:01:02 +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>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</NcAppSettingsSection>
|
</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>
|
</NcAppSettingsDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -240,7 +247,7 @@ import NcCheckboxRadioSwitch from '@nextcloud/vue/components/NcCheckboxRadioSwit
|
|||||||
import IconMicrophone from 'vue-material-design-icons/Microphone.vue'
|
import IconMicrophone from 'vue-material-design-icons/Microphone.vue'
|
||||||
import { CONVERSATION, PRIVACY } from '../../constants.ts'
|
import { CONVERSATION, PRIVACY } from '../../constants.ts'
|
||||||
import BrowserStorage from '../../services/BrowserStorage.js'
|
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 { useCustomSettings } from '../../services/SettingsAPI.ts'
|
||||||
import { setUserConfig } from '../../services/settingsService.ts'
|
import { setUserConfig } from '../../services/settingsService.ts'
|
||||||
import { useActorStore } from '../../stores/actor.ts'
|
import { useActorStore } from '../../stores/actor.ts'
|
||||||
@ -250,6 +257,7 @@ import { isMac } from '../../utils/browserCheck.ts'
|
|||||||
import { satisfyVersion } from '../../utils/satisfyVersion.ts'
|
import { satisfyVersion } from '../../utils/satisfyVersion.ts'
|
||||||
|
|
||||||
const serverVersion = loadState('core', 'config', {}).version ?? '29.0.0.0'
|
const serverVersion = loadState('core', 'config', {}).version ?? '29.0.0.0'
|
||||||
|
const talkVersion = getTalkVersion()
|
||||||
const serverSupportsBackgroundBlurred = satisfyVersion(serverVersion, '29.0.4.0')
|
const serverSupportsBackgroundBlurred = satisfyVersion(serverVersion, '29.0.4.0')
|
||||||
|
|
||||||
const isBackgroundBlurredState = serverSupportsBackgroundBlurred
|
const isBackgroundBlurredState = serverSupportsBackgroundBlurred
|
||||||
@ -279,6 +287,8 @@ export default {
|
|||||||
const CmdOrCtrl = isMac ? 'Cmd' : 'Ctrl'
|
const CmdOrCtrl = isMac ? 'Cmd' : 'Ctrl'
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
IS_DESKTOP,
|
||||||
|
talkVersion,
|
||||||
CmdOrCtrl,
|
CmdOrCtrl,
|
||||||
settingsStore,
|
settingsStore,
|
||||||
soundsStore,
|
soundsStore,
|
||||||
@ -530,6 +540,12 @@ export default {
|
|||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__version {
|
||||||
|
margin-block-end: calc(2 * var(--default-grid-baseline));
|
||||||
|
text-align: center;
|
||||||
|
color: var(--color-text-maxcontrast);
|
||||||
|
}
|
||||||
|
|
||||||
&__wrapper {
|
&__wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
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)
|
* Check whether the feature is presented (in case of federation - on both servers)
|
||||||
* @param token conversation token
|
* @param token conversation token
|
||||||
|
Reference in New Issue
Block a user