Add warning message to the resetAll command

[?]
Dec 30, 2020, 1:21 AM
UBNZ7UMTO3STTE3U7XOQNBJMFILGLJ6AO26IFMOR6D7QQXDCVDKQC

Dependencies

  • [2] MU6ZNUYZ Integrate recordAll command with input box
  • [3] YDCLFNEJ Add menu command for recording changes to specific files
  • [4] L44OILGK Add reset command to resource state context menu
  • [5] VWRDBPJZ Add command and menu option for adding one or more files to the repository
  • [6] H3GAPFUC Add pijul.recordAll command
  • [7] JYMSJCPQ Add command to add all untracked files and fix repository refreshing
  • [*] ILH3GIVT Add command centre and refresh/init commands

Change contents

  • replacement in src/commands.ts at line 185
    [2.1838][2.1838:1871](),[2.1871][3.975:1013](),[3.975][3.975:1013]()
    await repository.resetAll();
    await repository.refreshStatus();
    [2.1838]
    [3.1341]
    const message = `Are you sure you want to reset ${this.repository.changedGroup.resourceStates.length} file(s) to their last recorded state? Any changes will be lost forever.`;
    const yes = 'Continue';
    const pick = await window.showWarningMessage(message, { modal: true }, yes);
    if (pick === yes) {
    await repository.resetAll();
    await repository.refreshStatus();
    }