Skip to content

Commit

Permalink
#12 - add link to install/open provider's app (#183)
Browse files Browse the repository at this point in the history
* prepare for adding provider app buttons

* css and buttons updated

* prepared database for links
fixed displaying buttons

* fixed error with buttons

* Remove unused web_url field and update provider button styles to display correctly

* some seeders done for testing (ie. beryl)

* almost everything done, changing links for real ones left

* fixed bolt seeder

* updated seeder

* lint

* seeder lint

* fixed colors and text issue

* lintf

---------

Co-authored-by: zmigroo <[email protected]>
  • Loading branch information
zmigrOO and zmigroo authored Jan 8, 2024
1 parent 1dd33f1 commit d043e8b
Show file tree
Hide file tree
Showing 9 changed files with 338 additions and 30 deletions.
2 changes: 2 additions & 0 deletions app/Http/Resources/ProviderResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public function toArray(Request $request): array
return [
"name" => $this->name,
"url" => $this->url,
"android_url" => $this->android_url,
"ios_url" => $this->ios_url,
"color" => $this->color,
];
}
Expand Down
2 changes: 2 additions & 0 deletions database/migrations/2023_06_15_132726_create_providers.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public function up(): void
Schema::create("providers", function (Blueprint $table): void {
$table->string("name")->unique();
$table->string("url")->nullable();
$table->string("android_url")->nullable();
$table->string("ios_url")->nullable();
$table->string("color");
$table->timestamps();
});
Expand Down
51 changes: 27 additions & 24 deletions database/seeders/ProviderSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,39 @@ class ProviderSeeder extends Seeder
public function run(): void
{
$providers = [
["name" => BeamDataImporter::getProviderName(), "color" => "#7347ff"],
["name" => BerylDataImporter::getProviderName(), "color" => "#00e3c2"],
["name" => BinBinDataImporter::getProviderName(), "color" => "#3dbcc8"],
["name" => BirdDataImporter::getProviderName(), "color" => "#26ccf0"],
["name" => BitMobilityDataImporter::getProviderName(), "color" => "#8da6e3"],
["name" => BoltDataImporter::getProviderName(), "color" => "#24f0a0"],
["name" => DottDataImporter::getProviderName(), "color" => "#f5c604"],
["name" => HopDataImporter::getProviderName(), "color" => "#ea1821"],
["name" => HoppDataImporter::getProviderName(), "color" => "#1ce5be"],
["name" => HulajDataImporter::getProviderName(), "color" => "#d6213f"],
["name" => LimeDataImporter::getProviderName(), "color" => "#00de00"],
["name" => LinkDataImporter::getProviderName(), "color" => "#def700"],
["name" => NeuronDataImporter::getProviderName(), "color" => "#445261"],
["name" => QuickDataImporter::getProviderName(), "color" => "#009ac7"],
["name" => SpinDataImporter::getProviderName(), "color" => "#ff5436"],
["name" => SixtDataImporter::getProviderName(), "color" => "#f25a04"],
["name" => TierDataImporter::getProviderName(), "color" => "#0E1A50"],
["name" => VoiDataImporter::getProviderName(), "color" => "#f46c63"],
["name" => UrentDataImporter::getProviderName(), "color" => "#9400FF"],
["name" => ZwingsDataImporter::getProviderName(), "color" => "#abb8c3"],
["name" => RydeDataImporter::getProviderName(), "color" => "#4dcb1f"],
["name" => VeoDataImporter::getProviderName(), "color" => "#000000"],
["name" => WindDataImporter::getProviderName(), "color" => "#fffa00"],
["name" => WheeMoveDataImporter::getProviderName(), "color" => "#31682d"],
["name" => BeamDataImporter::getProviderName(), "color" => "#7347ff", "url" => "https://www.ridebeam.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.escooterapp&pli=1", "ios_url" => "https://apps.apple.com/app/id1427114484"],
["name" => BerylDataImporter::getProviderName(), "color" => "#00e3c2", "url" => "https://beryl.cc/", "android_url" => "https://play.google.com/store/apps/details?id=cc.beryl.basis", "ios_url" => "https://apps.apple.com/app/id1386768364"],
["name" => BinBinDataImporter::getProviderName(), "color" => "#3dbcc8", "url" => "https://www.binbin.tech/", "android_url" => "https://play.google.com/store/apps/details?id=com.BINBIN&hl=en_US", "ios_url" => "https://apps.apple.com/us/app/binbin-scooters/id1483635924"],
["name" => BirdDataImporter::getProviderName(), "color" => "#26ccf0", "url" => "https://www.bird.co/", "android_url" => "https://play.google.com/store/apps/details?id=co.bird.android", "ios_url" => "https://apps.apple.com/us/app/bird-be-free-enjoy-the-ride/id1260842311"],
["name" => BitMobilityDataImporter::getProviderName(), "color" => "#8da6e3", "url" => "https://bitmobility.it/en/", "android_url" => "https://play.google.com/store/apps/details?id=it.bitmobility.bit", "ios_url" => "https://apps.apple.com/it/app/bit/id1464155063"],
["name" => BoltDataImporter::getProviderName(), "color" => "#24f0a0", "url" => "https://bolt.eu/pl-pl/scooters/", "android_url" => "https://play.google.com/store/apps/details?id=ee.mtakso.client&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/pl/app/bolt-przejazdy-hulajnogi/id675033630?l=pl"],
["name" => DottDataImporter::getProviderName(), "color" => "#f5c604", "url" => "https://ridedott.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.ridedott.rider&pli=1", "ios_url" => "https://apps.apple.com/us/app/dott-unlock-your-city/id1440301673"],
["name" => HopDataImporter::getProviderName(), "color" => "#ea1821", "url" => "https://hop.bike/en/", "android_url" => "https://play.google.com/store/apps/details?id=com.hoplagit.rider&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/pl/app/hop-enjoy-the-city/id1487640704?l=pl"],
["name" => HoppDataImporter::getProviderName(), "color" => "#1ce5be", "url" => "https://hopp.bike/", "android_url" => "https://play.google.com/store/apps/details?id=bike.hopp", "ios_url" => "https://apps.apple.com/us/app/hopp-scooters/id1471324642?ls=1"],
["name" => HulajDataImporter::getProviderName(), "color" => "#d6213f", "url" => "https://hulaj.eu/", "android_url" => "https://play.google.com/store/apps/details?id=eu.hulaj&hl=pl&gl=US"],
["name" => LimeDataImporter::getProviderName(), "color" => "#00de00", "url" => "https://www.li.me/", "android_url" => "https://play.google.com/store/apps/details?id=com.limebike", "ios_url" => "https://apps.apple.com/app/id1199780189"],
["name" => LinkDataImporter::getProviderName(), "color" => "#def700", "url" => "https://link.city/", "android_url" => "https://play.google.com/store/apps/details?id=com.superpedestrian.link", "ios_url" => "https://apps.apple.com/US/app/id1487864428?mt=8"],
["name" => NeuronDataImporter::getProviderName(), "color" => "#445261", "url" => "https://www.rideneuron.com/", "android_url" => "https://go.onelink.me/app/Neuron", "ios_url" => "https://go.onelink.me/app/NeuroniOS"],
["name" => QuickDataImporter::getProviderName(), "color" => "#009ac7", "url" => "https://quick-app.eu/en/", "android_url" => "https://play.google.com/store/apps/details?id=eu.quick_app.eu", "ios_url" => "https://apps.apple.com/us/app/quickapp/id1461661144"],
["name" => SpinDataImporter::getProviderName(), "color" => "#ff5436", "url" => "https://www.spin.app/", "android_url" => "https://play.google.com/store/apps/details?hl=en_US&id=pm.spin", "ios_url" => "https://apps.apple.com/us/app/spin-electric-scooters/id1241808993"],
["name" => SixtDataImporter::getProviderName(), "color" => "#f25a04", "url" => "https://www.sixt.com/share/#/", "android_url" => "https://play.google.com/store/apps/details?id=com.sixt.reservation&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/us/app/sixt-rent-share-ride-plus/id295079411"],
["name" => TierDataImporter::getProviderName(), "color" => "#0E1A50", "url" => "https://www.tier.app/", "android_url" => "https://play.google.com/store/apps/details?id=com.tier.app&hl=en&gl=US", "ios_url" => "https://apps.apple.com/app/id1436140272?mt=8"],
["name" => VoiDataImporter::getProviderName(), "color" => "#f46c63", "url" => "https://www.voiscooters.com/", "android_url" => "https://play.google.com/store/apps/details?id=io.voiapp.voi&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/us/app/voi-e-scooter-e-bike-hire/id1395921017?mt=8"],
["name" => UrentDataImporter::getProviderName(), "color" => "#9400FF", "url" => "https://urent.ru/", "android_url" => "https://play.google.com/store/apps/details?id=ru.urentbike.app", "ios_url" => "https://apps.apple.com/gb/app/urent-e-scooters-and-bikes/id1352346712"],
["name" => ZwingsDataImporter::getProviderName(), "color" => "#abb8c3", "url" => "https://www.zwings.co.uk/", "android_url" => "https://play.google.com/store/apps/details?id=com.zwings", "ios_url" => "https://apps.apple.com/us/app/zwings/id1503019815"],
["name" => RydeDataImporter::getProviderName(), "color" => "#4dcb1f", "url" => "https://www.ryde-technology.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.ryde_android&hl=no", "ios_url" => "https://apps.apple.com/no/app/id1495605028"],
["name" => VeoDataImporter::getProviderName(), "color" => "#000000", "url" => "https://www.veoride.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.pgt.veoride", "ios_url" => "https://apps.apple.com/us/app/veoride/id1279820696"],
["name" => WindDataImporter::getProviderName(), "color" => "#fffa00", "url" => "https://www.wind.co/", "android_url" => "https://play.google.com/store/apps/details?id=com.zen.zbike&referrer=utm_source%3Dofficialweb%26utm_medium%3Dother%26utm_term%3Dglobal", "ios_url" => "https://apps.apple.com/cn/app/yango-wind-e-scooter-sharing/id1247826304?utm_source=officialweb&utm_medium=other&time=1703025387273&utm_term=global"],
["name" => WheeMoveDataImporter::getProviderName(), "color" => "#31682d", "url" => "https://www.wheemove.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.whee.android", "ios_url" => "https://apps.apple.com/us/app/whee-e-scooter-sharing/id1465111214?l=es&ls=1"],
];

foreach ($providers as $provider) {
Provider::create([
"name" => $provider["name"],
"color" => $provider["color"],
"url" => $provider["url"] ?? null,
"android_url" => $provider["android_url"] ?? null,
"ios_url" => $provider["ios_url"] ?? null,
]);
}
}
Expand Down
100 changes: 100 additions & 0 deletions public/icons/android.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions public/icons/apple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions public/icons/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d043e8b

Please sign in to comment.