Skip to content

Commit 4f1910a

Browse files
Revert "Add accessible Waterline list states"
This reverts commit 03201ec.
1 parent 03201ec commit 4f1910a

3 files changed

Lines changed: 10 additions & 70 deletions

File tree

public/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=a905e51b304d277481562787f11ad968",
2+
"/app.js": "/app.js?id=636e2d282c73577fb3b6664300d489e3",
33
"/app-dark.css": "/app-dark.css?id=64d24ee96944ffdb4b26a9be1658c1e3",
44
"/app.css": "/app.css?id=d525454610dfd3c5a581fc49676f8a37",
55
"/img/favicon.png": "/img/favicon.png?id=7c006241b093796d6abfa3049df93a59",

resources/js/screens/flows/index.vue

Lines changed: 8 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
data() {
1010
return {
1111
ready: false,
12-
loadingError: null,
1312
loadingNewEntries: false,
1413
hasNewEntries: false,
1514
page: 1,
@@ -147,7 +146,6 @@
147146
loadFlows(page = 1, refreshing = false) {
148147
if (!refreshing) {
149148
this.ready = false;
150-
this.loadingError = null;
151149
}
152150
153151
return this.$http.get(Waterline.basePath + '/api/flows/' + this.$route.params.type + '?' + this.apiQueryString(page))
@@ -170,14 +168,12 @@
170168
}
171169
172170
this.ready = true;
173-
this.loadingError = null;
174171
})
175-
.catch((error) => {
172+
.catch(() => {
176173
if (!refreshing) {
177174
this.flows = [];
178175
this.totalPages = 1;
179176
this.visibilityFilters = null;
180-
this.loadingError = this.flowListLoadErrorMessage(error);
181177
}
182178
183179
this.ready = true;
@@ -1411,43 +1407,6 @@
14111407
this.hasNewEntries = false;
14121408
},
14131409
1414-
retryLoadFlows() {
1415-
this.loadFlows(this.page || 1, false);
1416-
},
1417-
1418-
flowListLoadErrorMessage(error) {
1419-
if (error && error.code === 'ECONNABORTED') {
1420-
return 'The flow list request timed out.';
1421-
}
1422-
1423-
if (error && error.response && error.response.status) {
1424-
const status = error.response.status;
1425-
const message = error.response.data && error.response.data.message
1426-
? error.response.data.message
1427-
: 'Waterline could not load this flow list.';
1428-
1429-
return `HTTP ${status}: ${message}`;
1430-
}
1431-
1432-
if (error && error.request) {
1433-
return 'Waterline could not reach the flow list API.';
1434-
}
1435-
1436-
return error && error.message
1437-
? error.message
1438-
: 'Waterline could not load this flow list.';
1439-
},
1440-
1441-
flowListLoadingLabel() {
1442-
return 'Loading ' + this.flowCollectionLabel().toLowerCase() + ' flows';
1443-
},
1444-
1445-
flowListEmptyTitle() {
1446-
return this.hasActiveFilters
1447-
? 'No matching ' + this.flowCollectionLabel().toLowerCase() + ' flows'
1448-
: 'No ' + this.flowCollectionLabel().toLowerCase() + ' flows';
1449-
},
1450-
14511410
14521411
/**
14531412
* Refresh the flows every period of time.
@@ -1636,41 +1595,22 @@
16361595
</div>
16371596

16381597
<div v-if="!ready"
1639-
class="d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius"
1640-
role="status"
1641-
aria-live="polite"
1642-
:aria-label="flowListLoadingLabel()">
1643-
<svg xmlns="http://www.w3.org/2000/svg"
1644-
viewBox="0 0 20 20"
1645-
class="icon spin mr-2 fill-text-color"
1646-
aria-hidden="true">
1598+
class="d-flex align-items-center justify-content-center card-bg-secondary p-5 bottom-radius">
1599+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="icon spin mr-2 fill-text-color">
16471600
<path
16481601
d="M12 10a2 2 0 0 1-3.41 1.41A2 2 0 0 1 10 8V0a9.97 9.97 0 0 1 10 10h-8zm7.9 1.41A10 10 0 1 1 8.59.1v2.03a8 8 0 1 0 9.29 9.29h2.02zm-4.07 0a6 6 0 1 1-7.25-7.25v2.1a3.99 3.99 0 0 0-1.4 6.57 4 4 0 0 0 6.56-1.42h2.1z"></path>
16491602
</svg>
16501603

1651-
<span>{{ flowListLoadingLabel() }}</span>
1604+
<span>Loading...</span>
16521605
</div>
16531606

1654-
<div v-if="ready && loadingError"
1655-
class="d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius text-center"
1656-
role="alert"
1657-
aria-live="assertive">
1658-
<strong>Flow list unavailable</strong>
1659-
<span class="text-muted mt-2">{{ loadingError }}</span>
1660-
<button class="btn btn-outline-secondary btn-sm mt-3" @click="retryLoadFlows">
1661-
Retry
1662-
</button>
1663-
</div>
16641607

1665-
<div v-if="ready && !loadingError && flows.length == 0"
1666-
class="d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius text-center"
1667-
role="status"
1668-
aria-live="polite">
1669-
<strong>{{ flowListEmptyTitle() }}</strong>
1670-
<span v-if="hasActiveFilters" class="text-muted mt-2">Clear the active view or filters to widen the list.</span>
1608+
<div v-if="ready && flows.length == 0"
1609+
class="d-flex flex-column align-items-center justify-content-center card-bg-secondary p-5 bottom-radius">
1610+
<span>There aren't any flows.</span>
16711611
</div>
16721612

1673-
<table v-if="ready && !loadingError && flows.length > 0" :class="workflowListTableClass">
1613+
<table v-if="ready && flows.length > 0" :class="workflowListTableClass">
16741614
<thead>
16751615
<tr>
16761616
<th v-if="columnEnabled('flow')">Flow</th>

0 commit comments

Comments
 (0)