style: newline ternaries for readability
This commit is contained in:
parent
1a185bf563
commit
4d72a15bd8
1 changed files with 14 additions and 4 deletions
|
@ -24,11 +24,21 @@ export function deactivate(context: ExtensionContext) {
|
||||||
function setActivity(): void {
|
function setActivity(): void {
|
||||||
if (!rpc) return;
|
if (!rpc) return;
|
||||||
const activity = {
|
const activity = {
|
||||||
details: window.activeTextEditor ? `Editing ${basename(window.activeTextEditor.document.fileName)}` : 'Idle.',
|
details: window.activeTextEditor
|
||||||
state: window.activeTextEditor ? `Workspace: ${workspace.getWorkspaceFolder(window.activeTextEditor.document.uri).name}` : 'Idling.',
|
? `Editing ${basename(window.activeTextEditor.document.fileName)}`
|
||||||
|
: 'Idle.',
|
||||||
|
state: window.activeTextEditor
|
||||||
|
? `Workspace: ${workspace.getWorkspaceFolder(window.activeTextEditor.document.uri).name}`
|
||||||
|
: 'Idling.',
|
||||||
startTimestamp: new Date().getTime() / 1000,
|
startTimestamp: new Date().getTime() / 1000,
|
||||||
largeImageKey: window.activeTextEditor ? extname(basename(window.activeTextEditor.document.fileName)).substring(1) || basename(window.activeTextEditor.document.fileName).substring(1) || 'file' : 'vscode-big',
|
largeImageKey: window.activeTextEditor
|
||||||
largeImageText: window.activeTextEditor ? window.activeTextEditor.document.languageId : 'Idling.',
|
? extname(basename(window.activeTextEditor.document.fileName)).substring(1)
|
||||||
|
|| basename(window.activeTextEditor.document.fileName).substring(1)
|
||||||
|
|| 'file'
|
||||||
|
: 'vscode-big',
|
||||||
|
largeImageText: window.activeTextEditor
|
||||||
|
? window.activeTextEditor.document.languageId
|
||||||
|
: 'Idling',
|
||||||
smallImageKey: 'vscode',
|
smallImageKey: 'vscode',
|
||||||
smallImageText: 'Visual Studio Code',
|
smallImageText: 'Visual Studio Code',
|
||||||
instance: false
|
instance: false
|
||||||
|
|
Loading…
Reference in a new issue