feat: remove timestamp
This commit is contained in:
parent
4ddbe087ed
commit
e6d3e4db78
5 changed files with 11 additions and 4 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"name": "discord-vscode",
|
||||
"version": "5.3.0",
|
||||
"version": "5.4.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "5.3.0",
|
||||
"version": "5.4.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bufferutil": "^4.0.3",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "discord-vscode",
|
||||
"displayName": "Discord Presence",
|
||||
"version": "5.3.0",
|
||||
"version": "5.4.0",
|
||||
"description": "Update your discord status with a rich presence.",
|
||||
"private": true,
|
||||
"author": {
|
||||
|
@ -139,6 +139,11 @@
|
|||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Removes the lower details"
|
||||
},
|
||||
"discord.removeTimestamp": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Removes the timestamp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ export async function activity(previous: ActivityPayload = {}) {
|
|||
details: removeDetails
|
||||
? undefined
|
||||
: await details(CONFIG_KEYS.DetailsIdling, CONFIG_KEYS.DetailsEditing, CONFIG_KEYS.DetailsDebugging),
|
||||
startTimestamp: previous.startTimestamp ?? Date.now(),
|
||||
startTimestamp: config[CONFIG_KEYS.RemoveTimestamp] ? undefined : previous.startTimestamp ?? Date.now(),
|
||||
largeImageKey: IDLE_IMAGE_KEY,
|
||||
largeImageText: defaultLargeImageText,
|
||||
smallImageKey: defaultSmallImageKey,
|
||||
|
|
|
@ -55,4 +55,5 @@ export const enum CONFIG_KEYS {
|
|||
SwapBigAndSmallImage = 'swapBigAndSmallImage',
|
||||
RemoveDetails = 'removeDetails',
|
||||
RemoveLowerDetails = 'removeLowerDetails',
|
||||
RemoveTimestamp = 'removeTimestamp',
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ type WorkspaceExtensionConfiguration = WorkspaceConfiguration & {
|
|||
swapBigAndSmallImage: boolean;
|
||||
removeDetails: boolean;
|
||||
removeLowerDetails: boolean;
|
||||
removeTimestamp: boolean;
|
||||
};
|
||||
|
||||
export function getConfig() {
|
||||
|
|
Loading…
Reference in a new issue