@rancher/shell 3.0.0-rc.2 → 3.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles/base/_variables.scss +12 -4
- package/assets/styles/global/_layout.scss +10 -1
- package/assets/styles/global/_tooltip.scss +13 -1
- package/assets/translations/en-us.yaml +62 -26
- package/assets/translations/zh-hans.yaml +6 -5
- package/chart/istio.vue +2 -0
- package/chart/monitoring/ClusterSelector.vue +2 -0
- package/chart/monitoring/StorageClassSelector.vue +4 -1
- package/chart/monitoring/index.vue +2 -0
- package/chart/rancher-backup/S3.vue +2 -0
- package/chart/rancher-backup/index.vue +2 -0
- package/cloud-credential/aws.vue +2 -0
- package/cloud-credential/azure.vue +2 -0
- package/cloud-credential/digitalocean.vue +2 -0
- package/cloud-credential/gcp.vue +2 -0
- package/cloud-credential/generic.vue +2 -0
- package/cloud-credential/harvester.vue +2 -0
- package/cloud-credential/linode.vue +2 -0
- package/cloud-credential/pnap.vue +2 -0
- package/cloud-credential/s3.vue +2 -0
- package/cloud-credential/vmwarevsphere.vue +2 -0
- package/components/ActionDropdown.vue +1 -1
- package/components/ActionMenu.vue +4 -1
- package/components/AppModal.vue +4 -1
- package/components/ButtonDropdown.vue +3 -0
- package/components/ButtonGroup.vue +2 -0
- package/components/ButtonMultiAction.vue +41 -0
- package/components/Carousel.vue +3 -0
- package/components/CodeMirror.vue +88 -71
- package/components/Collapse.vue +4 -1
- package/components/CollapsibleCard.vue +4 -1
- package/components/ContainerResourceLimit.vue +2 -0
- package/components/CopyCode.vue +8 -4
- package/components/CopyToClipboardText.vue +2 -0
- package/components/CruResource.vue +61 -61
- package/components/CruResourceFooter.vue +2 -0
- package/components/Dialog.vue +2 -0
- package/components/DisableAuthProviderModal.vue +4 -1
- package/components/EmberPage.vue +2 -0
- package/components/ExplorerProjectsNamespaces.vue +11 -8
- package/components/GlobalRoleBindings.vue +2 -0
- package/components/Import.vue +2 -1
- package/components/InputOrDisplay.vue +23 -18
- package/components/Loading.vue +4 -1
- package/components/LocaleSelector.vue +4 -2
- package/components/Markdown.vue +2 -0
- package/components/ModalWithCard.vue +2 -0
- package/components/MoveModal.vue +2 -0
- package/components/PodSecurityAdmission.vue +2 -0
- package/components/Questions/Array.vue +2 -0
- package/components/Questions/Boolean.vue +2 -0
- package/components/Questions/CloudCredential.vue +2 -0
- package/components/Questions/Enum.vue +2 -0
- package/components/Questions/Float.vue +2 -0
- package/components/Questions/Int.vue +2 -0
- package/components/Questions/QuestionMap.vue +4 -1
- package/components/Questions/Radio.vue +2 -0
- package/components/Questions/Reference.vue +2 -0
- package/components/Questions/String.vue +2 -0
- package/components/Questions/Yaml.vue +2 -0
- package/components/Questions/index.vue +2 -0
- package/components/ResourceCancelModal.vue +2 -0
- package/components/ResourceDetail/Masthead.vue +4 -3
- package/components/ResourceDetail/index.vue +17 -15
- package/components/ResourceTable.vue +2 -0
- package/components/ResourceYaml.vue +2 -0
- package/components/SelectIconGrid.vue +2 -0
- package/components/SimpleBox.vue +2 -0
- package/components/SortableTable/THead.vue +2 -0
- package/components/SortableTable/index.vue +17 -20
- package/components/StatusTable.vue +2 -0
- package/components/Tabbed/Tab.vue +2 -0
- package/components/Tabbed/index.vue +2 -0
- package/components/Wizard.vue +4 -0
- package/components/YamlEditor.vue +3 -1
- package/components/__tests__/ButtonMultiAction.test.ts +31 -0
- package/components/__tests__/ContainerResourceLimit.test.ts +35 -0
- package/components/auth/RoleDetailEdit.vue +2 -0
- package/components/auth/SelectPrincipal.vue +3 -1
- package/components/auth/login/ldap.vue +2 -0
- package/components/fleet/FleetStatus.vue +2 -2
- package/components/form/ArrayList.vue +16 -1
- package/components/form/ArrayListSelect.vue +2 -0
- package/components/form/ChangePassword.vue +2 -0
- package/components/form/ColorInput.vue +2 -0
- package/components/form/Command.vue +2 -0
- package/components/form/FileImageSelector.vue +2 -0
- package/components/form/FileSelector.vue +2 -0
- package/components/form/Footer.vue +2 -0
- package/components/form/GitPicker.vue +1 -0
- package/components/form/HealthCheck.vue +5 -3
- package/components/form/HookOption.vue +22 -18
- package/components/form/InputWithSelect.vue +3 -1
- package/components/form/KeyValue.vue +2 -0
- package/components/form/LabeledSelect.vue +13 -3
- package/components/form/Labels.vue +11 -13
- package/components/form/LifecycleHooks.vue +2 -0
- package/components/form/MatchExpressions.vue +2 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -0
- package/components/form/Members/MembershipEditor.vue +2 -0
- package/components/form/NameNsDescription.vue +4 -1
- package/components/form/Networking.vue +2 -0
- package/components/form/NodeAffinity.vue +4 -1
- package/components/form/Password.vue +2 -0
- package/components/form/PlusMinus.vue +2 -0
- package/components/form/PodAffinity.vue +4 -1
- package/components/form/Ports.vue +2 -0
- package/components/form/Probe.vue +8 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +2 -0
- package/components/form/ResourceQuota/Project.vue +2 -0
- package/components/form/ResourceQuota/ProjectRow.vue +2 -0
- package/components/form/RuleSelector.vue +2 -0
- package/components/form/SecretSelector.vue +1 -0
- package/components/form/Security.vue +5 -2
- package/components/form/Select.vue +2 -1
- package/components/form/SelectOrCreateAuthSecret.vue +2 -0
- package/components/form/ServiceNameSelect.vue +2 -0
- package/components/form/ServicePorts.vue +2 -0
- package/components/form/ShellInput.vue +2 -0
- package/components/form/SimpleSecretSelector.vue +2 -0
- package/components/form/Taints.vue +2 -0
- package/components/form/Tolerations.vue +2 -0
- package/components/form/UnitInput.vue +2 -0
- package/components/form/ValueFromResource.vue +2 -0
- package/components/form/WorkloadPorts.vue +5 -3
- package/components/form/__tests__/HookOption.test.ts +28 -0
- package/components/form/__tests__/LabeledSelect.test.ts +42 -0
- package/components/form/__tests__/Probe.test.ts +12 -0
- package/components/form/__tests__/UnitInput.test.ts +68 -0
- package/components/formatter/AppSummaryGraph.vue +2 -2
- package/components/formatter/FleetSummaryGraph.vue +2 -2
- package/components/formatter/InternalExternalIP.vue +13 -15
- package/components/formatter/MachineSummaryGraph.vue +2 -2
- package/components/formatter/Scale.vue +2 -2
- package/components/nav/Header.vue +17 -141
- package/components/nav/HeaderPageActionMenu.vue +173 -0
- package/components/nav/Jump.vue +2 -0
- package/components/nav/NamespaceFilter.vue +7 -2
- package/components/nav/TopLevelMenu.vue +4 -4
- package/components/nav/Type.vue +28 -2
- package/components/nav/WindowManager/ContainerLogs.vue +2 -1
- package/components/nav/WindowManager/ContainerShell.vue +6 -12
- package/components/nav/WindowManager/index.vue +2 -0
- package/components/nav/__tests__/Type.test.ts +68 -24
- package/composables/useClickOutside.ts +81 -0
- package/composables/useUserRetentionValidation.test.ts +1 -1
- package/composables/useUserRetentionValidation.ts +1 -1
- package/config/product/cis.js +4 -3
- package/config/product/manager.js +1 -0
- package/config/router/routes.js +1 -1
- package/config/table-headers.js +0 -10
- package/config/uiplugins.js +186 -143
- package/config/version.js +10 -0
- package/core/{plugin-helpers.js → plugin-helpers.ts} +25 -7
- package/core/plugin-routes.ts +5 -6
- package/core/plugin.ts +30 -3
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +2 -0
- package/detail/configmap.vue +2 -0
- package/detail/fleet.cattle.io.cluster.vue +2 -0
- package/detail/fleet.cattle.io.clustergroup.vue +2 -0
- package/detail/fleet.cattle.io.gitrepo.vue +2 -0
- package/detail/harvesterhci.io.management.cluster.vue +2 -0
- package/detail/helm.cattle.io.projecthelmchart.vue +6 -8
- package/detail/management.cattle.io.roletemplate.vue +4 -4
- package/detail/management.cattle.io.user.vue +2 -0
- package/detail/namespace.vue +2 -0
- package/detail/networking.k8s.io.ingress.vue +1 -0
- package/detail/node.vue +2 -0
- package/detail/provisioning.cattle.io.cluster.vue +2 -0
- package/detail/secret.vue +2 -0
- package/detail/service.vue +2 -0
- package/detail/workload/index.vue +1 -1
- package/dialog/AddClusterMemberDialog.vue +2 -0
- package/dialog/AddCustomBadgeDialog.vue +3 -1
- package/dialog/AddProjectMemberDialog.vue +2 -0
- package/dialog/AddonConfigConfirmationDialog.vue +2 -0
- package/dialog/DeactivateDriverDialog.vue +2 -0
- package/dialog/DiagnosticTimingsDialog.vue +2 -0
- package/dialog/DrainNode.vue +2 -0
- package/dialog/ForceMachineRemoveDialog.vue +2 -0
- package/dialog/GenericPrompt.vue +2 -0
- package/dialog/RollbackWorkloadDialog.vue +2 -0
- package/dialog/RotateCertificatesDialog.vue +2 -0
- package/dialog/RotateEncryptionKeyDialog.vue +2 -0
- package/dialog/SaveAsRKETemplateDialog.vue +2 -0
- package/dialog/ScaleMachineDownDialog.vue +2 -0
- package/dialog/ScalePoolDownDialog.vue +2 -0
- package/dialog/SloDialog.vue +2 -0
- package/edit/auth/ldap/config.vue +282 -280
- package/edit/auth/saml.vue +1 -4
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +3 -3
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +4 -2
- package/edit/catalog.cattle.io.clusterrepo.vue +2 -0
- package/edit/cis.cattle.io.clusterscan.vue +115 -97
- package/edit/cis.cattle.io.clusterscanprofile.vue +29 -31
- package/edit/cloudcredential.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +2 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +2 -0
- package/edit/fleet.cattle.io.cluster.vue +2 -0
- package/edit/fleet.cattle.io.clustergroup.vue +4 -1
- package/edit/fleet.cattle.io.gitrepo.vue +2 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +2 -0
- package/edit/logging-flow/Match.vue +2 -0
- package/edit/logging-flow/index.vue +10 -8
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +1 -1
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +3 -3
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +1 -0
- package/edit/management.cattle.io.fleetworkspace.vue +4 -1
- package/edit/management.cattle.io.project.vue +2 -0
- package/edit/management.cattle.io.roletemplate.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +1 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +2 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +1 -0
- package/edit/namespace.vue +1 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +2 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -1
- package/edit/networking.k8s.io.ingress/Rule.vue +1 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +20 -23
- package/edit/networking.k8s.io.ingress/index.vue +1 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +1 -1
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -0
- package/edit/node.vue +2 -0
- package/edit/persistentvolumeclaim.vue +1 -0
- package/edit/policy.poddisruptionbudget.vue +3 -1
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/rke2.vue +38 -13
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +32 -65
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +31 -32
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +2 -0
- package/edit/resources.cattle.io.backup.vue +97 -99
- package/edit/resources.cattle.io.restore.vue +96 -98
- package/edit/secret/index.vue +2 -0
- package/edit/service.vue +12 -3
- package/edit/ui.cattle.io.navlink.vue +1 -0
- package/edit/workload/Job.vue +3 -2
- package/edit/workload/Upgrading.vue +1 -0
- package/edit/workload/__tests__/index.test.ts +9 -7
- package/edit/workload/index.vue +33 -16
- package/edit/workload/storage/ContainerMountPaths.vue +37 -97
- package/edit/workload/storage/awsElasticBlockStore.vue +1 -1
- package/edit/workload/storage/azureDisk.vue +1 -1
- package/edit/workload/storage/csi/driver.longhorn.io.vue +2 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +2 -0
- package/edit/workload/storage/gcePersistentDisk.vue +1 -1
- package/edit/workload/storage/index.vue +38 -22
- package/edit/workload/storage/persistentVolumeClaim/index.vue +2 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +1 -0
- package/edit/workload/storage/vsphereVolume.vue +1 -1
- package/initialize/install-components.js +0 -12
- package/initialize/install-plugins.js +6 -7
- package/machine-config/azure.vue +2 -0
- package/machine-config/generic.vue +2 -0
- package/machine-config/vmwarevsphere.vue +2 -0
- package/mixins/fetch.client.js +2 -1
- package/mixins/resource-manager.js +1 -1
- package/models/cis.cattle.io.clusterscan.js +17 -16
- package/models/cis.cattle.io.clusterscanprofile.js +17 -0
- package/models/management.cattle.io.user.js +3 -3
- package/models/provisioning.cattle.io.cluster.js +2 -1
- package/models/steve-schema.ts +1 -1
- package/models/workload.js +2 -1
- package/package.json +6 -8
- package/pages/auth/login.vue +2 -1
- package/pages/c/_cluster/apps/charts/chart.vue +3 -1
- package/pages/c/_cluster/apps/charts/install.vue +5 -56
- package/pages/c/_cluster/auth/user.retention/index.vue +1 -1
- package/pages/c/_cluster/fleet/index.vue +0 -1
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +1 -0
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +2 -0
- package/pages/c/_cluster/settings/performance.vue +2 -2
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +45 -52
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +2 -0
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +6 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +7 -17
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +2 -0
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +3 -6
- package/pages/c/_cluster/uiplugins/index.vue +93 -92
- package/pages/index.vue +10 -2
- package/pkg/vue.config.js +2 -0
- package/plugins/i18n.js +1 -1
- package/plugins/plugin.js +27 -19
- package/plugins/version.js +3 -13
- package/promptRemove/management.cattle.io.roletemplate.vue +3 -5
- package/promptRemove/pod.vue +2 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +14 -8
- package/rancher-components/Form/Radio/RadioButton.vue +0 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +17 -9
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -33
- package/rancher-components/StringList/StringList.vue +6 -15
- package/scripts/extension/bundle +1 -1
- package/scripts/extension/publish +174 -99
- package/store/catalog.js +0 -26
- package/store/growl.js +8 -5
- package/store/type-map.js +3 -2
- package/utils/cluster.js +9 -0
- package/utils/versions.ts +39 -0
- package/vue.config.js +5 -0
- package/components/form/PodSecurity.vue +0 -168
- package/components/formatter/Weight.vue +0 -147
- package/components/nuxt/nuxt-build-indicator.vue +0 -170
- package/components/nuxt/nuxt-child.js +0 -52
- package/components/nuxt/nuxt-error.vue +0 -128
- package/components/nuxt/nuxt-link.client.js +0 -17
- package/components/nuxt/nuxt-loading.vue +0 -165
- package/composables/useStore.ts +0 -16
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
name: 'NuxtLoading',
|
|
4
|
-
data() {
|
|
5
|
-
return {
|
|
6
|
-
percent: 0,
|
|
7
|
-
show: false,
|
|
8
|
-
canSucceed: true,
|
|
9
|
-
reversed: false,
|
|
10
|
-
skipTimerCount: 0,
|
|
11
|
-
rtl: false,
|
|
12
|
-
throttle: 200,
|
|
13
|
-
duration: 3000,
|
|
14
|
-
continuous: false
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
computed: {
|
|
18
|
-
left() {
|
|
19
|
-
if (!this.continuous && !this.rtl) {
|
|
20
|
-
return false;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return this.rtl ? (this.reversed ? '0px' : 'auto') : (!this.reversed ? '0px' : 'auto');
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
beforeUnmount() {
|
|
27
|
-
this.clear();
|
|
28
|
-
},
|
|
29
|
-
methods: {
|
|
30
|
-
clear() {
|
|
31
|
-
clearInterval(this._timer);
|
|
32
|
-
clearTimeout(this._throttle);
|
|
33
|
-
this._timer = null;
|
|
34
|
-
},
|
|
35
|
-
start() {
|
|
36
|
-
this.clear();
|
|
37
|
-
this.percent = 0;
|
|
38
|
-
this.reversed = false;
|
|
39
|
-
this.skipTimerCount = 0;
|
|
40
|
-
this.canSucceed = true;
|
|
41
|
-
|
|
42
|
-
if (this.throttle) {
|
|
43
|
-
this._throttle = setTimeout(() => this.startTimer(), this.throttle);
|
|
44
|
-
} else {
|
|
45
|
-
this.startTimer();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return this;
|
|
49
|
-
},
|
|
50
|
-
set(num) {
|
|
51
|
-
this.show = true;
|
|
52
|
-
this.canSucceed = true;
|
|
53
|
-
this.percent = Math.min(100, Math.max(0, Math.floor(num)));
|
|
54
|
-
|
|
55
|
-
return this;
|
|
56
|
-
},
|
|
57
|
-
get() {
|
|
58
|
-
return this.percent;
|
|
59
|
-
},
|
|
60
|
-
increase(num) {
|
|
61
|
-
this.percent = Math.min(100, Math.floor(this.percent + num));
|
|
62
|
-
|
|
63
|
-
return this;
|
|
64
|
-
},
|
|
65
|
-
decrease(num) {
|
|
66
|
-
this.percent = Math.max(0, Math.floor(this.percent - num));
|
|
67
|
-
|
|
68
|
-
return this;
|
|
69
|
-
},
|
|
70
|
-
pause() {
|
|
71
|
-
clearInterval(this._timer);
|
|
72
|
-
|
|
73
|
-
return this;
|
|
74
|
-
},
|
|
75
|
-
resume() {
|
|
76
|
-
this.startTimer();
|
|
77
|
-
|
|
78
|
-
return this;
|
|
79
|
-
},
|
|
80
|
-
finish() {
|
|
81
|
-
this.percent = this.reversed ? 0 : 100;
|
|
82
|
-
this.hide();
|
|
83
|
-
|
|
84
|
-
return this;
|
|
85
|
-
},
|
|
86
|
-
hide() {
|
|
87
|
-
this.clear();
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
this.show = false;
|
|
90
|
-
this.$nextTick(() => {
|
|
91
|
-
this.percent = 0;
|
|
92
|
-
this.reversed = false;
|
|
93
|
-
});
|
|
94
|
-
}, 500);
|
|
95
|
-
|
|
96
|
-
return this;
|
|
97
|
-
},
|
|
98
|
-
fail() {
|
|
99
|
-
this.canSucceed = false;
|
|
100
|
-
|
|
101
|
-
return this;
|
|
102
|
-
},
|
|
103
|
-
startTimer() {
|
|
104
|
-
if (!this.show) {
|
|
105
|
-
this.show = true;
|
|
106
|
-
}
|
|
107
|
-
if (typeof this._cut === 'undefined') {
|
|
108
|
-
this._cut = 10000 / Math.floor(this.duration);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
this._timer = setInterval(() => {
|
|
112
|
-
/**
|
|
113
|
-
* When reversing direction skip one timers
|
|
114
|
-
* so 0, 100 are displayed for two iterations
|
|
115
|
-
* also disable css width transitioning
|
|
116
|
-
* which otherwise interferes and shows
|
|
117
|
-
* a jojo effect
|
|
118
|
-
*/
|
|
119
|
-
if (this.skipTimerCount > 0) {
|
|
120
|
-
this.skipTimerCount--;
|
|
121
|
-
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (this.reversed) {
|
|
126
|
-
this.decrease(this._cut);
|
|
127
|
-
} else {
|
|
128
|
-
this.increase(this._cut);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (this.continuous) {
|
|
132
|
-
if (this.percent >= 100) {
|
|
133
|
-
this.skipTimerCount = 1;
|
|
134
|
-
|
|
135
|
-
this.reversed = !this.reversed;
|
|
136
|
-
} else if (this.percent <= 0) {
|
|
137
|
-
this.skipTimerCount = 1;
|
|
138
|
-
|
|
139
|
-
this.reversed = !this.reversed;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}, 100);
|
|
143
|
-
}
|
|
144
|
-
},
|
|
145
|
-
render(h) {
|
|
146
|
-
let el = h(false);
|
|
147
|
-
|
|
148
|
-
if (this.show) {
|
|
149
|
-
el = h('div', {
|
|
150
|
-
staticClass: 'nuxt-progress',
|
|
151
|
-
class: {
|
|
152
|
-
'nuxt-progress-notransition': this.skipTimerCount > 0,
|
|
153
|
-
'nuxt-progress-failed': !this.canSucceed
|
|
154
|
-
},
|
|
155
|
-
style: {
|
|
156
|
-
width: `${ this.percent }%`,
|
|
157
|
-
left: this.left
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return el;
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
</script>
|
package/composables/useStore.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { getCurrentInstance } from 'vue';
|
|
2
|
-
import { Store } from 'vuex';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* useStore allows for accessing Vuex stores from within a setup function. This is a temporary measure for working with
|
|
6
|
-
* Vuex in Vue2.
|
|
7
|
-
*
|
|
8
|
-
* TODO: #9541 Remove for Vue 3 migration
|
|
9
|
-
*/
|
|
10
|
-
export const useStore = ():Store<any> => {
|
|
11
|
-
const vm = getCurrentInstance();
|
|
12
|
-
|
|
13
|
-
if (!vm) throw new Error('useStore() must be called from setup()');
|
|
14
|
-
|
|
15
|
-
return vm.proxy.$store;
|
|
16
|
-
};
|