@konfuzio/document-validation-ui 0.1.11-dev.0 → 0.1.11-dev.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konfuzio/document-validation-ui",
3
- "version": "0.1.11-dev.0",
3
+ "version": "0.1.11-dev.1",
4
4
  "repository": "git://github.com:konfuzio-ai/document-validation-ui.git",
5
5
  "main": "dist/app.js",
6
6
  "scripts": {
package/src/api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import axios from "axios";
2
2
  import { cacheAdapterEnhancer } from "axios-extensions";
3
3
 
4
- let HTTP, IMG_REQUEST, authToken;
4
+ let HTTP, IMG_REQUEST, authToken, appLocale;
5
5
  const DEFAULT_URL = "https://app.konfuzio.com";
6
6
 
7
7
  axios.defaults.xsrfCookieName = "csrftoken";
@@ -29,9 +29,14 @@ const setImageUrl = (url) => {
29
29
  IMG_REQUEST.defaults.baseURL = url;
30
30
  };
31
31
 
32
+ const setLocale = (locale) => {
33
+ appLocale = locale;
34
+ };
35
+
32
36
  const getInterceptorConfig = (config) => {
33
37
  if (authToken) {
34
38
  config.headers["Authorization"] = `Token ${authToken}`;
39
+ config.headers["Accept-Language"] = `${appLocale}-${appLocale}`;
35
40
  }
36
41
  return config;
37
42
  };
@@ -66,4 +71,5 @@ export default {
66
71
  setImageUrl,
67
72
  makeImageRequest,
68
73
  setAuthToken,
74
+ setLocale,
69
75
  };
@@ -194,7 +194,6 @@
194
194
  .button-text {
195
195
  font-size: 14px;
196
196
  font-weight: 500;
197
- max-width: 70%;
198
197
  }
199
198
  }
200
199
  }
@@ -149,6 +149,23 @@
149
149
  }
150
150
  }
151
151
  }
152
+
153
+ @media (max-width: 1300px) {
154
+ .edit-mode-top-bar {
155
+ .center-bar-components {
156
+ flex: 1;
157
+ justify-content: right;
158
+ }
159
+
160
+ .right-bar-components {
161
+ flex: 2;
162
+ }
163
+
164
+ .left-bar-components {
165
+ display: none;
166
+ }
167
+ }
168
+ }
152
169
  }
153
170
 
154
171
  .btn-container {
@@ -159,6 +159,8 @@ export default {
159
159
 
160
160
  // api config
161
161
  API.setAuthToken(this.userToken);
162
+ API.setLocale(this.$i18n.locale);
163
+
162
164
  if (this.api_url !== "") {
163
165
  API.setApiUrl(this.api_url);
164
166
  }
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div class="split-info-bar">
3
- <StarIcon />
3
+ <div class="bar-icon">
4
+ <StarIcon />
5
+ </div>
4
6
  <span> {{ $t("smart_split_suggestions") }}</span>
5
7
  </div>
6
8
  </template>
@@ -132,7 +132,11 @@ export default {
132
132
  },
133
133
  methods: {
134
134
  shortFilenameIfNeeded(filename) {
135
- if (filename && (filename.length >= 70 || !this.optimalResolution)) {
135
+ if (
136
+ filename &&
137
+ (filename.length >= 70 ||
138
+ (filename.length >= 25 && !this.optimalResolution))
139
+ ) {
136
140
  return (
137
141
  filename.substr(0, 20) +
138
142
  "..." +
@@ -2,7 +2,7 @@
2
2
  <div ref="documentTopBar" class="document-top-bar-component">
3
3
  <div
4
4
  v-if="selectedDocument && selectedDocument.pages.length > 0 && !loading"
5
- class="document-top-bar"
5
+ :class="['document-top-bar', editMode && 'edit-mode-top-bar']"
6
6
  >
7
7
  <div v-if="!recalculatingAnnotations" class="left-bar-components">
8
8
  <DocumentCategory
package/src/constants.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export const PIXEL_RATIO = window.devicePixelRatio || 1;
2
2
  export const VIEWPORT_RATIO = 0.98;
3
3
  export const MINIMUM_APP_WIDTH = 600;
4
- export const MINIMUM_OPTIMIZED_APP_WIDTH = 1024;
4
+ export const MINIMUM_OPTIMIZED_APP_WIDTH = 950;