From a28bf7aeaf257ff8bcf6dbd38e53fd3a08771251 Mon Sep 17 00:00:00 2001 From: Ognjen Cirkovic Date: Wed, 26 Oct 2022 21:29:36 +0200 Subject: Iniciali commit backend-a. --- Backend/Api/.gitignore | 454 +++++++++++++++++++++++++ Backend/Api/Api.sln | 25 ++ Backend/Api/Api/Api.csproj | 20 ++ Backend/Api/Api/Program.cs | 23 ++ Backend/Api/Api/Properties/launchSettings.json | 31 ++ Backend/Api/Api/appsettings.Development.json | 8 + Backend/Api/Api/appsettings.json | 9 + Client/.gitkeep | 0 8 files changed, 570 insertions(+) create mode 100644 Backend/Api/.gitignore create mode 100644 Backend/Api/Api.sln create mode 100644 Backend/Api/Api/Api.csproj create mode 100644 Backend/Api/Api/Program.cs create mode 100644 Backend/Api/Api/Properties/launchSettings.json create mode 100644 Backend/Api/Api/appsettings.Development.json create mode 100644 Backend/Api/Api/appsettings.json create mode 100644 Client/.gitkeep diff --git a/Backend/Api/.gitignore b/Backend/Api/.gitignore new file mode 100644 index 0000000..2afa2e2 --- /dev/null +++ b/Backend/Api/.gitignore @@ -0,0 +1,454 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET +project.lock.json +project.fragment.lock.json +artifacts/ + +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# JetBrains Rider +.idea/ +*.sln.iml + +## +## Visual Studio Code +## +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/Backend/Api/Api.sln b/Backend/Api/Api.sln new file mode 100644 index 0000000..006fcf6 --- /dev/null +++ b/Backend/Api/Api.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32825.248 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Api", "Api\Api.csproj", "{98D1F700-C988-4F19-89D1-9B7D002D702D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {98D1F700-C988-4F19-89D1-9B7D002D702D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {98D1F700-C988-4F19-89D1-9B7D002D702D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {98D1F700-C988-4F19-89D1-9B7D002D702D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {98D1F700-C988-4F19-89D1-9B7D002D702D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E6AD5655-69C9-485B-9F63-FF2F67F42B51} + EndGlobalSection +EndGlobal diff --git a/Backend/Api/Api/Api.csproj b/Backend/Api/Api/Api.csproj new file mode 100644 index 0000000..6a05d5c --- /dev/null +++ b/Backend/Api/Api/Api.csproj @@ -0,0 +1,20 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + + + + diff --git a/Backend/Api/Api/Program.cs b/Backend/Api/Api/Program.cs new file mode 100644 index 0000000..df2434c --- /dev/null +++ b/Backend/Api/Api/Program.cs @@ -0,0 +1,23 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. + +builder.Services.AddControllers(); +// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle +builder.Services.AddEndpointsApiExplorer(); +builder.Services.AddSwaggerGen(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (app.Environment.IsDevelopment()) +{ + app.UseSwagger(); + app.UseSwaggerUI(); +} + +app.UseAuthorization(); + +app.MapControllers(); + +app.Run(); diff --git a/Backend/Api/Api/Properties/launchSettings.json b/Backend/Api/Api/Properties/launchSettings.json new file mode 100644 index 0000000..8ad1068 --- /dev/null +++ b/Backend/Api/Api/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:61217", + "sslPort": 0 + } + }, + "profiles": { + "Api": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5279", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Backend/Api/Api/appsettings.Development.json b/Backend/Api/Api/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Backend/Api/Api/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Backend/Api/Api/appsettings.json b/Backend/Api/Api/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Backend/Api/Api/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Client/.gitkeep b/Client/.gitkeep new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 18db710dbcfb55125d5f2a96829793d18f5e59a2 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Wed, 26 Oct 2022 22:49:41 +0200 Subject: Dodat kostur client dela aplikacije. --- Client/.idea/.gitignore | 0 Client/.idea/Client.iml | 9 + Client/.idea/misc.xml | 6 + Client/.idea/modules.xml | 8 + Client/.idea/vcs.xml | 6 + Client/.idea/workspace.xml | 40 +++++ demoProjekat/BrzoDoLokacije/.gitignore | 15 ++ demoProjekat/BrzoDoLokacije/.idea/.gitignore | 3 + demoProjekat/BrzoDoLokacije/.idea/compiler.xml | 6 + demoProjekat/BrzoDoLokacije/.idea/gradle.xml | 19 +++ demoProjekat/BrzoDoLokacije/.idea/misc.xml | 10 ++ demoProjekat/BrzoDoLokacije/.idea/vcs.xml | 6 + demoProjekat/BrzoDoLokacije/app/.gitignore | 1 + demoProjekat/BrzoDoLokacije/app/build.gradle | 48 ++++++ demoProjekat/BrzoDoLokacije/app/proguard-rules.pro | 21 +++ .../brzodolokacije/ExampleInstrumentedTest.kt | 24 +++ .../app/src/main/AndroidManifest.xml | 31 ++++ .../com/example/brzodolokacije/MainActivity.kt | 11 ++ .../res/drawable-v24/ic_launcher_foreground.xml | 30 ++++ .../main/res/drawable/ic_launcher_background.xml | 170 +++++++++++++++++++ .../app/src/main/res/layout/activity_main.xml | 18 ++ .../src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../app/src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../main/res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes .../app/src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../main/res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../app/src/main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../src/main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../src/main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes .../app/src/main/res/values-night/themes.xml | 16 ++ .../app/src/main/res/values/colors.xml | 10 ++ .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/themes.xml | 16 ++ .../app/src/main/res/xml/backup_rules.xml | 13 ++ .../app/src/main/res/xml/data_extraction_rules.xml | 19 +++ .../com/example/brzodolokacije/ExampleUnitTest.kt | 17 ++ demoProjekat/BrzoDoLokacije/build.gradle | 6 + demoProjekat/BrzoDoLokacije/gradle.properties | 23 +++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + demoProjekat/BrzoDoLokacije/gradlew | 185 +++++++++++++++++++++ demoProjekat/BrzoDoLokacije/gradlew.bat | 89 ++++++++++ demoProjekat/BrzoDoLokacije/settings.gradle | 16 ++ 47 files changed, 911 insertions(+) create mode 100644 Client/.idea/.gitignore create mode 100644 Client/.idea/Client.iml create mode 100644 Client/.idea/misc.xml create mode 100644 Client/.idea/modules.xml create mode 100644 Client/.idea/vcs.xml create mode 100644 Client/.idea/workspace.xml create mode 100644 demoProjekat/BrzoDoLokacije/.gitignore create mode 100644 demoProjekat/BrzoDoLokacije/.idea/.gitignore create mode 100644 demoProjekat/BrzoDoLokacije/.idea/compiler.xml create mode 100644 demoProjekat/BrzoDoLokacije/.idea/gradle.xml create mode 100644 demoProjekat/BrzoDoLokacije/.idea/misc.xml create mode 100644 demoProjekat/BrzoDoLokacije/.idea/vcs.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/.gitignore create mode 100644 demoProjekat/BrzoDoLokacije/app/build.gradle create mode 100644 demoProjekat/BrzoDoLokacije/app/proguard-rules.pro create mode 100644 demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt create mode 100644 demoProjekat/BrzoDoLokacije/build.gradle create mode 100644 demoProjekat/BrzoDoLokacije/gradle.properties create mode 100644 demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar create mode 100644 demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties create mode 100644 demoProjekat/BrzoDoLokacije/gradlew create mode 100644 demoProjekat/BrzoDoLokacije/gradlew.bat create mode 100644 demoProjekat/BrzoDoLokacije/settings.gradle diff --git a/Client/.idea/.gitignore b/Client/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/Client/.idea/Client.iml b/Client/.idea/Client.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/Client/.idea/Client.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Client/.idea/misc.xml b/Client/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/Client/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Client/.idea/modules.xml b/Client/.idea/modules.xml new file mode 100644 index 0000000..122b0f2 --- /dev/null +++ b/Client/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Client/.idea/vcs.xml b/Client/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Client/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Client/.idea/workspace.xml b/Client/.idea/workspace.xml new file mode 100644 index 0000000..62e1e24 --- /dev/null +++ b/Client/.idea/workspace.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 1666816517772 + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.gitignore b/demoProjekat/BrzoDoLokacije/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/demoProjekat/BrzoDoLokacije/.idea/.gitignore b/demoProjekat/BrzoDoLokacije/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/demoProjekat/BrzoDoLokacije/.idea/compiler.xml b/demoProjekat/BrzoDoLokacije/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.idea/gradle.xml b/demoProjekat/BrzoDoLokacije/.idea/gradle.xml new file mode 100644 index 0000000..a2d7c21 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.idea/misc.xml b/demoProjekat/BrzoDoLokacije/.idea/misc.xml new file mode 100644 index 0000000..bdd9278 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.idea/vcs.xml b/demoProjekat/BrzoDoLokacije/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/.gitignore b/demoProjekat/BrzoDoLokacije/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/build.gradle b/demoProjekat/BrzoDoLokacije/app/build.gradle new file mode 100644 index 0000000..42206c7 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/build.gradle @@ -0,0 +1,48 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.example.brzodolokacije' + compileSdk 32 + + defaultConfig { + applicationId "com.example.brzodolokacije" + minSdk 21 + targetSdk 32 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + buildFeatures { + viewBinding true + } +} + +dependencies { + + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'com.google.android.material:material:1.7.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/proguard-rules.pro b/demoProjekat/BrzoDoLokacije/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt b/demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..ac8d356 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.brzodolokacije + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.example.brzodolokacije", appContext.packageName) + } +} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml b/demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..1dff3df --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt b/demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt new file mode 100644 index 0000000..03d6236 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt @@ -0,0 +1,11 @@ +package com.example.brzodolokacije + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + } +} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..17eab17 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..ccad389 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..21bd63c --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + BrzoDoLokacije + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..323d3da --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 0000000..fa0f996 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000..9ee9997 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt b/demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt new file mode 100644 index 0000000..3bc92cd --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.example.brzodolokacije + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/build.gradle b/demoProjekat/BrzoDoLokacije/build.gradle new file mode 100644 index 0000000..c518bc1 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/build.gradle @@ -0,0 +1,6 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '7.3.0' apply false + id 'com.android.library' version '7.3.0' apply false + id 'org.jetbrains.kotlin.android' version '1.7.10' apply false +} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/gradle.properties b/demoProjekat/BrzoDoLokacije/gradle.properties new file mode 100644 index 0000000..3c5031e --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/gradle.properties @@ -0,0 +1,23 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar b/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar differ diff --git a/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties b/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..2a5837b --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Oct 26 22:36:41 CEST 2022 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/demoProjekat/BrzoDoLokacije/gradlew b/demoProjekat/BrzoDoLokacije/gradlew new file mode 100644 index 0000000..4f906e0 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/demoProjekat/BrzoDoLokacije/gradlew.bat b/demoProjekat/BrzoDoLokacije/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/demoProjekat/BrzoDoLokacije/settings.gradle b/demoProjekat/BrzoDoLokacije/settings.gradle new file mode 100644 index 0000000..dc8bcc0 --- /dev/null +++ b/demoProjekat/BrzoDoLokacije/settings.gradle @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "BrzoDoLokacije" +include ':app' -- cgit v1.2.3 From f65890370609daeb4428b2a631f23d09d0b28445 Mon Sep 17 00:00:00 2001 From: Ognjen Cirkovic Date: Wed, 26 Oct 2022 23:13:53 +0200 Subject: Dodat folder za controllere. --- Backend/Api/Api/Api.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/Backend/Api/Api/Api.csproj b/Backend/Api/Api/Api.csproj index 6a05d5c..8732b1d 100644 --- a/Backend/Api/Api/Api.csproj +++ b/Backend/Api/Api/Api.csproj @@ -11,6 +11,7 @@ + -- cgit v1.2.3 From e5026fba42f4ded6fe13921e22de1bbfdb943c4b Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Wed, 26 Oct 2022 23:22:03 +0200 Subject: Izmena lokacije client dela aplikacije. --- Client/.idea/.gitignore | 0 Client/.idea/Client.iml | 9 - Client/.idea/misc.xml | 6 - Client/.idea/modules.xml | 8 - Client/.idea/vcs.xml | 6 - Client/.idea/workspace.xml | 40 ----- Client/BrzoDoLokacije/.gitignore | 15 ++ Client/BrzoDoLokacije/.idea/.gitignore | 3 + Client/BrzoDoLokacije/.idea/compiler.xml | 6 + Client/BrzoDoLokacije/.idea/gradle.xml | 19 +++ Client/BrzoDoLokacije/.idea/misc.xml | 10 ++ Client/BrzoDoLokacije/.idea/vcs.xml | 6 + Client/BrzoDoLokacije/app/.gitignore | 1 + Client/BrzoDoLokacije/app/build.gradle | 48 ++++++ Client/BrzoDoLokacije/app/proguard-rules.pro | 21 +++ .../brzodolokacije/ExampleInstrumentedTest.kt | 24 +++ .../app/src/main/AndroidManifest.xml | 31 ++++ .../com/example/brzodolokacije/MainActivity.kt | 11 ++ .../res/drawable-v24/ic_launcher_foreground.xml | 30 ++++ .../main/res/drawable/ic_launcher_background.xml | 170 +++++++++++++++++++ .../app/src/main/res/layout/activity_main.xml | 18 ++ .../src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 + .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 + .../app/src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../main/res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes .../app/src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../main/res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../app/src/main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../src/main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../src/main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes .../app/src/main/res/values-night/themes.xml | 16 ++ .../app/src/main/res/values/colors.xml | 10 ++ .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/themes.xml | 16 ++ .../app/src/main/res/xml/backup_rules.xml | 13 ++ .../app/src/main/res/xml/data_extraction_rules.xml | 19 +++ .../com/example/brzodolokacije/ExampleUnitTest.kt | 17 ++ Client/BrzoDoLokacije/build.gradle | 6 + Client/BrzoDoLokacije/gradle.properties | 23 +++ .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + Client/BrzoDoLokacije/gradlew | 185 +++++++++++++++++++++ Client/BrzoDoLokacije/gradlew.bat | 89 ++++++++++ Client/BrzoDoLokacije/settings.gradle | 16 ++ demoProjekat/BrzoDoLokacije/.gitignore | 15 -- demoProjekat/BrzoDoLokacije/.idea/.gitignore | 3 - demoProjekat/BrzoDoLokacije/.idea/compiler.xml | 6 - demoProjekat/BrzoDoLokacije/.idea/gradle.xml | 19 --- demoProjekat/BrzoDoLokacije/.idea/misc.xml | 10 -- demoProjekat/BrzoDoLokacije/.idea/vcs.xml | 6 - demoProjekat/BrzoDoLokacije/app/.gitignore | 1 - demoProjekat/BrzoDoLokacije/app/build.gradle | 48 ------ demoProjekat/BrzoDoLokacije/app/proguard-rules.pro | 21 --- .../brzodolokacije/ExampleInstrumentedTest.kt | 24 --- .../app/src/main/AndroidManifest.xml | 31 ---- .../com/example/brzodolokacije/MainActivity.kt | 11 -- .../res/drawable-v24/ic_launcher_foreground.xml | 30 ---- .../main/res/drawable/ic_launcher_background.xml | 170 ------------------- .../app/src/main/res/layout/activity_main.xml | 18 -- .../src/main/res/mipmap-anydpi-v26/ic_launcher.xml | 5 - .../res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 - .../app/src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 1404 -> 0 bytes .../main/res/mipmap-hdpi/ic_launcher_round.webp | Bin 2898 -> 0 bytes .../app/src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 982 -> 0 bytes .../main/res/mipmap-mdpi/ic_launcher_round.webp | Bin 1772 -> 0 bytes .../app/src/main/res/mipmap-xhdpi/ic_launcher.webp | Bin 1900 -> 0 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.webp | Bin 3918 -> 0 bytes .../src/main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 2884 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 5914 -> 0 bytes .../src/main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 3844 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 7778 -> 0 bytes .../app/src/main/res/values-night/themes.xml | 16 -- .../app/src/main/res/values/colors.xml | 10 -- .../app/src/main/res/values/strings.xml | 3 - .../app/src/main/res/values/themes.xml | 16 -- .../app/src/main/res/xml/backup_rules.xml | 13 -- .../app/src/main/res/xml/data_extraction_rules.xml | 19 --- .../com/example/brzodolokacije/ExampleUnitTest.kt | 17 -- demoProjekat/BrzoDoLokacije/build.gradle | 6 - demoProjekat/BrzoDoLokacije/gradle.properties | 23 --- .../gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 - demoProjekat/BrzoDoLokacije/gradlew | 185 --------------------- demoProjekat/BrzoDoLokacije/gradlew.bat | 89 ---------- demoProjekat/BrzoDoLokacije/settings.gradle | 16 -- 88 files changed, 842 insertions(+), 911 deletions(-) delete mode 100644 Client/.idea/.gitignore delete mode 100644 Client/.idea/Client.iml delete mode 100644 Client/.idea/misc.xml delete mode 100644 Client/.idea/modules.xml delete mode 100644 Client/.idea/vcs.xml delete mode 100644 Client/.idea/workspace.xml create mode 100644 Client/BrzoDoLokacije/.gitignore create mode 100644 Client/BrzoDoLokacije/.idea/.gitignore create mode 100644 Client/BrzoDoLokacije/.idea/compiler.xml create mode 100644 Client/BrzoDoLokacije/.idea/gradle.xml create mode 100644 Client/BrzoDoLokacije/.idea/misc.xml create mode 100644 Client/BrzoDoLokacije/.idea/vcs.xml create mode 100644 Client/BrzoDoLokacije/app/.gitignore create mode 100644 Client/BrzoDoLokacije/app/build.gradle create mode 100644 Client/BrzoDoLokacije/app/proguard-rules.pro create mode 100644 Client/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt create mode 100644 Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt create mode 100644 Client/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/values/colors.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/values/strings.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/values/themes.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml create mode 100644 Client/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt create mode 100644 Client/BrzoDoLokacije/build.gradle create mode 100644 Client/BrzoDoLokacije/gradle.properties create mode 100644 Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar create mode 100644 Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties create mode 100644 Client/BrzoDoLokacije/gradlew create mode 100644 Client/BrzoDoLokacije/gradlew.bat create mode 100644 Client/BrzoDoLokacije/settings.gradle delete mode 100644 demoProjekat/BrzoDoLokacije/.gitignore delete mode 100644 demoProjekat/BrzoDoLokacije/.idea/.gitignore delete mode 100644 demoProjekat/BrzoDoLokacije/.idea/compiler.xml delete mode 100644 demoProjekat/BrzoDoLokacije/.idea/gradle.xml delete mode 100644 demoProjekat/BrzoDoLokacije/.idea/misc.xml delete mode 100644 demoProjekat/BrzoDoLokacije/.idea/vcs.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/.gitignore delete mode 100644 demoProjekat/BrzoDoLokacije/app/build.gradle delete mode 100644 demoProjekat/BrzoDoLokacije/app/proguard-rules.pro delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml delete mode 100644 demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt delete mode 100644 demoProjekat/BrzoDoLokacije/build.gradle delete mode 100644 demoProjekat/BrzoDoLokacije/gradle.properties delete mode 100644 demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar delete mode 100644 demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties delete mode 100644 demoProjekat/BrzoDoLokacije/gradlew delete mode 100644 demoProjekat/BrzoDoLokacije/gradlew.bat delete mode 100644 demoProjekat/BrzoDoLokacije/settings.gradle diff --git a/Client/.idea/.gitignore b/Client/.idea/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/Client/.idea/Client.iml b/Client/.idea/Client.iml deleted file mode 100644 index d6ebd48..0000000 --- a/Client/.idea/Client.iml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/Client/.idea/misc.xml b/Client/.idea/misc.xml deleted file mode 100644 index 639900d..0000000 --- a/Client/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Client/.idea/modules.xml b/Client/.idea/modules.xml deleted file mode 100644 index 122b0f2..0000000 --- a/Client/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Client/.idea/vcs.xml b/Client/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/Client/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Client/.idea/workspace.xml b/Client/.idea/workspace.xml deleted file mode 100644 index 62e1e24..0000000 --- a/Client/.idea/workspace.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - 1666816517772 - - - - \ No newline at end of file diff --git a/Client/BrzoDoLokacije/.gitignore b/Client/BrzoDoLokacije/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/Client/BrzoDoLokacije/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/Client/BrzoDoLokacije/.idea/.gitignore b/Client/BrzoDoLokacije/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Client/BrzoDoLokacije/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Client/BrzoDoLokacije/.idea/compiler.xml b/Client/BrzoDoLokacije/.idea/compiler.xml new file mode 100644 index 0000000..fb7f4a8 --- /dev/null +++ b/Client/BrzoDoLokacije/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/.idea/gradle.xml b/Client/BrzoDoLokacije/.idea/gradle.xml new file mode 100644 index 0000000..a2d7c21 --- /dev/null +++ b/Client/BrzoDoLokacije/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/.idea/misc.xml b/Client/BrzoDoLokacije/.idea/misc.xml new file mode 100644 index 0000000..bdd9278 --- /dev/null +++ b/Client/BrzoDoLokacije/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/.idea/vcs.xml b/Client/BrzoDoLokacije/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/Client/BrzoDoLokacije/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/.gitignore b/Client/BrzoDoLokacije/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/Client/BrzoDoLokacije/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/build.gradle b/Client/BrzoDoLokacije/app/build.gradle new file mode 100644 index 0000000..42206c7 --- /dev/null +++ b/Client/BrzoDoLokacije/app/build.gradle @@ -0,0 +1,48 @@ +plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' +} + +android { + namespace 'com.example.brzodolokacije' + compileSdk 32 + + defaultConfig { + applicationId "com.example.brzodolokacije" + minSdk 21 + targetSdk 32 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + kotlinOptions { + jvmTarget = '1.8' + } + buildFeatures { + viewBinding true + } +} + +dependencies { + + implementation 'androidx.core:core-ktx:1.7.0' + implementation 'androidx.appcompat:appcompat:1.5.1' + implementation 'com.google.android.material:material:1.7.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/proguard-rules.pro b/Client/BrzoDoLokacije/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/Client/BrzoDoLokacije/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt b/Client/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..ac8d356 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.example.brzodolokacije + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.example.brzodolokacije", appContext.packageName) + } +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml b/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..1dff3df --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt new file mode 100644 index 0000000..03d6236 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt @@ -0,0 +1,11 @@ +package com.example.brzodolokacije + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle + +class MainActivity : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_main) + } +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 0000000..2b068d1 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 0000000..07d5da9 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..17eab17 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,18 @@ + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..eca70cf --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 0000000..c209e78 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 0000000..b2dfe3d Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 0000000..4f0f1d6 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 0000000..62b611d Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 0000000..948a307 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..1b9a695 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 0000000..28d4b77 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9287f50 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 0000000..aa7d642 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 0000000..9126ae3 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml b/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml new file mode 100644 index 0000000..ccad389 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml b/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..f8c6127 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ + + + #FFBB86FC + #FF6200EE + #FF3700B3 + #FF03DAC5 + #FF018786 + #FF000000 + #FFFFFFFF + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml b/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..21bd63c --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + BrzoDoLokacije + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/values/themes.xml b/Client/BrzoDoLokacije/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..323d3da --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml b/Client/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 0000000..fa0f996 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml b/Client/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 0000000..9ee9997 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt b/Client/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt new file mode 100644 index 0000000..3bc92cd --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.example.brzodolokacije + +import org.junit.Test + +import org.junit.Assert.* + +/** + * Example local unit test, which will execute on the development machine (host). + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +class ExampleUnitTest { + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/build.gradle b/Client/BrzoDoLokacije/build.gradle new file mode 100644 index 0000000..c518bc1 --- /dev/null +++ b/Client/BrzoDoLokacije/build.gradle @@ -0,0 +1,6 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '7.3.0' apply false + id 'com.android.library' version '7.3.0' apply false + id 'org.jetbrains.kotlin.android' version '1.7.10' apply false +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/gradle.properties b/Client/BrzoDoLokacije/gradle.properties new file mode 100644 index 0000000..3c5031e --- /dev/null +++ b/Client/BrzoDoLokacije/gradle.properties @@ -0,0 +1,23 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Kotlin code style for this project: "official" or "obsolete": +kotlin.code.style=official +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar b/Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e708b1c Binary files /dev/null and b/Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties b/Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..2a5837b --- /dev/null +++ b/Client/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed Oct 26 22:36:41 CEST 2022 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/Client/BrzoDoLokacije/gradlew b/Client/BrzoDoLokacije/gradlew new file mode 100644 index 0000000..4f906e0 --- /dev/null +++ b/Client/BrzoDoLokacije/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/Client/BrzoDoLokacije/gradlew.bat b/Client/BrzoDoLokacije/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/Client/BrzoDoLokacije/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/Client/BrzoDoLokacije/settings.gradle b/Client/BrzoDoLokacije/settings.gradle new file mode 100644 index 0000000..dc8bcc0 --- /dev/null +++ b/Client/BrzoDoLokacije/settings.gradle @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "BrzoDoLokacije" +include ':app' diff --git a/demoProjekat/BrzoDoLokacije/.gitignore b/demoProjekat/BrzoDoLokacije/.gitignore deleted file mode 100644 index aa724b7..0000000 --- a/demoProjekat/BrzoDoLokacije/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -*.iml -.gradle -/local.properties -/.idea/caches -/.idea/libraries -/.idea/modules.xml -/.idea/workspace.xml -/.idea/navEditor.xml -/.idea/assetWizardSettings.xml -.DS_Store -/build -/captures -.externalNativeBuild -.cxx -local.properties diff --git a/demoProjekat/BrzoDoLokacije/.idea/.gitignore b/demoProjekat/BrzoDoLokacije/.idea/.gitignore deleted file mode 100644 index 26d3352..0000000 --- a/demoProjekat/BrzoDoLokacije/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/demoProjekat/BrzoDoLokacije/.idea/compiler.xml b/demoProjekat/BrzoDoLokacije/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/demoProjekat/BrzoDoLokacije/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.idea/gradle.xml b/demoProjekat/BrzoDoLokacije/.idea/gradle.xml deleted file mode 100644 index a2d7c21..0000000 --- a/demoProjekat/BrzoDoLokacije/.idea/gradle.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.idea/misc.xml b/demoProjekat/BrzoDoLokacije/.idea/misc.xml deleted file mode 100644 index bdd9278..0000000 --- a/demoProjekat/BrzoDoLokacije/.idea/misc.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/.idea/vcs.xml b/demoProjekat/BrzoDoLokacije/.idea/vcs.xml deleted file mode 100644 index b2bdec2..0000000 --- a/demoProjekat/BrzoDoLokacije/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/.gitignore b/demoProjekat/BrzoDoLokacije/app/.gitignore deleted file mode 100644 index 42afabf..0000000 --- a/demoProjekat/BrzoDoLokacije/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/build.gradle b/demoProjekat/BrzoDoLokacije/app/build.gradle deleted file mode 100644 index 42206c7..0000000 --- a/demoProjekat/BrzoDoLokacije/app/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ -plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' -} - -android { - namespace 'com.example.brzodolokacije' - compileSdk 32 - - defaultConfig { - applicationId "com.example.brzodolokacije" - minSdk 21 - targetSdk 32 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = '1.8' - } - buildFeatures { - viewBinding true - } -} - -dependencies { - - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.5.1' - implementation 'com.google.android.material:material:1.7.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' -} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/proguard-rules.pro b/demoProjekat/BrzoDoLokacije/app/proguard-rules.pro deleted file mode 100644 index 481bb43..0000000 --- a/demoProjekat/BrzoDoLokacije/app/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# Add project specific ProGuard rules here. -# You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Uncomment this to preserve the line number information for -# debugging stack traces. -#-keepattributes SourceFile,LineNumberTable - -# If you keep the line number information, uncomment this to -# hide the original source file name. -#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt b/demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt deleted file mode 100644 index ac8d356..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/androidTest/java/com/example/brzodolokacije/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.example.brzodolokacije - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.example.brzodolokacije", appContext.packageName) - } -} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml b/demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml deleted file mode 100644 index 1dff3df..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt b/demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt deleted file mode 100644 index 03d6236..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/MainActivity.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.example.brzodolokacije - -import androidx.appcompat.app.AppCompatActivity -import android.os.Bundle - -class MainActivity : AppCompatActivity() { - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(R.layout.activity_main) - } -} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 2b068d1..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml deleted file mode 100644 index 17eab17..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/layout/activity_main.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index eca70cf..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index eca70cf..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp deleted file mode 100644 index c209e78..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp deleted file mode 100644 index b2dfe3d..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp deleted file mode 100644 index 4f0f1d6..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp deleted file mode 100644 index 62b611d..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp deleted file mode 100644 index 948a307..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp deleted file mode 100644 index 1b9a695..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp deleted file mode 100644 index 28d4b77..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9287f50..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp deleted file mode 100644 index aa7d642..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp deleted file mode 100644 index 9126ae3..0000000 Binary files a/demoProjekat/BrzoDoLokacije/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml deleted file mode 100644 index ccad389..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/values-night/themes.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml deleted file mode 100644 index f8c6127..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml deleted file mode 100644 index 21bd63c..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - BrzoDoLokacije - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml deleted file mode 100644 index 323d3da..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/values/themes.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml deleted file mode 100644 index fa0f996..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/backup_rules.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml b/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml deleted file mode 100644 index 9ee9997..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/main/res/xml/data_extraction_rules.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt b/demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt deleted file mode 100644 index 3bc92cd..0000000 --- a/demoProjekat/BrzoDoLokacije/app/src/test/java/com/example/brzodolokacije/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.example.brzodolokacije - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/build.gradle b/demoProjekat/BrzoDoLokacije/build.gradle deleted file mode 100644 index c518bc1..0000000 --- a/demoProjekat/BrzoDoLokacije/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -plugins { - id 'com.android.application' version '7.3.0' apply false - id 'com.android.library' version '7.3.0' apply false - id 'org.jetbrains.kotlin.android' version '1.7.10' apply false -} \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/gradle.properties b/demoProjekat/BrzoDoLokacije/gradle.properties deleted file mode 100644 index 3c5031e..0000000 --- a/demoProjekat/BrzoDoLokacije/gradle.properties +++ /dev/null @@ -1,23 +0,0 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true \ No newline at end of file diff --git a/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar b/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index e708b1c..0000000 Binary files a/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties b/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2a5837b..0000000 --- a/demoProjekat/BrzoDoLokacije/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Wed Oct 26 22:36:41 CEST 2022 -distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip -distributionPath=wrapper/dists -zipStorePath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME diff --git a/demoProjekat/BrzoDoLokacije/gradlew b/demoProjekat/BrzoDoLokacije/gradlew deleted file mode 100644 index 4f906e0..0000000 --- a/demoProjekat/BrzoDoLokacije/gradlew +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/demoProjekat/BrzoDoLokacije/gradlew.bat b/demoProjekat/BrzoDoLokacije/gradlew.bat deleted file mode 100644 index 107acd3..0000000 --- a/demoProjekat/BrzoDoLokacije/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/demoProjekat/BrzoDoLokacije/settings.gradle b/demoProjekat/BrzoDoLokacije/settings.gradle deleted file mode 100644 index dc8bcc0..0000000 --- a/demoProjekat/BrzoDoLokacije/settings.gradle +++ /dev/null @@ -1,16 +0,0 @@ -pluginManagement { - repositories { - gradlePluginPortal() - google() - mavenCentral() - } -} -dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) - repositories { - google() - mavenCentral() - } -} -rootProject.name = "BrzoDoLokacije" -include ':app' -- cgit v1.2.3 From 426dcd9403192b7e7f40ad01bafb57f7e4f9071f Mon Sep 17 00:00:00 2001 From: Jelena Petrovic Date: Thu, 27 Oct 2022 01:15:21 +0200 Subject: omogucena komunikacija sa bazom #4 --- Backend/Api/Api/Api.csproj | 3 +-- Backend/Api/Api/Database/DatabaseConnection.cs | 10 ++++++++++ Backend/Api/Api/Interfaces/IDatabaseConnection.cs | 8 ++++++++ Backend/Api/Api/Program.cs | 14 ++++++++++++++ Backend/Api/Api/appsettings.json | 8 +++++++- 5 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 Backend/Api/Api/Database/DatabaseConnection.cs create mode 100644 Backend/Api/Api/Interfaces/IDatabaseConnection.cs diff --git a/Backend/Api/Api/Api.csproj b/Backend/Api/Api/Api.csproj index 8732b1d..f8d2732 100644 --- a/Backend/Api/Api/Api.csproj +++ b/Backend/Api/Api/Api.csproj @@ -7,14 +7,13 @@ + - - diff --git a/Backend/Api/Api/Database/DatabaseConnection.cs b/Backend/Api/Api/Database/DatabaseConnection.cs new file mode 100644 index 0000000..560eaee --- /dev/null +++ b/Backend/Api/Api/Database/DatabaseConnection.cs @@ -0,0 +1,10 @@ +using Api.Interfaces; + +namespace Api.Database +{ + public class DatabaseConnection : IDatabaseConnection + { + public string ConnectionString { get; set; } = String.Empty; + public string DatabaseName { get; set; } = String.Empty; + } +} diff --git a/Backend/Api/Api/Interfaces/IDatabaseConnection.cs b/Backend/Api/Api/Interfaces/IDatabaseConnection.cs new file mode 100644 index 0000000..ca5e320 --- /dev/null +++ b/Backend/Api/Api/Interfaces/IDatabaseConnection.cs @@ -0,0 +1,8 @@ +namespace Api.Interfaces +{ + public interface IDatabaseConnection + { + string ConnectionString { get; set; } + string DatabaseName { get; set; } + } +} diff --git a/Backend/Api/Api/Program.cs b/Backend/Api/Api/Program.cs index df2434c..2dfd84d 100644 --- a/Backend/Api/Api/Program.cs +++ b/Backend/Api/Api/Program.cs @@ -1,7 +1,21 @@ +using Api.Database; +using Api.Interfaces; +using Microsoft.Extensions.Options; +using MongoDB.Driver; + var builder = WebApplication.CreateBuilder(args); // Add services to the container. +builder.Services.Configure( + builder.Configuration.GetSection("DatabaseSettings")); + +builder.Services.AddSingleton(sp => + sp.GetRequiredService>().Value); + +builder.Services.AddSingleton(s => + new MongoClient(builder.Configuration.GetValue("DatabaseSettings:ConnectionString"))); + builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); diff --git a/Backend/Api/Api/appsettings.json b/Backend/Api/Api/appsettings.json index 10f68b8..c2cbe28 100644 --- a/Backend/Api/Api/appsettings.json +++ b/Backend/Api/Api/appsettings.json @@ -5,5 +5,11 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "DatabaseSettings": { + + "ConnectionString": "mongodb://127.0.0.1:27017/", + "DatabaseName": "Odyssey" + + } } -- cgit v1.2.3 From 9f4a1d3f03848a86c12b0f758b525ff62e76e680 Mon Sep 17 00:00:00 2001 From: Jelena Petrovic Date: Thu, 27 Oct 2022 02:40:28 +0200 Subject: dodat model i servis za korisnike, sa osnovnim operacijama #5 --- Backend/Api/Api/Api.csproj | 2 - Backend/Api/Api/Database/DatabaseConnection.cs | 1 + Backend/Api/Api/Interfaces/IDatabaseConnection.cs | 1 + Backend/Api/Api/Interfaces/IUserService.cs | 14 ++++++ Backend/Api/Api/Models/User.cs | 17 +++++++ Backend/Api/Api/Program.cs | 3 ++ Backend/Api/Api/Services/UserService.cs | 58 +++++++++++++++++++++++ Backend/Api/Api/appsettings.json | 3 +- 8 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 Backend/Api/Api/Interfaces/IUserService.cs create mode 100644 Backend/Api/Api/Models/User.cs create mode 100644 Backend/Api/Api/Services/UserService.cs diff --git a/Backend/Api/Api/Api.csproj b/Backend/Api/Api/Api.csproj index f8d2732..eeacb93 100644 --- a/Backend/Api/Api/Api.csproj +++ b/Backend/Api/Api/Api.csproj @@ -13,8 +13,6 @@ - - diff --git a/Backend/Api/Api/Database/DatabaseConnection.cs b/Backend/Api/Api/Database/DatabaseConnection.cs index 560eaee..65f4f52 100644 --- a/Backend/Api/Api/Database/DatabaseConnection.cs +++ b/Backend/Api/Api/Database/DatabaseConnection.cs @@ -6,5 +6,6 @@ namespace Api.Database { public string ConnectionString { get; set; } = String.Empty; public string DatabaseName { get; set; } = String.Empty; + public string UserCollectionName { get; set; } = String.Empty; } } diff --git a/Backend/Api/Api/Interfaces/IDatabaseConnection.cs b/Backend/Api/Api/Interfaces/IDatabaseConnection.cs index ca5e320..8938127 100644 --- a/Backend/Api/Api/Interfaces/IDatabaseConnection.cs +++ b/Backend/Api/Api/Interfaces/IDatabaseConnection.cs @@ -4,5 +4,6 @@ { string ConnectionString { get; set; } string DatabaseName { get; set; } + string UserCollectionName { get; set; } } } diff --git a/Backend/Api/Api/Interfaces/IUserService.cs b/Backend/Api/Api/Interfaces/IUserService.cs new file mode 100644 index 0000000..6de648e --- /dev/null +++ b/Backend/Api/Api/Interfaces/IUserService.cs @@ -0,0 +1,14 @@ +using Api.Models; + +namespace Api.Interfaces +{ + public interface IUserService + { + User createUser(User user); + List getUsers(); + User getUserByEmail(String email); + User getUserByUsername(String username); + User updateUser(User user); + Boolean deleteUser(String email); + } +} diff --git a/Backend/Api/Api/Models/User.cs b/Backend/Api/Api/Models/User.cs new file mode 100644 index 0000000..eb7d1e8 --- /dev/null +++ b/Backend/Api/Api/Models/User.cs @@ -0,0 +1,17 @@ +using MongoDB.Bson; +using MongoDB.Bson.Serialization.Attributes; + +namespace Api.Models +{ + public class User + { + [BsonId] + [BsonRepresentation(BsonType.ObjectId)] + public String _id { get; set; } + public String name { get; set; } + public String username { get; set; } + public String email { get; set; } + public String password { get; set; } + public DateTime creationDate { get; set; } + } +} diff --git a/Backend/Api/Api/Program.cs b/Backend/Api/Api/Program.cs index 2dfd84d..7ae8798 100644 --- a/Backend/Api/Api/Program.cs +++ b/Backend/Api/Api/Program.cs @@ -1,5 +1,6 @@ using Api.Database; using Api.Interfaces; +using Api.Services; using Microsoft.Extensions.Options; using MongoDB.Driver; @@ -16,6 +17,8 @@ builder.Services.AddSingleton(sp => builder.Services.AddSingleton(s => new MongoClient(builder.Configuration.GetValue("DatabaseSettings:ConnectionString"))); +builder.Services.AddScoped(); + builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); diff --git a/Backend/Api/Api/Services/UserService.cs b/Backend/Api/Api/Services/UserService.cs new file mode 100644 index 0000000..787cf6a --- /dev/null +++ b/Backend/Api/Api/Services/UserService.cs @@ -0,0 +1,58 @@ +using Api.Interfaces; +using Api.Models; +using MongoDB.Driver; + +namespace Api.Services +{ + public class UserService : IUserService + { + private readonly IMongoCollection _users; + public UserService(IDatabaseConnection settings, IMongoClient mongoClient) + { + var database = mongoClient.GetDatabase(settings.DatabaseName); + _users = database.GetCollection(settings.UserCollectionName); + + } + + public User createUser(User user) + { + _users.InsertOne(user); + return user; + } + + public bool deleteUser(string email) + { + _users.FindOneAndDelete(x => x.email == email); + return true; + } + + public User getUserByEmail(string email) + { + return _users.Find(x => x.email == email).First(); + } + + public User getUserByUsername(string username) + { + return _users.Find(x => x.username == username).First(); + } + + public List getUsers() + { + return _users.Find(_=>true).ToList(); + } + + public User updateUser(User user) + { + /* + * ovako je odradjeno da bi radilo i kada se posalje potpuno novi objekat User-a bez generisanog _id polja + */ + User foundUser = _users.Find(x => x.email == user.email).First(); + if (foundUser!=null && user._id==null) + { + user._id = foundUser._id; + } + _users.ReplaceOne(x => x.email == user.email, user); + return user; + } + } +} diff --git a/Backend/Api/Api/appsettings.json b/Backend/Api/Api/appsettings.json index c2cbe28..e02ac8d 100644 --- a/Backend/Api/Api/appsettings.json +++ b/Backend/Api/Api/appsettings.json @@ -9,7 +9,8 @@ "DatabaseSettings": { "ConnectionString": "mongodb://127.0.0.1:27017/", - "DatabaseName": "Odyssey" + "DatabaseName": "Odyssey", + "UserCollectionName": "users" } } -- cgit v1.2.3 From 6affb21703f9b27f328d18ec0af335d139b52803 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Thu, 27 Oct 2022 14:54:05 +0200 Subject: Dodata ikonica aplikacije i izmenjen naziv. --- .../app/src/debug/ic_launcher-playstore.png | Bin 0 -> 130128 bytes .../src/debug/res/mipmap-anydpi-v26/ic_launcher.xml | 5 +++++ .../debug/res/mipmap-anydpi-v26/ic_launcher_round.xml | 5 +++++ .../app/src/debug/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 5480 bytes .../debug/res/mipmap-hdpi/ic_launcher_background.png | Bin 0 -> 14755 bytes .../debug/res/mipmap-hdpi/ic_launcher_foreground.png | Bin 0 -> 9031 bytes .../src/debug/res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 7975 bytes .../app/src/debug/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 3178 bytes .../debug/res/mipmap-mdpi/ic_launcher_background.png | Bin 0 -> 5931 bytes .../debug/res/mipmap-mdpi/ic_launcher_foreground.png | Bin 0 -> 5018 bytes .../src/debug/res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 4396 bytes .../app/src/debug/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 8641 bytes .../debug/res/mipmap-xhdpi/ic_launcher_background.png | Bin 0 -> 24611 bytes .../debug/res/mipmap-xhdpi/ic_launcher_foreground.png | Bin 0 -> 13685 bytes .../src/debug/res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 12343 bytes .../app/src/debug/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 16650 bytes .../debug/res/mipmap-xxhdpi/ic_launcher_background.png | Bin 0 -> 40844 bytes .../debug/res/mipmap-xxhdpi/ic_launcher_foreground.png | Bin 0 -> 23889 bytes .../src/debug/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 22822 bytes .../app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 26118 bytes .../res/mipmap-xxxhdpi/ic_launcher_background.png | Bin 0 -> 49540 bytes .../res/mipmap-xxxhdpi/ic_launcher_foreground.png | Bin 0 -> 35867 bytes .../src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 34872 bytes .../app/src/main/res/values-night/themes.xml | 6 +++--- .../BrzoDoLokacije/app/src/main/res/values/strings.xml | 2 +- 25 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 Client/BrzoDoLokacije/app/src/debug/ic_launcher-playstore.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_background.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_background.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_background.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_background.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_background.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png create mode 100644 Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png diff --git a/Client/BrzoDoLokacije/app/src/debug/ic_launcher-playstore.png b/Client/BrzoDoLokacije/app/src/debug/ic_launcher-playstore.png new file mode 100644 index 0000000..3e623b5 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/ic_launcher-playstore.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 0000000..4ae7d12 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 0000000..4ae7d12 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..3ab4acb Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_background.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 0000000..a8a6cb9 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..ce57665 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..54c4f06 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..4dfe37c Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_background.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 0000000..4465788 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..2093171 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..e394809 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..960bf6a Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_background.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 0000000..1934227 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..bc70fc1 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..6508da3 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..73df669 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_background.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..b2edcde Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..920c97d Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..7c5c954 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..8a1b252 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_background.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000..09cca42 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 0000000..2452c55 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..bc9a0c6 Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml b/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml index ccad389..2fa4285 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/values-night/themes.xml @@ -4,13 +4,13 @@ @color/purple_200 @color/purple_700 - @color/black + #071935 @color/teal_200 @color/teal_200 - @color/black + #071935 - ?attr/colorPrimaryVariant + #143257 \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml b/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml index 21bd63c..bd12106 100644 --- a/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml +++ b/Client/BrzoDoLokacije/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - BrzoDoLokacije + Brzo Do Lokacije \ No newline at end of file -- cgit v1.2.3 From 5c6aa06e09348b2c1d0ad50ba94f22bdfb13c5f8 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Thu, 27 Oct 2022 15:01:37 +0200 Subject: Dodati logo tima i logo aplikacije. --- Logo/logoaplikacije.png | Bin 0 -> 136299 bytes Logo/logoaplikacije1000dpi.png | Bin 0 -> 369502 bytes Logo/logotima.png | Bin 0 -> 377184 bytes Logo/logotima1000dpi.png | Bin 0 -> 1175374 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Logo/logoaplikacije.png create mode 100644 Logo/logoaplikacije1000dpi.png create mode 100644 Logo/logotima.png create mode 100644 Logo/logotima1000dpi.png diff --git a/Logo/logoaplikacije.png b/Logo/logoaplikacije.png new file mode 100644 index 0000000..d20cb6e Binary files /dev/null and b/Logo/logoaplikacije.png differ diff --git a/Logo/logoaplikacije1000dpi.png b/Logo/logoaplikacije1000dpi.png new file mode 100644 index 0000000..cdeada6 Binary files /dev/null and b/Logo/logoaplikacije1000dpi.png differ diff --git a/Logo/logotima.png b/Logo/logotima.png new file mode 100644 index 0000000..85137ac Binary files /dev/null and b/Logo/logotima.png differ diff --git a/Logo/logotima1000dpi.png b/Logo/logotima1000dpi.png new file mode 100644 index 0000000..dc9481b Binary files /dev/null and b/Logo/logotima1000dpi.png differ -- cgit v1.2.3 From 0882a4220556bdc271117b88098f51494055d847 Mon Sep 17 00:00:00 2001 From: Jelena Petrovic Date: Thu, 27 Oct 2022 16:45:11 +0200 Subject: prepravljene operacije tako da budu asinhrone #5 --- Backend/Api/Api/Interfaces/IUserService.cs | 12 +++++----- Backend/Api/Api/Services/UserService.cs | 37 ++++++++++++++++-------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Backend/Api/Api/Interfaces/IUserService.cs b/Backend/Api/Api/Interfaces/IUserService.cs index 6de648e..63fbd18 100644 --- a/Backend/Api/Api/Interfaces/IUserService.cs +++ b/Backend/Api/Api/Interfaces/IUserService.cs @@ -4,11 +4,11 @@ namespace Api.Interfaces { public interface IUserService { - User createUser(User user); - List getUsers(); - User getUserByEmail(String email); - User getUserByUsername(String username); - User updateUser(User user); - Boolean deleteUser(String email); + Task createUser(User user); + Task> getUsers(); + Task getUserByEmail(String email); + Task getUserByUsername(String username); + Task updateUser(User user); + Task deleteUser(String email); } } diff --git a/Backend/Api/Api/Services/UserService.cs b/Backend/Api/Api/Services/UserService.cs index 787cf6a..264085c 100644 --- a/Backend/Api/Api/Services/UserService.cs +++ b/Backend/Api/Api/Services/UserService.cs @@ -14,45 +14,48 @@ namespace Api.Services } - public User createUser(User user) + public async Task createUser(User user) { - _users.InsertOne(user); - return user; + await _users.InsertOneAsync(user); + } - public bool deleteUser(string email) + public async Task deleteUser(string email) { - _users.FindOneAndDelete(x => x.email == email); - return true; + return await _users.FindOneAndDeleteAsync(x => x.email == email); } - public User getUserByEmail(string email) + public async Task getUserByEmail(string email) { - return _users.Find(x => x.email == email).First(); + return await _users.Find(x => x.email == email).SingleAsync(); } - public User getUserByUsername(string username) + public async Task getUserByUsername(string username) { - return _users.Find(x => x.username == username).First(); + return await _users.Find(x => x.username == username).SingleAsync(); } - public List getUsers() + public async Task> getUsers() { - return _users.Find(_=>true).ToList(); + return await _users.Find(_=>true).ToListAsync(); } - public User updateUser(User user) + public async Task updateUser(User user) { - /* + /* vraca broj izmenjenih korisnika * ovako je odradjeno da bi radilo i kada se posalje potpuno novi objekat User-a bez generisanog _id polja */ - User foundUser = _users.Find(x => x.email == user.email).First(); + User foundUser = await _users.Find(x => x.email == user.email).SingleAsync(); if (foundUser!=null && user._id==null) { user._id = foundUser._id; } - _users.ReplaceOne(x => x.email == user.email, user); - return user; + ReplaceOneResult res=await _users.ReplaceOneAsync(x => x.email == user.email, user); + if(res.IsAcknowledged) + return res.ModifiedCount; + return 0; } + + } } -- cgit v1.2.3 From e24cede22468991ad8452fbf1eec139e1b5ff886 Mon Sep 17 00:00:00 2001 From: Ognjen Cirkovic Date: Thu, 27 Oct 2022 21:09:08 +0200 Subject: Napravljen servis za generisanje jwt tokena. Omoguceno koriscenje autentikacija. --- Backend/Api/Api/Api.csproj | 2 ++ Backend/Api/Api/Interfaces/IJwtService.cs | 9 ++++++++ Backend/Api/Api/Program.cs | 24 +++++++++++++++++++++ Backend/Api/Api/Services/JwtService.cs | 35 +++++++++++++++++++++++++++++++ Backend/Api/Api/appsettings.json | 28 ++++++++++++++----------- 5 files changed, 86 insertions(+), 12 deletions(-) create mode 100644 Backend/Api/Api/Interfaces/IJwtService.cs create mode 100644 Backend/Api/Api/Services/JwtService.cs diff --git a/Backend/Api/Api/Api.csproj b/Backend/Api/Api/Api.csproj index eeacb93..5f63f8e 100644 --- a/Backend/Api/Api/Api.csproj +++ b/Backend/Api/Api/Api.csproj @@ -7,8 +7,10 @@ + + diff --git a/Backend/Api/Api/Interfaces/IJwtService.cs b/Backend/Api/Api/Interfaces/IJwtService.cs new file mode 100644 index 0000000..075ea6c --- /dev/null +++ b/Backend/Api/Api/Interfaces/IJwtService.cs @@ -0,0 +1,9 @@ +using Api.Models; + +namespace Api.Interfaces +{ + public interface IJwtService + { + Task GenToken(User user); + } +} \ No newline at end of file diff --git a/Backend/Api/Api/Program.cs b/Backend/Api/Api/Program.cs index 7ae8798..2c2a444 100644 --- a/Backend/Api/Api/Program.cs +++ b/Backend/Api/Api/Program.cs @@ -1,7 +1,10 @@ +using System.Text; using Api.Database; using Api.Interfaces; using Api.Services; +using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.Extensions.Options; +using Microsoft.IdentityModel.Tokens; using MongoDB.Driver; var builder = WebApplication.CreateBuilder(args); @@ -19,6 +22,24 @@ builder.Services.AddSingleton(s => builder.Services.AddScoped(); + + + +//Add Authentication +builder.Services.AddAuthentication( + JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(options => { + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateIssuerSigningKey = true, + IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(builder.Configuration.GetSection("AppSettings:JwtToken").Value)), + ValidateIssuer = false, + ValidateAudience = false + }; + + }); + + + builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); @@ -35,6 +56,9 @@ if (app.Environment.IsDevelopment()) app.UseAuthorization(); +//Add Authentication +app.UseAuthentication(); + app.MapControllers(); app.Run(); diff --git a/Backend/Api/Api/Services/JwtService.cs b/Backend/Api/Api/Services/JwtService.cs new file mode 100644 index 0000000..0700619 --- /dev/null +++ b/Backend/Api/Api/Services/JwtService.cs @@ -0,0 +1,35 @@ +using System.Data; +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; +using System.Xml.Linq; +using Api.Interfaces; +using Api.Models; +using Microsoft.Extensions.Configuration; +using Microsoft.IdentityModel.Tokens; + +namespace Api.Services +{ + public class JwtService : IJwtService + { + private readonly IConfiguration _config; + public JwtService(IConfiguration config) + { + _config = config; + } + + public async Task GenToken(User user) + { + var tokenHandler = new JwtSecurityTokenHandler(); + var key = Encoding.ASCII.GetBytes(_config.GetSection("AppSettings:JwtToken").Value); + var tokenDescriptor = new SecurityTokenDescriptor + { + Subject = new ClaimsIdentity(new[] { new Claim("id", user._id) }), + Expires = DateTime.UtcNow.AddDays(7), + SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature) + }; + var token = tokenHandler.CreateToken(tokenDescriptor); + return tokenHandler.WriteToken(token); + } + } +} diff --git a/Backend/Api/Api/appsettings.json b/Backend/Api/Api/appsettings.json index e02ac8d..7cc504d 100644 --- a/Backend/Api/Api/appsettings.json +++ b/Backend/Api/Api/appsettings.json @@ -1,16 +1,20 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*", - "DatabaseSettings": { + "AppSettings": { + "JwtToken": "PjrVqQJ1P2VOkuWLw7NaZUluT4z7bkau" + }, + + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "DatabaseSettings": { - "ConnectionString": "mongodb://127.0.0.1:27017/", - "DatabaseName": "Odyssey", - "UserCollectionName": "users" + "ConnectionString": "mongodb://127.0.0.1:27017/", + "DatabaseName": "Odyssey", + "UserCollectionName": "users" - } + } } -- cgit v1.2.3 From 8bfb37503f6af6dac4bf067337d851cedace1c67 Mon Sep 17 00:00:00 2001 From: Ognjen Cirkovic Date: Thu, 27 Oct 2022 21:36:34 +0200 Subject: Omoguceno refreshovanje tokena. Dodata mogucnost da se iz jwt-a izvuce id korisnika. --- Backend/Api/Api/Interfaces/IJwtService.cs | 3 +++ Backend/Api/Api/Interfaces/IUserService.cs | 1 + Backend/Api/Api/Program.cs | 1 + Backend/Api/Api/Services/JwtService.cs | 40 +++++++++++++++++++++++++++++- Backend/Api/Api/Services/UserService.cs | 6 +++++ 5 files changed, 50 insertions(+), 1 deletion(-) diff --git a/Backend/Api/Api/Interfaces/IJwtService.cs b/Backend/Api/Api/Interfaces/IJwtService.cs index 075ea6c..35f5843 100644 --- a/Backend/Api/Api/Interfaces/IJwtService.cs +++ b/Backend/Api/Api/Interfaces/IJwtService.cs @@ -5,5 +5,8 @@ namespace Api.Interfaces public interface IJwtService { Task GenToken(User user); + Task TokenToId(string token); + Task RenewToken(string existingToken); + } } \ No newline at end of file diff --git a/Backend/Api/Api/Interfaces/IUserService.cs b/Backend/Api/Api/Interfaces/IUserService.cs index 63fbd18..8b6f6fc 100644 --- a/Backend/Api/Api/Interfaces/IUserService.cs +++ b/Backend/Api/Api/Interfaces/IUserService.cs @@ -10,5 +10,6 @@ namespace Api.Interfaces Task getUserByUsername(String username); Task updateUser(User user); Task deleteUser(String email); + Task getUserById(string id); } } diff --git a/Backend/Api/Api/Program.cs b/Backend/Api/Api/Program.cs index 2c2a444..1059a82 100644 --- a/Backend/Api/Api/Program.cs +++ b/Backend/Api/Api/Program.cs @@ -21,6 +21,7 @@ builder.Services.AddSingleton(s => new MongoClient(builder.Configuration.GetValue("DatabaseSettings:ConnectionString"))); builder.Services.AddScoped(); +builder.Services.AddScoped(); diff --git a/Backend/Api/Api/Services/JwtService.cs b/Backend/Api/Api/Services/JwtService.cs index 0700619..a10f093 100644 --- a/Backend/Api/Api/Services/JwtService.cs +++ b/Backend/Api/Api/Services/JwtService.cs @@ -13,9 +13,11 @@ namespace Api.Services public class JwtService : IJwtService { private readonly IConfiguration _config; - public JwtService(IConfiguration config) + private readonly IUserService _userService; + public JwtService(IConfiguration config,IUserService userService) { _config = config; + _userService = userService; } public async Task GenToken(User user) @@ -31,5 +33,41 @@ namespace Api.Services var token = tokenHandler.CreateToken(tokenDescriptor); return tokenHandler.WriteToken(token); } + public async Task TokenToId(string token) + { + if (token == null) + return null; + var tokenHandler = new JwtSecurityTokenHandler(); + var key = Encoding.ASCII.GetBytes(_config.GetSection("AppSettings:JwtToken").Value); + try + { + tokenHandler.ValidateToken(token, new TokenValidationParameters + { + ValidateIssuerSigningKey = true, + IssuerSigningKey = new SymmetricSecurityKey(key), + ValidateIssuer = false, + ValidateAudience = false, + }, out SecurityToken validatedToken); + + var jwtToken = (JwtSecurityToken)validatedToken; + return jwtToken.Claims.First(x => x.Type == "id").Value; + } + catch + { + return null; + } + + } + + public async Task RenewToken(string existingToken) + { + var id = await TokenToId(existingToken); + if (id == null) + return null; + var user = await _userService.getUserById(id); + + return await GenToken(user); + + } } } diff --git a/Backend/Api/Api/Services/UserService.cs b/Backend/Api/Api/Services/UserService.cs index 264085c..40cc507 100644 --- a/Backend/Api/Api/Services/UserService.cs +++ b/Backend/Api/Api/Services/UserService.cs @@ -40,6 +40,12 @@ namespace Api.Services return await _users.Find(_=>true).ToListAsync(); } + public async Task getUserById(string id) + { + return await _users.Find(user => user._id == id).SingleAsync(); + + } + public async Task updateUser(User user) { /* vraca broj izmenjenih korisnika -- cgit v1.2.3 From cf00223fbf339757b3f1e5de144147eba9af3fa2 Mon Sep 17 00:00:00 2001 From: "branislav.radivojevic" Date: Thu, 27 Oct 2022 21:56:12 +0200 Subject: cors,auth controller,register --- Backend/Api/Api/Api.csproj | 4 --- Backend/Api/Api/Controllers/AuthController.cs | 36 +++++++++++++++++++++++++++ Backend/Api/Api/Interfaces/IUserService.cs | 2 +- Backend/Api/Api/Models/User.cs | 14 +++++++++++ Backend/Api/Api/Program.cs | 11 ++++++++ Backend/Api/Api/Services/UserService.cs | 9 +++++-- 6 files changed, 69 insertions(+), 7 deletions(-) create mode 100644 Backend/Api/Api/Controllers/AuthController.cs diff --git a/Backend/Api/Api/Api.csproj b/Backend/Api/Api/Api.csproj index eeacb93..91e0755 100644 --- a/Backend/Api/Api/Api.csproj +++ b/Backend/Api/Api/Api.csproj @@ -11,8 +11,4 @@ - - - - diff --git a/Backend/Api/Api/Controllers/AuthController.cs b/Backend/Api/Api/Controllers/AuthController.cs new file mode 100644 index 0000000..b75bd6d --- /dev/null +++ b/Backend/Api/Api/Controllers/AuthController.cs @@ -0,0 +1,36 @@ +using Api.Interfaces; +using Api.Models; +using Microsoft.AspNetCore.Mvc; + +namespace Api.Controllers +{ + [Route("api/auth/")] + public class AuthController : Controller + { + private readonly IUserService _userService; + public AuthController(IUserService userService) + { + _userService = userService; + } + + public async Task> Register([FromBody] Register creds) + { + //this is beyond scuffed and will be cleaned up later, when users,login and controllers are made + User novi = new User(); + novi.email = creds.email; + novi.password = creds.password; + novi.username = creds.username; + novi.name = creds.name; + novi.creationDate = DateTime.Now; + novi._id = ""; + + int ret= await _userService.createUser(novi); + if (ret == -1) + return BadRequest("email already exists"); + if (ret == -2) + return BadRequest("username already exists"); + + return Ok(); + } + } +} diff --git a/Backend/Api/Api/Interfaces/IUserService.cs b/Backend/Api/Api/Interfaces/IUserService.cs index 63fbd18..a2fa0a1 100644 --- a/Backend/Api/Api/Interfaces/IUserService.cs +++ b/Backend/Api/Api/Interfaces/IUserService.cs @@ -4,7 +4,7 @@ namespace Api.Interfaces { public interface IUserService { - Task createUser(User user); + Task createUser(User user); Task> getUsers(); Task getUserByEmail(String email); Task getUserByUsername(String username); diff --git a/Backend/Api/Api/Models/User.cs b/Backend/Api/Api/Models/User.cs index eb7d1e8..1d351d1 100644 --- a/Backend/Api/Api/Models/User.cs +++ b/Backend/Api/Api/Models/User.cs @@ -14,4 +14,18 @@ namespace Api.Models public String password { get; set; } public DateTime creationDate { get; set; } } + + public class Login + { + public String email { get; set; } + public String password { get; set; } + } + + public class Register + { + public String name { get; set; } + public String username { get; set; } + public String email { get; set; } + public String password { get; set; } + } } diff --git a/Backend/Api/Api/Program.cs b/Backend/Api/Api/Program.cs index 7ae8798..d00f39f 100644 --- a/Backend/Api/Api/Program.cs +++ b/Backend/Api/Api/Program.cs @@ -24,6 +24,17 @@ builder.Services.AddControllers(); builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); +builder.Services.AddCors(options => +{ + options.AddPolicy("CorsPolicy", + builder => + builder + .AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader() + .AllowCredentials()); +}); + var app = builder.Build(); // Configure the HTTP request pipeline. diff --git a/Backend/Api/Api/Services/UserService.cs b/Backend/Api/Api/Services/UserService.cs index 264085c..fc582b5 100644 --- a/Backend/Api/Api/Services/UserService.cs +++ b/Backend/Api/Api/Services/UserService.cs @@ -14,10 +14,15 @@ namespace Api.Services } - public async Task createUser(User user) + public async Task createUser(User user) { - await _users.InsertOneAsync(user); + if (await _users.Find(x => x.email == user.email).FirstOrDefaultAsync() != null) + return -1; //email already exists + if (await _users.Find(x => x.username == user.username).FirstOrDefaultAsync() != null) + return -2; //username already exists + await _users.InsertOneAsync(user); + return 1; } public async Task deleteUser(string email) -- cgit v1.2.3 From 3193cbe98f170f5ce46d20139e77bc8113b98d70 Mon Sep 17 00:00:00 2001 From: "branislav.radivojevic" Date: Thu, 27 Oct 2022 22:01:02 +0200 Subject: controller path --- Backend/Api/Api/Controllers/AuthController.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Backend/Api/Api/Controllers/AuthController.cs b/Backend/Api/Api/Controllers/AuthController.cs index b75bd6d..456abd9 100644 --- a/Backend/Api/Api/Controllers/AuthController.cs +++ b/Backend/Api/Api/Controllers/AuthController.cs @@ -13,6 +13,7 @@ namespace Api.Controllers _userService = userService; } + [HttpPost("register")] public async Task> Register([FromBody] Register creds) { //this is beyond scuffed and will be cleaned up later, when users,login and controllers are made -- cgit v1.2.3 From a483bfa93cc8e313fa6bde028828f1b132d30a35 Mon Sep 17 00:00:00 2001 From: TAMARA JERINIC Date: Fri, 28 Oct 2022 11:58:38 +0200 Subject: Dodati fragmenti za login i registraciju. Dodate neke grafičke komponente. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Activities/ActivityLoginRegister.kt | 12 ++ .../brzodolokacije/Fragments/FragmentLogin.kt | 107 ++++++++++++++ .../brzodolokacije/Fragments/FragmentRegister.kt | 110 +++++++++++++++ .../app/src/main/res/drawable/b3.jpg | Bin 0 -> 6089791 bytes .../src/main/res/drawable/rounded_cyan_button.xml | 5 + .../res/drawable/rounded_white_button_login.xml | 16 +++ .../main/res/drawable/switch_login_register_on.xml | 6 + .../main/res/layout/activity_login_register.xml | 28 ++++ .../app/src/main/res/layout/fragment_login.xml | 92 ++++++++++++ .../app/src/main/res/layout/fragment_register.xml | 154 +++++++++++++++++++++ .../app/src/main/res/values-night/themes.xml | 2 +- .../app/src/main/res/values/colors.xml | 4 +- .../app/src/main/res/values/strings.xml | 3 + 13 files changed, 536 insertions(+), 3 deletions(-) create mode 100644 Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt create mode 100644 Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentLogin.kt create mode 100644 Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentRegister.kt create mode 100644 Client/BrzoDoLokacije/app/src/main/res/drawable/b3.jpg create mode 100644 Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_cyan_button.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/drawable/switch_login_register_on.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml create mode 100644 Client/BrzoDoLokacije/app/src/main/res/layout/fragment_register.xml diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt new file mode 100644 index 0000000..fdfd0e2 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Activities/ActivityLoginRegister.kt @@ -0,0 +1,12 @@ +package com.example.brzodolokacije.Activities + +import androidx.appcompat.app.AppCompatActivity +import android.os.Bundle +import com.example.brzodolokacije.R + +class ActivityLoginRegister : AppCompatActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.activity_login_register) + } +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentLogin.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentLogin.kt new file mode 100644 index 0000000..d47a16e --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentLogin.kt @@ -0,0 +1,107 @@ +package com.example.brzodolokacije.Fragments + +import android.graphics.Color +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Button +import android.widget.EditText +import android.widget.TextView +import android.widget.Toast +import com.example.brzodolokacije.R + + +class FragmentLogin : Fragment() { + // TODO: Rename and change types of parameters + private lateinit var password: EditText + private lateinit var email: EditText + private lateinit var forgottenPassword: TextView + private lateinit var login: Button + private lateinit var passwordString:String + private lateinit var emailString:String + + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + + } + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + val view:View=inflater.inflate(R.layout.fragment_login, container, false) + + + email = view.findViewById(R.id.etFragmentLoginEmail) as EditText + password = view.findViewById(R.id.etFragmentLoginPassword) as EditText + forgottenPassword = view.findViewById(R.id.tvFragmentLoginForgottenPassword) as TextView + login=view.findViewById(R.id.btnFragmentLoginLogin) as Button + + //osluskivanje unosa + + login.setOnClickListener{ + emailString=email.text.toString().trim() + passwordString=password.text.toString().trim() + + //prazan unos? + if(emailString.isEmpty()) + { + email.hint="Unesite Email adresu" + email.setHintTextColor(Color.RED) + } + if(passwordString.isEmpty()) + { + password.hint = "Unesite lozinku" + password.setHintTextColor(Color.RED) + } + if(!emailString.isEmpty() && !passwordString.isEmpty()) { + + + //proveri da li postoji u bazi + + //UPIT BAZI - ako postoji - idi na pocetnu stranu za logovanog + + + //UPIT BAZI - ako ne postoji ili je pogresan unos - ispisi poruku + + //DODATI da li postoji korisnicko ime i da li je tacna lozinka + + Toast.makeText( + activity, "Korisnik sa unetim podacima nije pronađen. " + "\n" + + "Proverite podatke i pokušajte ponovo", Toast.LENGTH_LONG + ).show(); + + } + } + + + return view + + } +/* + companion object { + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment fragmentLogin. + */ + // TODO: Rename and change types and number of parameters + @JvmStatic + fun newInstance(param1: String, param2: String) = + fragmentLogin().apply { + arguments = Bundle().apply { + putString(ARG_PARAM1, param1) + putString(ARG_PARAM2, param2) + } + } + } + + */ +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentRegister.kt b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentRegister.kt new file mode 100644 index 0000000..05348a2 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/java/com/example/brzodolokacije/Fragments/FragmentRegister.kt @@ -0,0 +1,110 @@ +package com.example.brzodolokacije.Fragments + +import android.graphics.Color +import android.os.Bundle +import androidx.fragment.app.Fragment +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import android.widget.Button +import android.widget.EditText +import android.widget.Toast +import com.example.brzodolokacije.R + +class FragmentRegister : Fragment() { + // TODO: Rename and change types of parameters + private lateinit var password: EditText + private lateinit var email: EditText + private lateinit var username: EditText + private lateinit var name: EditText + private lateinit var register: Button + private lateinit var usernameString:String + private lateinit var nameString:String + private lateinit var passwordString:String + private lateinit var emailString:String + + + override fun onCreateView( + inflater: LayoutInflater, container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + // Inflate the layout for this fragment + val view:View=inflater.inflate(R.layout.fragment_register, container, false) + + email = view.findViewById(R.id.etFragmentRegisterEmail) as EditText + password = view.findViewById(R.id.etFragmentRegisterPassword) as EditText + username = view.findViewById(R.id.etFragmentRegisterUser) as EditText + name = view.findViewById(R.id.etFragmentRegisterName) as EditText + register=view.findViewById(R.id.btnFragmentRegisterRegister) as Button + + //osluskivanje unosa + + register.setOnClickListener{ + emailString=email.text.toString().trim() + usernameString=username.text.toString().trim() + nameString=name.text.toString().trim() + passwordString=password.text.toString().trim() + + //prazan unos? neispravan email + if(emailString.isEmpty()) + { + email.hint="Unesite Email adresu" + email.setHintTextColor(Color.RED) + } + if(passwordString.isEmpty()) + { + password.hint = "Unesite lozinku" + password.setHintTextColor(Color.RED) + } + if(usernameString.isEmpty()) + { + username.hint = "Unesite korisničko ime" + username.setHintTextColor(Color.RED) + } + if(nameString.isEmpty()) + { + name.hint = "Unesite ime i prezime" + name.setHintTextColor(Color.RED) + } + if(!emailString.isEmpty() && !passwordString.isEmpty() && !nameString.isEmpty() && !usernameString.isEmpty()) { + + + //proveri da li postoji u bazi + + //UPIT BAZI - ako postoji - greska korisnik je registrovan + Toast.makeText( + activity, "Korisnik sa unetim podacima već postoji. " + "\n" + + "Da li želite da se prijavite?", Toast.LENGTH_LONG + ).show(); + + //UPIT BAZI - ako ne postoji dodaj u bazu + + //***DODATI broj karaktera lozinke, provera da li je email sa @ i .com + + } + } + + + return view + } +/* + companion object { + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment fragmentRegister. + */ + // TODO: Rename and change types and number of parameters + @JvmStatic + fun newInstance(param1: String, param2: String) = + fragmentRegister().apply { + arguments = Bundle().apply { + putString(ARG_PARAM1, param1) + putString(ARG_PARAM2, param2) + } + } + }*/ +} \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/b3.jpg b/Client/BrzoDoLokacije/app/src/main/res/drawable/b3.jpg new file mode 100644 index 0000000..f04899d Binary files /dev/null and b/Client/BrzoDoLokacije/app/src/main/res/drawable/b3.jpg differ diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_cyan_button.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_cyan_button.xml new file mode 100644 index 0000000..c2c005d --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_cyan_button.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml new file mode 100644 index 0000000..60f4b4d --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/rounded_white_button_login.xml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/drawable/switch_login_register_on.xml b/Client/BrzoDoLokacije/app/src/main/res/drawable/switch_login_register_on.xml new file mode 100644 index 0000000..6bf62c6 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/drawable/switch_login_register_on.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml new file mode 100644 index 0000000..d276a63 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/activity_login_register.xml @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml new file mode 100644 index 0000000..0cefaa3 --- /dev/null +++ b/Client/BrzoDoLokacije/app/src/main/res/layout/fragment_login.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + +