Compare commits

...

13 Commits

Author SHA1 Message Date
Gimanh b3cc983965 Merge pull request #13 from Gimanh/chore/version
chore: version
2026-01-23 21:58:10 +01:00
Nikolai Giman a14c332586 chore: version 2026-01-23 21:57:29 +01:00
Gimanh aa91934f19 Merge pull request #12 from Gimanh/fix/use-cookie
fix: use cookie
2026-01-22 20:03:13 +01:00
Gimanh aa8e6e2da6 Merge branch 'main' into fix/use-cookie 2026-01-22 20:02:40 +01:00
Nikolai Giman c4c9a16a09 fix: use cookie 2026-01-22 20:01:26 +01:00
Gimanh 293340c253 Merge pull request #11 from Gimanh/chore/docker-build
add bash script
2026-01-19 00:19:03 +01:00
Nikolai Giman 04bb545c25 add bash script 2026-01-19 00:17:56 +01:00
Gimanh aa235c10ea Merge pull request #10 from Gimanh/chore/extend-app
chore: add extend methods
2026-01-18 23:57:14 +01:00
Nikolai Giman 45e4a11605 chore: add extend methods 2026-01-18 23:56:23 +01:00
Gimanh 55b42dfecb Merge pull request #9 from Gimanh/chore/deps
chore: deps
2026-01-18 22:28:34 +01:00
Nikolai Giman a620c39b50 chore: deps 2026-01-18 22:24:59 +01:00
Nikolai Giman 8edb2d50d3 chore: deps 2026-01-18 22:17:40 +01:00
Nikolai Giman 19093598a0 chore: deps 2026-01-18 22:13:59 +01:00
21 changed files with 1937 additions and 4739 deletions
+1
View File
@@ -37,5 +37,6 @@ customer-license
!build-docker-api.sh
!build-docker-web.sh
!entrypoint.sh
!build-docker-migrations.sh
*.private
*.private*
+8
View File
@@ -19,6 +19,7 @@
"@rollup/plugin-commonjs": "^28.0.1",
"@rollup/plugin-node-resolve": "^15.3.0",
"@types/bcrypt": "^5.0.2",
"@types/cookie-parser": "^1.4.10",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.7",
@@ -39,10 +40,14 @@
},
"dependencies": {
"@types/bcryptjs": "^2.4.6",
"@types/passport": "^1.0.17",
"@types/passport-github2": "^1.2.9",
"@types/passport-google-oauth20": "^2.0.17",
"@vitejs/plugin-legacy": "^5.4.2",
"@vitejs/plugin-vue": "^5.1.4",
"axios": "^1.7.7",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.44.4",
@@ -50,6 +55,9 @@
"express": "4.21.0",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"passport": "^0.7.0",
"passport-github2": "^0.1.12",
"passport-google-oauth20": "^2.0.0",
"pg": "^8.16.3",
"pino": "^9.4.0",
"rotating-file-stream": "^3.2.5",
@@ -0,0 +1,5 @@
#!/bin/bash
VERSION=$1
docker buildx build --platform=linux/amd64,linux/arm64 -t gimanhead/taskview-ce-db-migration:$VERSION -t gimanhead/taskview-ce-db-migration:latest . --load
+28 -3
View File
@@ -5,8 +5,17 @@ import { appUserMiddleware } from './middlewares/app-user-middleware';
import errorHandler from './middlewares/error-handler';
import routes from './routes';
import passport, { initPassportLogin } from './tv-modules/auth/strategies/passport-login';
import cookieParser from 'cookie-parser';
const VRS = '1.18.0';
const allow = new Set([
...(process.env.CORS_REMOVE_DEFAULT_ALLOWED_ORIGINS === 'true' ? [] : [
// default allowed origins for official TaskView apps
"https://app.taskview.tech",
"https://taskview.handscream.com",
"capacitor://taskview.handscream.com",
"capacitor://app.taskview.tech",
]),
]);
export default class App {
public app: express.Application;
@@ -16,13 +25,20 @@ export default class App {
this.app = express();
this.port = port;
this.extendApp();
this.initializeMiddlewares();
this.initializeRoutes();
this.app.use(errorHandler);
this.app.use(passport.initialize());
initPassportLogin();
this.extendMiddlewares();
}
protected extendApp(): void { }
protected extendMiddlewares(): void { }
private initializeMiddlewares() {
//add tvJson method, clien need response format like {response: data}
this.app.use((_req: Request, res: Response, next) => {
@@ -32,8 +48,18 @@ export default class App {
next();
});
this.app.use(cookieParser());
this.app.use(appUserMiddleware);
this.app.use(cors());
this.app.use(cors({
credentials: true,
origin(origin, cb) {
if (!origin) return cb(null, true);
if (allow.has(origin)) return cb(null, true);
return cb(new Error(`CORS blocked origin: ${origin}`), false);
},
}));
this.app.use(helmet());
this.app.use(express.json());
this.app.use(express.urlencoded({ extended: true }));
@@ -48,7 +74,6 @@ export default class App {
public listen() {
return this.app.listen(this.port, '0.0.0.0', () => {
console.log(`Server is running on port ${this.port}`);
console.log(`Server version is ${VRS}`);
});
}
}
+41 -15
View File
@@ -23,6 +23,8 @@ export default class AuthController {
private readonly jwtExp: string = process.env.ACCESS_LIFE_TIME!;
private readonly jwtRefreshExp: string = process.env.REFRESH_LIFE_TIME!;
private readonly refreshTokenCookieName: string = 'taskview-refresh';
comparePasswords(pwd: string, hash: string): Promise<boolean> {
return new Promise((resolve) => {
//Prev version was written in PHP need to replace
@@ -250,6 +252,15 @@ export default class AuthController {
return res.redirect(`${process.env.APP_URL}/login?tokens=${encodedAuthData}`);
}
setRefreshToken = async (res: Response, refreshToken: string) => {
res.cookie(this.refreshTokenCookieName, refreshToken, {
httpOnly: true,
secure: true,
sameSite: "none",
maxAge: 1000 * 60 * 60 * 24 * 30,
});
}
loginByCode = async (req: Request, res: Response) => {
const schema = z.object({
email: z.string().email().toLowerCase(),
@@ -307,6 +318,8 @@ export default class AuthController {
await req.appUser.authManager.repository.updateLoginCode(null, userData.email);
await this.setRefreshToken(res, tokens.refresh);
return res.json(tokens);
};
@@ -352,6 +365,8 @@ export default class AuthController {
$logger.error(`Can not update tokens in JWT Storage for user ${userData.id} and rowId ${tokenRowId}`);
}
await this.setRefreshToken(res, tokens.refresh);
return res.json(tokens);
}
@@ -549,37 +564,46 @@ export default class AuthController {
};
logout = async (req: Request, res: Response) => {
if (!req.headers['authorization']) {
return res.status(400).end();
}
this.setRefreshToken(res, '');
const result = req.headers['authorization'].match(/Bearer\s(\S+)/);
const result = req.headers['authorization']?.match(/Bearer\s(\S+)/);
if (!result) {
return res.status(400).end();
return res.status(401).send({ message: 'Unauthorized' });
}
const payload = decode(result['1']) as UserJwtPayload;
if (!payload) {
return res.status(400).end();
const tokenId = req.appUser.getTokenId();
if (!tokenId) {
return res.status(401).send({ message: 'Unauthorized' });
}
const deleteResult = await req.appUser.authManager.jwtStorage.deleteTokens(payload.userData.id, result['1']);
const deleteResult = await req.appUser.authManager.jwtStorage.deleteTokens(tokenId, result['1']);
if (!deleteResult) {
return res.status(500).end();
return res.status(500).send({ message: 'Failed to revoke token' });
}
return res.send();
return res.status(204).end();
};
refreshTokens = async (req: Request, res: Response) => {
const refreshData = RefreshTokenSchema.safeParse(req.body);
if (!refreshData.success) {
return res.status(400).end();
let refreshToken = req.cookies[this.refreshTokenCookieName];
if (!refreshToken) {
const refreshData = RefreshTokenSchema.safeParse(req.body);
if (!refreshData.success) {
return res.status(400).send({ message: 'Invalid refresh token' });
}
refreshToken = refreshData.data.refreshToken;
$logger.info(`Refresh token found in body`);
} else {
$logger.info(`Refresh token found in cookies`);
}
const payload = await AuthController.validateTokens(refreshData.data.refreshToken);
const payload = await AuthController.validateTokens(refreshToken);
if (!payload) {
return res.status(400).end();
@@ -598,6 +622,8 @@ export default class AuthController {
return res.status(500).end();
}
await this.setRefreshToken(res, newTokens.refresh);
return res.json(newTokens);
};
+7 -7
View File
@@ -20,11 +20,11 @@ export default class JwtStorage {
}
return false;
} catch (error: any) {
$logger.error('Can not complete initTokenRecord', {
$logger.error({
userId,
errorMessage: error.message,
errorStack: error.stack,
});
}, 'Can not complete initTokenRecord');
return false;
}
}
@@ -40,7 +40,7 @@ export default class JwtStorage {
const res = await this.db.query(query, [accessToken, refreshToken, rowId]);
return !!(res.rowCount && res.rowCount > 0);
} catch (error: any) {
$logger.error('Error updating tokens:', { errorMessage: error.message, errorStack: error.stack });
$logger.error({ errorMessage: error.message, errorStack: error.stack }, 'Error updating tokens:');
return false;
}
}
@@ -55,11 +55,11 @@ export default class JwtStorage {
return false;
} catch (error: any) {
$logger.error('Error fetching tokens', {
$logger.error({
rowId,
errorMessage: error.message,
errorStack: error.stack,
});
}, 'Error fetching tokens');
return false;
}
}
@@ -67,8 +67,8 @@ export default class JwtStorage {
async deleteTokens(userId: number, accessToken: string): Promise<boolean> {
try {
const query = 'DELETE FROM tv_auth.user_tokens WHERE user_id = $1 AND access_token = $2;';
const deleteResul = await this.db.query(query, [userId, accessToken]);
return !!(deleteResul.rowCount && deleteResul.rowCount > 0);
await this.db.query(query, [userId, accessToken]);
return true;
} catch (_error: any) {
return false;
}
+30 -4
View File
@@ -1,19 +1,45 @@
#!/bin/bash
# This script builds the docker images for the taskview-ce-monorepo
# This script builds the docker images for TaskView Community Edition
# - taskview-ce-api-server
# - taskview-ce-db-migration
# - taskview-ce-webapp
set -e
VERSION=$1
# If version not provided, read from package.json
if [ -z "$VERSION" ]; then
VERSION=$(node -p "require('./package.json').version")
fi
echo $VERSION
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm use 24
node -v
echo "Building TaskView CE version: $VERSION"
# Build CE API
echo "========================================="
echo "Building CE API Server..."
echo "========================================="
cd api
bash build-docker-api.sh $VERSION
cd ..
# Build CE Web
echo "========================================="
echo "Building CE Web App..."
echo "========================================="
cd web
bash build-docker-web.sh $VERSION
cd ..
cd ..
echo "========================================="
echo "Build complete!"
echo "Images built:"
echo " - gimanhead/taskview-ce-api-server:$VERSION"
echo " - gimanhead/taskview-ce-webapp:$VERSION"
echo "========================================="
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "taskview-ce-monorepo",
"version": "1.19.0",
"version": "1.19.6",
"private": true,
"description": "TaskView CE monorepo containing web, API, and packages",
"workspaces": [
+1729 -4643
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -7,8 +7,8 @@ android {
applicationId "com.handscreamgnl.taskview.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1190
versionName "1.19.0"
versionCode 1196
versionName "1.19.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
@@ -6,6 +6,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation"
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="false">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
+7 -7
View File
@@ -1,21 +1,21 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../../node_modules/.pnpm/@capacitor+android@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/android/capacitor')
project(':capacitor-android').projectDir = new File('../../../node_modules/.pnpm/@capacitor+android@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/android/capacitor')
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/app/android')
project(':capacitor-app').projectDir = new File('../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/app/android')
include ':capacitor-browser'
project(':capacitor-browser').projectDir = new File('../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/browser/android')
project(':capacitor-browser').projectDir = new File('../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.5/node_modules/@capacitor/browser/android')
include ':capacitor-device'
project(':capacitor-device').projectDir = new File('../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/device/android')
project(':capacitor-device').projectDir = new File('../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/device/android')
include ':capacitor-preferences'
project(':capacitor-preferences').projectDir = new File('../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/preferences/android')
project(':capacitor-preferences').projectDir = new File('../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/preferences/android')
include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../../node_modules/.pnpm/@capacitor+splash-screen@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/splash-screen/android')
project(':capacitor-splash-screen').projectDir = new File('../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.4_@capacitor+core@7.4.5/node_modules/@capacitor/splash-screen/android')
include ':capgo-capacitor-updater'
project(':capgo-capacitor-updater').projectDir = new File('../../node_modules/.pnpm/@capgo+capacitor-updater@7.29.0_@capacitor+core@7.4.4/node_modules/@capgo/capacitor-updater/android')
project(':capgo-capacitor-updater').projectDir = new File('../../../node_modules/.pnpm/@capgo+capacitor-updater@7.41.1_@capacitor+core@7.4.5/node_modules/@capgo/capacitor-updater/android')
+10 -9
View File
@@ -12,18 +12,19 @@ const config: CapacitorConfig = {
zoomEnabled: false,
},
server: {
hostname: 'taskview.handscream.com',
//androidScheme: 'https://',
hostname: 'app.taskview.tech',
},
plugins: {
"CapacitorUpdater": {
"autoUpdate": false,
}
CapacitorUpdater: {
autoUpdate: false,
},
CapacitorCookies: {
enabled: true,
},
CapacitorHttp: {
enabled: true,
},
},
// server: {
// url: 'http://192.168.0.2:3000',
// cleartext: true,
// },
};
export default config;
+4 -4
View File
@@ -354,14 +354,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.19.0;
CURRENT_PROJECT_VERSION = 1.19.6;
DEVELOPMENT_TEAM = H2W2SG48JT;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TaskView;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.19.0;
MARKETING_VERSION = 1.19.6;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.handscream.taskview.app;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -377,14 +377,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1.19.0;
CURRENT_PROJECT_VERSION = 1.19.6;
DEVELOPMENT_TEAM = H2W2SG48JT;
INFOPLIST_FILE = App/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TaskView;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.19.0;
MARKETING_VERSION = 1.19.6;
PRODUCT_BUNDLE_IDENTIFIER = com.handscream.taskview.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
+9 -9
View File
@@ -1,4 +1,4 @@
require_relative '../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios/scripts/pods_helpers'
require_relative '../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios/scripts/pods_helpers'
platform :ios, '14.0'
use_frameworks!
@@ -9,14 +9,14 @@ use_frameworks!
install! 'cocoapods', :disable_input_output_paths => true
def capacitor_pods
pod 'Capacitor', :path => '../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/app'
pod 'CapacitorBrowser', :path => '../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/browser'
pod 'CapacitorDevice', :path => '../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/device'
pod 'CapacitorPreferences', :path => '../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/preferences'
pod 'CapacitorSplashScreen', :path => '../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/splash-screen'
pod 'CapgoCapacitorUpdater', :path => '../../../node_modules/.pnpm/@capgo+capacitor-updater@7.29.0_@capacitor+core@7.4.4/node_modules/@capgo/capacitor-updater'
pod 'Capacitor', :path => '../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios'
pod 'CapacitorCordova', :path => '../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios'
pod 'CapacitorApp', :path => '../../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/app'
pod 'CapacitorBrowser', :path => '../../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.5/node_modules/@capacitor/browser'
pod 'CapacitorDevice', :path => '../../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/device'
pod 'CapacitorPreferences', :path => '../../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/preferences'
pod 'CapacitorSplashScreen', :path => '../../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.4_@capacitor+core@7.4.5/node_modules/@capacitor/splash-screen'
pod 'CapgoCapacitorUpdater', :path => '../../../../node_modules/.pnpm/@capgo+capacitor-updater@7.41.1_@capacitor+core@7.4.5/node_modules/@capgo/capacitor-updater'
end
target 'TaskView' do
+29 -29
View File
@@ -1,77 +1,77 @@
PODS:
- Alamofire (5.10.2)
- BigInt (5.2.0)
- Capacitor (7.4.4):
- Capacitor (7.4.5):
- CapacitorCordova
- CapacitorApp (7.0.1):
- Capacitor
- CapacitorBrowser (7.0.3):
- Capacitor
- CapacitorCordova (7.4.4)
- CapacitorCordova (7.4.5)
- CapacitorDevice (7.0.1):
- Capacitor
- CapacitorPreferences (7.0.1):
- Capacitor
- CapacitorSplashScreen (7.0.3):
- CapacitorSplashScreen (7.0.4):
- Capacitor
- CapgoCapacitorUpdater (7.29.0):
- CapgoCapacitorUpdater (7.41.1):
- Alamofire (= 5.10.2)
- BigInt (= 5.2.0)
- Capacitor
- SSZipArchive (= 2.4.3)
- Version (= 0.8.0)
- SSZipArchive (2.4.3)
- ZIPFoundation (~> 0.9)
- Version (0.8.0)
- ZIPFoundation (0.9.20)
DEPENDENCIES:
- "Capacitor (from `../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/app`)"
- "CapacitorBrowser (from `../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/browser`)"
- "CapacitorCordova (from `../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios`)"
- "CapacitorDevice (from `../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/device`)"
- "CapacitorPreferences (from `../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/preferences`)"
- "CapacitorSplashScreen (from `../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/splash-screen`)"
- "CapgoCapacitorUpdater (from `../../../node_modules/.pnpm/@capgo+capacitor-updater@7.29.0_@capacitor+core@7.4.4/node_modules/@capgo/capacitor-updater`)"
- "Capacitor (from `../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios`)"
- "CapacitorApp (from `../../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/app`)"
- "CapacitorBrowser (from `../../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.5/node_modules/@capacitor/browser`)"
- "CapacitorCordova (from `../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios`)"
- "CapacitorDevice (from `../../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/device`)"
- "CapacitorPreferences (from `../../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/preferences`)"
- "CapacitorSplashScreen (from `../../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.4_@capacitor+core@7.4.5/node_modules/@capacitor/splash-screen`)"
- "CapgoCapacitorUpdater (from `../../../../node_modules/.pnpm/@capgo+capacitor-updater@7.41.1_@capacitor+core@7.4.5/node_modules/@capgo/capacitor-updater`)"
SPEC REPOS:
trunk:
- Alamofire
- BigInt
- SSZipArchive
- Version
- ZIPFoundation
EXTERNAL SOURCES:
Capacitor:
:path: "../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios"
:path: "../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios"
CapacitorApp:
:path: "../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/app"
:path: "../../../../node_modules/.pnpm/@capacitor+app@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/app"
CapacitorBrowser:
:path: "../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/browser"
:path: "../../../../node_modules/.pnpm/@capacitor+browser@7.0.3_@capacitor+core@7.4.5/node_modules/@capacitor/browser"
CapacitorCordova:
:path: "../../../node_modules/.pnpm/@capacitor+ios@7.4.4_@capacitor+core@7.4.4/node_modules/@capacitor/ios"
:path: "../../../../node_modules/.pnpm/@capacitor+ios@7.4.5_@capacitor+core@7.4.5/node_modules/@capacitor/ios"
CapacitorDevice:
:path: "../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/device"
:path: "../../../../node_modules/.pnpm/@capacitor+device@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/device"
CapacitorPreferences:
:path: "../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.4/node_modules/@capacitor/preferences"
:path: "../../../../node_modules/.pnpm/@capacitor+preferences@7.0.1_@capacitor+core@7.4.5/node_modules/@capacitor/preferences"
CapacitorSplashScreen:
:path: "../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.3_@capacitor+core@7.4.4/node_modules/@capacitor/splash-screen"
:path: "../../../../node_modules/.pnpm/@capacitor+splash-screen@7.0.4_@capacitor+core@7.4.5/node_modules/@capacitor/splash-screen"
CapgoCapacitorUpdater:
:path: "../../../node_modules/.pnpm/@capgo+capacitor-updater@7.29.0_@capacitor+core@7.4.4/node_modules/@capgo/capacitor-updater"
:path: "../../../../node_modules/.pnpm/@capgo+capacitor-updater@7.41.1_@capacitor+core@7.4.5/node_modules/@capgo/capacitor-updater"
SPEC CHECKSUMS:
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
BigInt: f668a80089607f521586bbe29513d708491ef2f7
Capacitor: 09d9ff8e9618e8c4b3cab2bbee34a17215dd2fef
Capacitor: a5bf59e09f9dd82694fdcca4d107b4d215ac470f
CapacitorApp: d63334c052278caf5d81585d80b21905c6f93f39
CapacitorBrowser: 66aa8ff09cdca2a327ce464b113b470e6f667753
CapacitorCordova: bf648a636f3c153f652d312ae145fb508b6ffced
CapacitorCordova: 31bbe4466000c6b86d9b7f1181ee286cff0205aa
CapacitorDevice: fe3f190e1d718f4607bdc6b73993433d1c84f409
CapacitorPreferences: cbf154e5e5519b7f5ab33817a334dda1e98387f9
CapacitorSplashScreen: d06ae8804808e9f649a08e7bb7f283c77b688084
CapgoCapacitorUpdater: b3a419b281c01eb9efc8969fe5183ea0da636d25
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
CapacitorSplashScreen: 03d04ffe57d5b619cfc162efc7415a965c92cc3f
CapgoCapacitorUpdater: 4bc3381d413a3e36ecfee9a548b19cc3f4b2a9c8
Version: de5907f2c5d0f3cf21708db7801d1d5401139486
ZIPFoundation: dfd3d681c4053ff7e2f7350bc4e53b5dba3f5351
PODFILE CHECKSUM: 9772ce7df102002849c361cc64e98fb0b609688d
PODFILE CHECKSUM: d0ad3405654a881e2cb6b93743d30c0ace507415
COCOAPODS: 1.16.2
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "taskview-ce-webapp",
"version": "1.17.0",
"version": "1.19.6",
"private": true,
"scripts": {
"dev": "vite",
+5 -3
View File
@@ -79,9 +79,11 @@ onMounted(async () => {
});
async function logoutFromApp() {
await logout();
await router.push('/');
router.go(0);
const result = await logout();
if (result) {
await router.push('/');
router.go(0);
}
}
async function checkForUpdates() {
+8 -2
View File
@@ -3,8 +3,14 @@ import $api from '@/helpers/axios';
import { $ls } from '@/plugins/axios';
export async function logout() {
await $api.post<LogoutResponse>('/module/auth/logout').catch((err) => {
const result = await $api.post<LogoutResponse>('/module/auth/logout').catch((err) => {
console.log(err, $api);
});
await $ls.invalidateTokens();
if (result) {
await $ls.invalidateTokens();
return true;
}
return false;
}
+2
View File
@@ -2,7 +2,9 @@ import axios from 'axios';
import { useTaskViewMainUrl } from '@/composition/useTaskViewMainUrl';
const $api = axios.create({
withCredentials: true,
baseURL: useTaskViewMainUrl(),
timeout: 10000,
});
export default $api;