Commit 8f48f7c5 authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[toast] Make container sharing toasts use MANAGE_TOAST_BUTTON_LABEL

Bug: 1002391
Change-Id: I8a85271e20c3d46bff851645bd0bc596feabb433
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215150
Commit-Queue: Noel Gordon <noel@chromium.org>
Commit-Queue: Alex Danilo <adanilo@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarAlex Danilo <adanilo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#771681}
parent c2b886c1
......@@ -1215,15 +1215,15 @@ class FileManager extends cr.EventTarget {
toast(
crostiniShareCount, 'FOLDER_SHARED_WITH_CROSTINI',
'FOLDER_SHARED_WITH_CROSTINI_PLURAL',
'MANAGE_LINUX_SHARING_BUTTON_LABEL', 'crostini/sharedPaths',
'FOLDER_SHARED_WITH_CROSTINI_PLURAL', 'MANAGE_TOAST_BUTTON_LABEL',
'crostini/sharedPaths',
CommandHandler.MenuCommandsForUMA.MANAGE_LINUX_SHARING_TOAST_STARTUP);
// TODO(crbug.com/949356): UX to provide guidance for what to do
// when we have shared paths with both Linux and Plugin VM.
toast(
pluginVmShareCount, 'FOLDER_SHARED_WITH_PLUGIN_VM',
'FOLDER_SHARED_WITH_PLUGIN_VM_PLURAL',
'MANAGE_PLUGIN_VM_SHARING_BUTTON_LABEL', 'pluginVm/sharedPaths',
'FOLDER_SHARED_WITH_PLUGIN_VM_PLURAL', 'MANAGE_TOAST_BUTTON_LABEL',
'pluginVm/sharedPaths',
CommandHandler.MenuCommandsForUMA
.MANAGE_PLUGIN_VM_SHARING_TOAST_STARTUP);
}
......
......@@ -1930,7 +1930,7 @@ CommandHandler.COMMANDS_['share-with-linux'] = new class extends Command {
fileManager.crostini.registerSharedPath(
constants.DEFAULT_CROSTINI_VM, dir);
fileManager.ui.toast.show(str('FOLDER_SHARED_WITH_CROSTINI'), {
text: str('MANAGE_LINUX_SHARING_BUTTON_LABEL'),
text: str('MANAGE_TOAST_BUTTON_LABEL'),
callback: () => {
chrome.fileManagerPrivate.openSettingsSubpage('crostini/sharedPaths');
CommandHandler.recordMenuItemSelected(
......@@ -2006,7 +2006,7 @@ CommandHandler.COMMANDS_['share-with-plugin-vm'] = new class extends Command {
// immediately, since the container may take 10s or more to start.
fileManager.crostini.registerSharedPath(constants.PLUGIN_VM, dir);
fileManager.ui.toast.show(str('FOLDER_SHARED_WITH_PLUGIN_VM'), {
text: str('MANAGE_PLUGIN_VM_SHARING_BUTTON_LABEL'),
text: str('MANAGE_TOAST_BUTTON_LABEL'),
callback: () => {
chrome.fileManagerPrivate.openSettingsSubpage('pluginVm/sharedPaths');
CommandHandler.recordMenuItemSelected(
......
......@@ -7,14 +7,14 @@ const shareBase = {
vmNameTermina: 'termina',
vmNameSelectorLinux: 'linux',
toastSharedTextLinux: '1 folder shared with Linux',
toastActionTextLinux: 'Manage Linux sharing',
toastActionTextLinux: 'Manage',
enumUmaShareWithLinux: 12,
enumUmaManageLinuxSharing: 13,
// Params for 'Share with Plugin VM'.
vmNamePluginVm: 'PvmDefault',
vmNameSelectorPluginVm: 'plugin-vm',
toastSharedTextPluginVm: '1 folder shared with Plugin VM',
toastActionTextPluginVm: 'Manage Plugin VM sharing',
toastActionTextPluginVm: 'Manage',
enumUmaShareWithPluginVm: 16,
enumUmaManagePluginVmSharing: 17,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment